From 32e736d903f65a74af2bbf0d3b7bd7ee60ee5837 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sat, 24 Sep 2022 13:22:59 +0200
Subject: [PATCH] Make thumbs.el obsolete

* lisp/obsolete/thumbs.el: Add Obsolete-since.
* etc/NEWS: Announce obsoletion of thumbs.el.  (Bug#57779)
---
 etc/NEWS                | 4 ++++
 lisp/obsolete/thumbs.el | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index ff97c2350f2..fd9fadc51f8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -398,6 +398,10 @@ We recommend using either the built-in 'display-line-numbers-mode', or
 the 'nlinum' package from GNU ELPA instead.  The former has better
 performance, but the latter is closer to a drop-in replacement.
 
+---
+** The thumbs.el library is now obsolete.
+We recommend using `M-x image-dired' instead.
+
 ---
 ** The autoarg.el library is now marked obsolete.
 This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor
diff --git a/lisp/obsolete/thumbs.el b/lisp/obsolete/thumbs.el
index a9ff9f5ebc4..a98b339b470 100644
--- a/lisp/obsolete/thumbs.el
+++ b/lisp/obsolete/thumbs.el
@@ -5,6 +5,7 @@
 ;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca>
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: Multimedia
+;; Obsolete-since: 29.1
 
 ;; This file is part of GNU Emacs.
 
@@ -23,6 +24,11 @@
 
 ;;; Commentary:
 
+;; NOTE: This library was made obsolete in Emacs 29.1.
+;;       We recommend using `M-x image-dired' instead.
+;;
+;; --------------------
+;;
 ;; This package create two new modes: `thumbs-mode' and `thumbs-view-image-mode'.
 ;; It is used for basic browsing and viewing of images from within Emacs.
 ;; Minimal image manipulation functions are also available via external
@@ -387,6 +393,7 @@ and SAME-WINDOW to show thumbs in the same window."
 
 ;;;###autoload
 (defalias 'thumbs 'thumbs-show-from-dir)
+(make-obsolete 'thumbs 'image-dired "29.1")
 
 (defun thumbs-find-image (img &optional num otherwin)
   (let ((buffer (current-buffer)))
-- 
2.39.5