diff --git a/lisp/dired.el b/lisp/dired.el index 63082fe392..3050a4bd2d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1261,6 +1261,10 @@ dired-switches-recursive-p "Return non-nil if the string SWITCHES contains -R or --recursive." (dired-check-switches switches "R" "recursive")) +(defun dired-switches-classify-p (switches) + "Return non-nil if the string SWITCHES contains -F or --classify." + (dired-check-switches switches "F" "classify")) + (defun dired-insert-directory (dir switches &optional file-list wildcard hdr) "Insert a directory listing of DIR, Dired style. Use SWITCHES to make the listings. @@ -2588,7 +2592,7 @@ dired-move-to-end-of-filename (if (get-text-property (point) 'dired-filename) (goto-char (next-single-property-change (point) 'dired-filename)) (let ((opoint (point)) - (used-F (dired-check-switches dired-actual-switches "F" "classify")) + (used-F (dired-switches-classify-p dired-actual-switches)) (eol (line-end-position)) (hidden (dired--hidden-p)) file-type executable symlink) diff --git a/lisp/wdired.el b/lisp/wdired.el index d2a298bd25..1e9c7f6c5a 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -626,8 +626,7 @@ wdired--restore-dired-filename-prop ;; or "classify", don't treat appended ;; indicator characters as part of the file ;; name (bug#34915). - (and (dired-check-switches dired-actual-switches - "F" "classify") + (and (dired-switches-classify-p dired-actual-switches) (re-search-forward "[*/@|=>]$" lep t))) (goto-char (match-beginning 0)) lep))