From: Eli Zaretskii Date: Thu, 27 Jun 2024 09:42:43 +0000 (+0300) Subject: Fix handling of non-nil 'dired-movement-style' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92adf9bd6eb053a40464357e95ca4dac3a8c9f10;p=emacs.git Fix handling of non-nil 'dired-movement-style' * lisp/dired.el (dired--move-to-next-line): Treat any non-nil value of 'dired-movement-style' except 'cycle' as 'bounded'. (dired-movement-style): Mention this in the doc string. (Bug#71770) (cherry picked from commit ced33bc23978c7e27c30a9e09bf8814f6798524f) --- diff --git a/lisp/dired.el b/lisp/dired.el index b1e643059ad..8781ff52fbe 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -503,7 +503,8 @@ Possible non-nil values: * `cycle': when moving from the last/first visible line, cycle back to the first/last visible line. * `bounded': don't move up/down if the current line is the - first/last visible line." + first/last visible line. +Any other non-nil value is treated as `bounded'." :type '(choice (const :tag "Move to any line" nil) (const :tag "Cycle through non-empty lines" cycle) (const :tag "Stop on last/first non-empty line" bounded)) @@ -2874,7 +2875,7 @@ is controlled by `dired-movement-style'." (point-max)))) (setq wrapped t)) ;; `bounded': go back to the last non-empty line. - ((eq dired-movement-style 'bounded) + (dired-movement-style ; Either 'bounded or anything else non-nil. (while (and (dired-between-files) (not (zerop arg))) (funcall jumpfun (- moving-down)) ;; Point not moving means infinite loop.