From e6f1ad6474d3352125b53a90bb259997ecd1fc5d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 23 Sep 2022 20:18:17 +0200 Subject: [PATCH] image-dired: Mark two slideshow defuns as internal * lisp/image/image-dired.el (image-dired--slideshow-step) (image-dired--slideshow-stop): Rename from 'image-dired--slideshow-step' and 'image-dired--slideshow-stop'. Update callers and make old names into obsolete aliases. --- lisp/image/image-dired.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index c074f3312d5..41decbd3414 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -974,12 +974,12 @@ This is used by `image-dired-slideshow-start'." (defvar image-dired--slideshow-initial nil) -(defun image-dired-slideshow-step () +(defun image-dired--slideshow-step () "Step to next image in a slideshow." (if-let ((buf (get-buffer image-dired-thumbnail-buffer))) (with-current-buffer buf (image-dired-display-next-thumbnail-original)) - (image-dired-slideshow-stop))) + (image-dired--slideshow-stop))) (defun image-dired-slideshow-start (&optional arg) "Start a slideshow, waiting `image-dired-slideshow-delay' between images. @@ -1001,17 +1001,17 @@ With a negative prefix argument, prompt user for the delay." (setq image-dired--slideshow-timer (run-with-timer 0 delay - 'image-dired-slideshow-step)) - (add-hook 'post-command-hook 'image-dired-slideshow-stop) + 'image-dired--slideshow-step)) + (add-hook 'post-command-hook 'image-dired--slideshow-stop) (setq image-dired--slideshow-initial t) (message "Running slideshow; use any command to stop"))) -(defun image-dired-slideshow-stop () +(defun image-dired--slideshow-stop () "Cancel slideshow." ;; Make sure we don't immediately stop after ;; `image-dired-slideshow-start'. (unless image-dired--slideshow-initial - (remove-hook 'post-command-hook 'image-dired-slideshow-stop) + (remove-hook 'post-command-hook 'image-dired--slideshow-stop) (cancel-timer image-dired--slideshow-timer)) (setq image-dired--slideshow-initial nil)) @@ -1826,6 +1826,8 @@ when using per-directory thumbnail file storage")) (insert " \n") (insert "")))) +(define-obsolete-function-alias 'image-dired-slideshow-step #'image-dired--slideshow-step "29.1") +(define-obsolete-function-alias 'image-dired-slideshow-stop #'image-dired--slideshow-stop "29.1") (define-obsolete-function-alias 'image-dired-create-display-image-buffer #'ignore "29.1") (define-obsolete-function-alias 'image-dired-create-gallery-lists -- 2.39.2