]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve docstring of image-dired-show-all-from-dir
authorStefan Kangas <stefankangas@gmail.com>
Tue, 7 Jan 2025 07:15:41 +0000 (08:15 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 8 Jan 2025 08:54:04 +0000 (09:54 +0100)
* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Improve docstring.

(cherry picked from commit e41a7d8127423307018f369e8739319f1de9b3fa)

etc/NEWS
lisp/image/image-dired.el

index 8fc73569a1f74eb151666c2cc9f22fa2b2971bb2..4387bb0010e9053e03ddd214b35c6e99d048e0b5 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -229,6 +229,12 @@ modal editing packages.
 ** Smerge
 *** New command 'smerge-extend' extends a conflict over surrounding lines.
 
+** Image Dired
+
+*** 'image-dired-show-all-from-dir' takes the same first argument as 'dired'.
+This allows passing a string with wildcards, or a cons cell where the
+first element is a list and the rest is a list of files.
+
 ** Browse URL
 
 *** New user option 'browse-url-transform-alist'.
index 3ff904df71b5c199da4e77931c3aaf4b6a7d5f16..6ec810e710f25670d4d1ca3e9e1f5eb2adc05057 100644 (file)
@@ -618,17 +618,22 @@ thumbnail buffer to be selected."
       (image-dired--update-header-line))))
 
 ;;;###autoload
-(defun image-dired-show-all-from-dir (dir)
-  "Make a thumbnail buffer for all images in DIR and display it.
-Any file matching `image-dired--file-name-regexp' is considered an
-image file.
+(defun image-dired-show-all-from-dir (dirname)
+  "Make a thumbnail buffer for all images in DIRNAME and display it.
+
+The DIRNAME argument is passed along to `dired', and can therefore be
+either a string with wildcards or a cons, as described in the
+documentation for that function.  Refer to it for more details.
 
 If the number of image files in DIR exceeds
 `image-dired-show-all-from-dir-max-files', ask for confirmation
 before creating the thumbnail buffer.  If that variable is nil,
-never ask for confirmation."
+never ask for confirmation.
+
+Any file matching `image-dired--file-name-regexp' is considered an
+image file."
   (interactive "DShow thumbnails for directory: ")
-  (dired dir)
+  (dired dirname)
   (dired-mark-files-regexp (image-dired--file-name-regexp))
   (let ((files (dired-get-marked-files nil nil nil t))
         (dired-default-directory default-directory))