aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Bernoulli2021-06-30 20:10:30 +0200
committerJonas Bernoulli2021-06-30 21:40:14 +0200
commit1b1c4ef3cba235a97c424da4bc7ccfafea5b4bf8 (patch)
treebda8dbe4a39cf0b0fcbfc74735a455a37efc6e3a
parent4a3fc7179bd2bcb5d248f6fd1469227d00cfbdd4 (diff)
downloademacs-1b1c4ef3cba235a97c424da4bc7ccfafea5b4bf8.tar.gz
emacs-1b1c4ef3cba235a97c424da4bc7ccfafea5b4bf8.zip
Cleanup whitespace and comments in dired libraries
* lisp/dired-aux.el: Cleanup whitespace and comments. * lisp/dired-x.el: Cleanup whitespace and comments. * lisp/dired.el: Cleanup whitespace and comments.
-rw-r--r--lisp/dired-aux.el66
-rw-r--r--lisp/dired-x.el68
-rw-r--r--lisp/dired.el71
3 files changed, 101 insertions, 104 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index d002d1fa907..73bceffbc2c 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -135,7 +135,7 @@ substituted, and will be passed through normally to the shell.
135 135
136%s 136%s
137 137
138(Press ^ to %s markers below these occurrences.) 138\(Press ^ to %s markers below these occurrences.)
139" 139"
140 "`" 140 "`"
141 (string (aref command (car char-positions))) 141 (string (aref command (car char-positions)))
@@ -288,12 +288,12 @@ If this file is a backup, diff it with its original.
288The backup file is the first file given to `diff'. 288The backup file is the first file given to `diff'.
289With prefix arg, prompt for argument SWITCHES which is options for `diff'." 289With prefix arg, prompt for argument SWITCHES which is options for `diff'."
290 (interactive 290 (interactive
291 (if current-prefix-arg 291 (if current-prefix-arg
292 (list (read-string "Options for diff: " 292 (list (read-string "Options for diff: "
293 (if (stringp diff-switches) 293 (if (stringp diff-switches)
294 diff-switches 294 diff-switches
295 (mapconcat #'identity diff-switches " ")))) 295 (mapconcat #'identity diff-switches " "))))
296 nil)) 296 nil))
297 (diff-backup (dired-get-filename) switches)) 297 (diff-backup (dired-get-filename) switches))
298 298
299;;;###autoload 299;;;###autoload
@@ -636,7 +636,7 @@ Uses the shell command coming from variables `lpr-command' and
636 (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) 636 (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
637 637
638(defun dired-mark-read-string (prompt initial op-symbol arg files 638(defun dired-mark-read-string (prompt initial op-symbol arg files
639 &optional default-value collection) 639 &optional default-value collection)
640 "Read args for a Dired marked-files command, prompting with PROMPT. 640 "Read args for a Dired marked-files command, prompting with PROMPT.
641Return the user input (a string). 641Return the user input (a string).
642 642
@@ -871,8 +871,8 @@ can be produced by `dired-get-marked-files', for example.
871`dired-guess-shell-alist-default' and 871`dired-guess-shell-alist-default' and
872`dired-guess-shell-alist-user' are consulted when the user is 872`dired-guess-shell-alist-user' are consulted when the user is
873prompted for the shell command to use interactively." 873prompted for the shell command to use interactively."
874;;Functions dired-run-shell-command and dired-shell-stuff-it do the 874 ;; Functions dired-run-shell-command and dired-shell-stuff-it do the
875;;actual work and can be redefined for customization. 875 ;; actual work and can be redefined for customization.
876 (interactive 876 (interactive
877 (let ((files (dired-get-marked-files t current-prefix-arg nil nil t))) 877 (let ((files (dired-get-marked-files t current-prefix-arg nil nil t)))
878 (list 878 (list
@@ -914,13 +914,13 @@ prompted for the shell command to use interactively."
914 "Separates marked files in dired shell commands.") 914 "Separates marked files in dired shell commands.")
915 915
916(defun dired-shell-stuff-it (command file-list on-each &optional _raw-arg) 916(defun dired-shell-stuff-it (command file-list on-each &optional _raw-arg)
917;; "Make up a shell command line from COMMAND and FILE-LIST. 917 ;; "Make up a shell command line from COMMAND and FILE-LIST.
918;; If ON-EACH is t, COMMAND should be applied to each file, else 918 ;; If ON-EACH is t, COMMAND should be applied to each file, else
919;; simply concat all files and apply COMMAND to this. 919 ;; simply concat all files and apply COMMAND to this.
920;; FILE-LIST's elements will be quoted for the shell." 920 ;; FILE-LIST's elements will be quoted for the shell."
921;; Might be redefined for smarter things and could then use RAW-ARG 921 ;; Might be redefined for smarter things and could then use RAW-ARG
922;; (coming from interactive P and currently ignored) to decide what to do. 922 ;; (coming from interactive P and currently ignored) to decide what to do.
923;; Smart would be a way to access basename or extension of file names. 923 ;; Smart would be a way to access basename or extension of file names.
924 (let* ((in-background (string-match "[ \t]*&[ \t]*\\'" command)) 924 (let* ((in-background (string-match "[ \t]*&[ \t]*\\'" command))
925 (command (if in-background 925 (command (if in-background
926 (substring command 0 (match-beginning 0)) 926 (substring command 0 (match-beginning 0))
@@ -1382,19 +1382,19 @@ see `dired-compress-file-alist' for the supported suffixes list."
1382 (dired-mark-prompt arg files) "? "))))) 1382 (dired-mark-prompt arg files) "? ")))))
1383 1383
1384(defun dired-map-over-marks-check (fun arg op-symbol &optional show-progress) 1384(defun dired-map-over-marks-check (fun arg op-symbol &optional show-progress)
1385; "Map FUN over marked files (with second ARG like in dired-map-over-marks) 1385 ;; "Map FUN over marked files (with second ARG like in dired-map-over-marks)
1386; and display failures. 1386 ;; and display failures.
1387 1387
1388; FUN takes zero args. It returns non-nil (the offending object, e.g. 1388 ;; FUN takes zero args. It returns non-nil (the offending object, e.g.
1389; the short form of the filename) for a failure and probably logs a 1389 ;; the short form of the filename) for a failure and probably logs a
1390; detailed error explanation using function `dired-log'. 1390 ;; detailed error explanation using function `dired-log'.
1391 1391
1392; OP-SYMBOL is a symbol describing the operation performed (e.g. 1392 ;; OP-SYMBOL is a symbol describing the operation performed (e.g.
1393; `compress'). It is used with `dired-mark-pop-up' to prompt the user 1393 ;; `compress'). It is used with `dired-mark-pop-up' to prompt the user
1394; (e.g. with `Compress * [2 files]? ') and to display errors (e.g. 1394 ;; (e.g. with `Compress * [2 files]? ') and to display errors (e.g.
1395; `Failed to compress 1 of 2 files - type W to see why ("foo")') 1395 ;; `Failed to compress 1 of 2 files - type W to see why ("foo")')
1396 1396
1397; SHOW-PROGRESS if non-nil means redisplay dired after each file." 1397 ;; SHOW-PROGRESS if non-nil means redisplay dired after each file."
1398 (if (dired-mark-confirm op-symbol arg) 1398 (if (dired-mark-confirm op-symbol arg)
1399 (let* ((total-list;; all of FUN's return values 1399 (let* ((total-list;; all of FUN's return values
1400 (dired-map-over-marks (funcall fun) arg show-progress)) 1400 (dired-map-over-marks (funcall fun) arg show-progress))
@@ -1486,7 +1486,7 @@ uncompress and unpack all the files in the archive."
1486 ;; Return nil for success, offending file name else. 1486 ;; Return nil for success, offending file name else.
1487 (let ((file (dired-get-filename)) failure) 1487 (let ((file (dired-get-filename)) failure)
1488 (condition-case err 1488 (condition-case err
1489 (load file nil nil t) 1489 (load file nil nil t)
1490 (error (setq failure err))) 1490 (error (setq failure err)))
1491 (if (not failure) 1491 (if (not failure)
1492 nil 1492 nil
@@ -1700,7 +1700,7 @@ files matching `dired-omit-regexp'."
1700 (forward-line 1) 1700 (forward-line 1)
1701 (while (and (not (eolp)) ; don't cross subdir boundary 1701 (while (and (not (eolp)) ; don't cross subdir boundary
1702 (not (dired-move-to-filename))) 1702 (not (dired-move-to-filename)))
1703 (forward-line 1)) 1703 (forward-line 1))
1704 (point))) 1704 (point)))
1705 1705
1706;;;###autoload 1706;;;###autoload
@@ -2415,7 +2415,7 @@ suggested for the target directory depends on the value of
2415For relative symlinks, use \\[dired-do-relsymlink]." 2415For relative symlinks, use \\[dired-do-relsymlink]."
2416 (interactive "P") 2416 (interactive "P")
2417 (dired-do-create-files 'symlink #'make-symbolic-link 2417 (dired-do-create-files 'symlink #'make-symbolic-link
2418 "Symlink" arg dired-keep-marker-symlink)) 2418 "Symlink" arg dired-keep-marker-symlink))
2419 2419
2420;;;###autoload 2420;;;###autoload
2421(defun dired-do-hardlink (&optional arg) 2421(defun dired-do-hardlink (&optional arg)
@@ -2428,7 +2428,7 @@ suggested for the target directory depends on the value of
2428`dired-dwim-target', which see." 2428`dired-dwim-target', which see."
2429 (interactive "P") 2429 (interactive "P")
2430 (dired-do-create-files 'hardlink #'dired-hardlink 2430 (dired-do-create-files 'hardlink #'dired-hardlink
2431 "Hardlink" arg dired-keep-marker-hardlink)) 2431 "Hardlink" arg dired-keep-marker-hardlink))
2432 2432
2433(defun dired-hardlink (file newname &optional ok-if-already-exists) 2433(defun dired-hardlink (file newname &optional ok-if-already-exists)
2434 (dired-handle-overwrite newname) 2434 (dired-handle-overwrite newname)
@@ -2455,7 +2455,7 @@ of `dired-dwim-target', which see."
2455(defvar rename-regexp-query) 2455(defvar rename-regexp-query)
2456 2456
2457(defun dired-do-create-files-regexp 2457(defun dired-do-create-files-regexp
2458 (file-creator operation arg regexp newname &optional whole-name marker-char) 2458 (file-creator operation arg regexp newname &optional whole-name marker-char)
2459 ;; Create a new file for each marked file using regexps. 2459 ;; Create a new file for each marked file using regexps.
2460 ;; FILE-CREATOR and OPERATION as in dired-create-files. 2460 ;; FILE-CREATOR and OPERATION as in dired-create-files.
2461 ;; ARG as in dired-get-marked-files. 2461 ;; ARG as in dired-get-marked-files.
@@ -2575,7 +2575,7 @@ See function `dired-do-rename-regexp' for more info."
2575(defvar rename-non-directory-query) 2575(defvar rename-non-directory-query)
2576 2576
2577(defun dired-create-files-non-directory 2577(defun dired-create-files-non-directory
2578 (file-creator basename-constructor operation arg) 2578 (file-creator basename-constructor operation arg)
2579 ;; Perform FILE-CREATOR on the non-directory part of marked files 2579 ;; Perform FILE-CREATOR on the non-directory part of marked files
2580 ;; using function BASENAME-CONSTRUCTOR, with query for each file. 2580 ;; using function BASENAME-CONSTRUCTOR, with query for each file.
2581 ;; OPERATION like in dired-create-files, ARG as in dired-get-marked-files. 2581 ;; OPERATION like in dired-create-files, ARG as in dired-get-marked-files.
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 6619a391673..38a624fa72b 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -623,7 +623,7 @@ you can relist single subdirs using \\[dired-do-redisplay]."
623 (and (looking-at "^ wildcard ") 623 (and (looking-at "^ wildcard ")
624 (buffer-substring (match-end 0) 624 (buffer-substring (match-end 0)
625 (line-end-position)))))) 625 (line-end-position))))))
626 (if wildcard 626 (if wildcard
627 (setq dirname (expand-file-name wildcard default-directory)))) 627 (setq dirname (expand-file-name wildcard default-directory))))
628 ;; If raw ls listing (not a saved old dired buffer), give it a 628 ;; If raw ls listing (not a saved old dired buffer), give it a
629 ;; decent subdir headerline: 629 ;; decent subdir headerline:
@@ -723,27 +723,27 @@ Also useful for `auto-mode-alist' like this:
723;;; GUESS SHELL COMMAND. 723;;; GUESS SHELL COMMAND.
724 724
725;; Brief Description: 725;; Brief Description:
726;;; 726;;
727;; * `dired-do-shell-command' is bound to `!' by dired.el. 727;; * `dired-do-shell-command' is bound to `!' by dired.el.
728;;; 728;;
729;; * `dired-guess-shell-command' provides smarter defaults for 729;; * `dired-guess-shell-command' provides smarter defaults for
730;;; dired-aux.el's `dired-read-shell-command'. 730;; dired-aux.el's `dired-read-shell-command'.
731;;; 731;;
732;; * `dired-guess-shell-command' calls `dired-guess-default' with list of 732;; * `dired-guess-shell-command' calls `dired-guess-default' with list of
733;;; marked files. 733;; marked files.
734;;; 734;;
735;; * Parse `dired-guess-shell-alist-user' and 735;; * Parse `dired-guess-shell-alist-user' and
736;;; `dired-guess-shell-alist-default' (in that order) for the first REGEXP 736;; `dired-guess-shell-alist-default' (in that order) for the first REGEXP
737;;; that matches the first file in the file list. 737;; that matches the first file in the file list.
738;;; 738;;
739;; * If the REGEXP matches all the entries of the file list then evaluate 739;; * If the REGEXP matches all the entries of the file list then evaluate
740;;; COMMAND, which is either a string or a Lisp expression returning a 740;; COMMAND, which is either a string or a Lisp expression returning a
741;;; string. COMMAND may be a list of commands. 741;; string. COMMAND may be a list of commands.
742;;; 742;;
743;; * Return this command to `dired-guess-shell-command' which prompts user 743;; * Return this command to `dired-guess-shell-command' which prompts user
744;;; with it. The list of commands is put into the list of default values. 744;; with it. The list of commands is put into the list of default values.
745;;; If a command is used successfully then it is stored permanently in 745;; If a command is used successfully then it is stored permanently in
746;;; `dired-shell-command-history'. 746;; `dired-shell-command-history'.
747 747
748;; Guess what shell command to apply to a file. 748;; Guess what shell command to apply to a file.
749(defvar dired-shell-command-history nil 749(defvar dired-shell-command-history nil
@@ -1089,7 +1089,7 @@ results in
1089 1089
1090;;;###autoload 1090;;;###autoload
1091(defun dired-do-relsymlink (&optional arg) 1091(defun dired-do-relsymlink (&optional arg)
1092 "Relative symlink all marked (or next ARG) files into a directory. 1092 "Relative symlink all marked (or next ARG) files into a directory.
1093Otherwise make a relative symbolic link to the current file. 1093Otherwise make a relative symbolic link to the current file.
1094This creates relative symbolic links like 1094This creates relative symbolic links like
1095 1095
@@ -1102,7 +1102,7 @@ not absolute ones like
1102For absolute symlinks, use \\[dired-do-symlink]." 1102For absolute symlinks, use \\[dired-do-symlink]."
1103 (interactive "P") 1103 (interactive "P")
1104 (dired-do-create-files 'relsymlink #'dired-make-relative-symlink 1104 (dired-do-create-files 'relsymlink #'dired-make-relative-symlink
1105 "RelSymLink" arg dired-keep-marker-relsymlink)) 1105 "RelSymLink" arg dired-keep-marker-relsymlink))
1106 1106
1107(autoload 'dired-mark-read-regexp "dired-aux") 1107(autoload 'dired-mark-read-regexp "dired-aux")
1108(autoload 'dired-do-create-files-regexp "dired-aux") 1108(autoload 'dired-do-create-files-regexp "dired-aux")
@@ -1120,27 +1120,27 @@ for more info."
1120;;; VISIT ALL MARKED FILES SIMULTANEOUSLY. 1120;;; VISIT ALL MARKED FILES SIMULTANEOUSLY.
1121 1121
1122;; Brief Description: 1122;; Brief Description:
1123;;; 1123;;
1124;; `dired-do-find-marked-files' is bound to `F' by dired-x.el. 1124;; `dired-do-find-marked-files' is bound to `F' by dired-x.el.
1125;;; 1125;;
1126;; * Use `dired-get-marked-files' to collect the marked files in the current 1126;; * Use `dired-get-marked-files' to collect the marked files in the current
1127;;; Dired Buffer into a list of filenames `FILE-LIST'. 1127;; Dired Buffer into a list of filenames `FILE-LIST'.
1128;;; 1128;;
1129;; * Pass FILE-LIST to `dired-simultaneous-find-file' all with 1129;; * Pass FILE-LIST to `dired-simultaneous-find-file' all with
1130;;; `dired-do-find-marked-files''s prefix argument NOSELECT. 1130;; `dired-do-find-marked-files''s prefix argument NOSELECT.
1131;;; 1131;;
1132;; * `dired-simultaneous-find-file' runs through FILE-LIST decrementing the 1132;; * `dired-simultaneous-find-file' runs through FILE-LIST decrementing the
1133;;; list each time. 1133;; list each time.
1134;;; 1134;;
1135;; * If NOSELECT is non-nil then just run `find-file-noselect' on each 1135;; * If NOSELECT is non-nil then just run `find-file-noselect' on each
1136;;; element of FILE-LIST. 1136;; element of FILE-LIST.
1137;;; 1137;;
1138;; * If NOSELECT is nil then calculate the `size' of the window for each file 1138;; * If NOSELECT is nil then calculate the `size' of the window for each file
1139;;; by dividing the `window-height' by length of FILE-LIST. Thus, `size' is 1139;; by dividing the `window-height' by length of FILE-LIST. Thus, `size' is
1140;;; cognizant of the window-configuration. 1140;; cognizant of the window-configuration.
1141;;; 1141;;
1142;; * If `size' is too small abort, otherwise run `find-file' on each element 1142;; * If `size' is too small abort, otherwise run `find-file' on each element
1143;;; of FILE-LIST giving each a window of height `size'. 1143;; of FILE-LIST giving each a window of height `size'.
1144 1144
1145(defun dired-do-find-marked-files (&optional noselect) 1145(defun dired-do-find-marked-files (&optional noselect)
1146 "Find all marked files displaying all of them simultaneously. 1146 "Find all marked files displaying all of them simultaneously.
@@ -1196,8 +1196,8 @@ NOSELECT the files are merely found but not selected."
1196 1196
1197(defun dired-man () 1197(defun dired-man ()
1198 "Run `man' on this file." 1198 "Run `man' on this file."
1199;; Used also to say: "Display old buffer if buffer name matches filename." 1199 ;; Used also to say: "Display old buffer if buffer name matches filename."
1200;; but I have no idea what that means. 1200 ;; but I have no idea what that means.
1201 (interactive) 1201 (interactive)
1202 (require 'man) 1202 (require 'man)
1203 (let* ((file (dired-get-filename)) 1203 (let* ((file (dired-get-filename))
diff --git a/lisp/dired.el b/lisp/dired.el
index bb428e21983..1f9037180dc 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -53,7 +53,6 @@
53 :prefix "dired-" 53 :prefix "dired-"
54 :group 'dired) 54 :group 'dired)
55 55
56
57;;;###autoload 56;;;###autoload
58(defcustom dired-listing-switches (purecopy "-al") 57(defcustom dired-listing-switches (purecopy "-al")
59 "Switches passed to `ls' for Dired. MUST contain the `l' option. 58 "Switches passed to `ls' for Dired. MUST contain the `l' option.
@@ -78,9 +77,9 @@ some of the `ls' switches are not supported; see the doc string of
78(defcustom dired-subdir-switches nil 77(defcustom dired-subdir-switches nil
79 "If non-nil, switches passed to `ls' for inserting subdirectories. 78 "If non-nil, switches passed to `ls' for inserting subdirectories.
80If nil, `dired-listing-switches' is used." 79If nil, `dired-listing-switches' is used."
81 :group 'dired 80 :group 'dired
82 :type '(choice (const :tag "Use dired-listing-switches" nil) 81 :type '(choice (const :tag "Use dired-listing-switches" nil)
83 (string :tag "Switches"))) 82 (string :tag "Switches")))
84 83
85(defcustom dired-maybe-use-globstar nil 84(defcustom dired-maybe-use-globstar nil
86 "If non-nil, enable globstar if the shell supports it. 85 "If non-nil, enable globstar if the shell supports it.
@@ -144,8 +143,8 @@ For more details, see Info node `(emacs)ls in Lisp'."
144 143
145(defcustom dired-touch-program "touch" 144(defcustom dired-touch-program "touch"
146 "Name of touch command (usually `touch')." 145 "Name of touch command (usually `touch')."
147 :group 'dired 146 :group 'dired
148 :type 'file) 147 :type 'file)
149 148
150(defcustom dired-ls-F-marks-symlinks nil 149(defcustom dired-ls-F-marks-symlinks nil
151 "Informs Dired about how `ls -lF' marks symbolic links. 150 "Informs Dired about how `ls -lF' marks symbolic links.
@@ -220,7 +219,7 @@ or the most recently used window with a Dired buffer, or to use any other
220function. When the value is a function, it will be called with no 219function. When the value is a function, it will be called with no
221arguments and is expected to return a list of directories which will 220arguments and is expected to return a list of directories which will
222be used as defaults (i.e. default target and \"future history\") 221be used as defaults (i.e. default target and \"future history\")
223(though, `dired-dwim-target-defaults' might modify it a bit). 222\(though, `dired-dwim-target-defaults' might modify it a bit).
224The value t prefers the next windows on the same frame. 223The value t prefers the next windows on the same frame.
225 224
226The target is used in the prompt for file copy, rename etc." 225The target is used in the prompt for file copy, rename etc."
@@ -247,9 +246,9 @@ The target is used in the prompt for file copy, rename etc."
247This is similar to the \"-L\" option for the \"cp\" shell command." 246This is similar to the \"-L\" option for the \"cp\" shell command."
248 :type 'boolean 247 :type 'boolean
249 :group 'dired) 248 :group 'dired)
250 ; 249
251; These variables were deleted and the replacements are on files.el. 250;; These variables were deleted and the replacements are on files.el.
252; We leave aliases behind for back-compatibility. 251;; We leave aliases behind for back-compatibility.
253(define-obsolete-variable-alias 'dired-free-space-program 252(define-obsolete-variable-alias 'dired-free-space-program
254 'directory-free-space-program "27.1") 253 'directory-free-space-program "27.1")
255(define-obsolete-variable-alias 'dired-free-space-args 254(define-obsolete-variable-alias 'dired-free-space-args
@@ -376,8 +375,8 @@ This is what the do-commands look for, and what the mark-commands store.")
376 "Character used to flag files for deletion.") 375 "Character used to flag files for deletion.")
377 376
378(defvar dired-shrink-to-fit t 377(defvar dired-shrink-to-fit t
379;; I see no reason ever to make this nil -- rms. 378 ;; I see no reason ever to make this nil -- rms.
380;; (> baud-rate search-slow-speed) 379 ;; (> baud-rate search-slow-speed)
381 "Non-nil means Dired shrinks the display buffer to fit the marked files.") 380 "Non-nil means Dired shrinks the display buffer to fit the marked files.")
382(make-obsolete-variable 'dired-shrink-to-fit 381(make-obsolete-variable 'dired-shrink-to-fit
383 "use the Customization interface to add a new rule 382 "use the Customization interface to add a new rule
@@ -425,7 +424,7 @@ The directory name must be absolute, but need not be fully expanded.")
425 "[bcsp][^:]")) 424 "[bcsp][^:]"))
426(defvar dired-re-exe;; match ls permission string of an executable file 425(defvar dired-re-exe;; match ls permission string of an executable file
427 (mapconcat (lambda (x) 426 (mapconcat (lambda (x)
428 (concat dired-re-maybe-mark dired-re-inode-size x)) 427 (concat dired-re-maybe-mark dired-re-inode-size x))
429 '("-[-r][-w][xs][-r][-w].[-r][-w]." 428 '("-[-r][-w][xs][-r][-w].[-r][-w]."
430 "-[-r][-w].[-r][-w][xs][-r][-w]." 429 "-[-r][-w].[-r][-w][xs][-r][-w]."
431 "-[-r][-w].[-r][-w].[-r][-w][xst]") 430 "-[-r][-w].[-r][-w].[-r][-w][xst]")
@@ -684,7 +683,7 @@ Subexpression 2 must end right before the \\n.")
684 ;; 683 ;;
685 ;; Directory headers. 684 ;; Directory headers.
686 (list dired-subdir-regexp '(1 dired-header-face)) 685 (list dired-subdir-regexp '(1 dired-header-face))
687) 686 )
688 "Additional expressions to highlight in Dired mode.") 687 "Additional expressions to highlight in Dired mode.")
689 688
690(defvar dnd-protocol-alist) 689(defvar dnd-protocol-alist)
@@ -1969,7 +1968,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1969 ;; No need to do this, now that top-level items are fewer. 1968 ;; No need to do this, now that top-level items are fewer.
1970 ;;;; 1969 ;;;;
1971 ;; Get rid of the Edit menu bar item to save space. 1970 ;; Get rid of the Edit menu bar item to save space.
1972 ;(define-key map [menu-bar edit] 'undefined) 1971 ;;(define-key map [menu-bar edit] 'undefined)
1973 1972
1974 map) 1973 map)
1975 "Local keymap for Dired mode buffers.") 1974 "Local keymap for Dired mode buffers.")
@@ -2282,7 +2281,8 @@ Keybindings:
2282 "Summarize basic Dired commands and show recent Dired errors." 2281 "Summarize basic Dired commands and show recent Dired errors."
2283 (interactive) 2282 (interactive)
2284 (dired-why) 2283 (dired-why)
2285 ;>> this should check the key-bindings and use substitute-command-keys if non-standard 2284 ;; FIXME this should check the key-bindings and use
2285 ;; substitute-command-keys if non-standard
2286 (message 2286 (message
2287 "d-elete, u-ndelete, x-punge, f-ind, o-ther window, R-ename, C-opy, h-elp")) 2287 "d-elete, u-ndelete, x-punge, f-ind, o-ther window, R-ename, C-opy, h-elp"))
2288 2288
@@ -2581,7 +2581,7 @@ Otherwise, an error occurs in these cases."
2581 (concat (dired-current-directory localp) file))))) 2581 (concat (dired-current-directory localp) file)))))
2582 2582
2583(defun dired-string-replace-match (regexp string newtext 2583(defun dired-string-replace-match (regexp string newtext
2584 &optional literal global) 2584 &optional literal global)
2585 "Replace first match of REGEXP in STRING with NEWTEXT. 2585 "Replace first match of REGEXP in STRING with NEWTEXT.
2586If it does not match, nil is returned instead of the new string. 2586If it does not match, nil is returned instead of the new string.
2587Optional arg LITERAL means to take NEWTEXT literally. 2587Optional arg LITERAL means to take NEWTEXT literally.
@@ -2592,7 +2592,7 @@ Optional arg GLOBAL means to replace all matches."
2592 (let ((from-end (- (length string) (match-end 0)))) 2592 (let ((from-end (- (length string) (match-end 0))))
2593 (setq ret (setq string (replace-match newtext t literal string))) 2593 (setq ret (setq string (replace-match newtext t literal string)))
2594 (setq start (- (length string) from-end)))) 2594 (setq start (- (length string) from-end))))
2595 ret) 2595 ret)
2596 (if (not (string-match regexp string 0)) 2596 (if (not (string-match regexp string 0))
2597 nil 2597 nil
2598 (replace-match newtext t literal string)))) 2598 (replace-match newtext t literal string))))
@@ -2776,9 +2776,9 @@ If EOL, it should be an position to use instead of
2776 (or no-error 2776 (or no-error
2777 (not (eq opoint (point))) 2777 (not (eq opoint (point)))
2778 (error "%s" (if hidden 2778 (error "%s" (if hidden
2779 (substitute-command-keys 2779 (substitute-command-keys
2780 "File line is hidden, type \\[dired-hide-subdir] to unhide") 2780 "File line is hidden, type \\[dired-hide-subdir] to unhide")
2781 "No file on this line"))) 2781 "No file on this line")))
2782 (if (eq opoint (point)) 2782 (if (eq opoint (point))
2783 nil 2783 nil
2784 (point))))) 2784 (point)))))
@@ -2887,8 +2887,6 @@ dired-buffers."
2887 (substring pattern matched-in-pattern)) 2887 (substring pattern matched-in-pattern))
2888 "\\'"))) 2888 "\\'")))
2889 2889
2890
2891
2892(defun dired-advertise () 2890(defun dired-advertise ()
2893 ;;"Advertise in variable `dired-buffers' that we dired `default-directory'." 2891 ;;"Advertise in variable `dired-buffers' that we dired `default-directory'."
2894 ;; With wildcards we actually advertise too much. 2892 ;; With wildcards we actually advertise too much.
@@ -2936,8 +2934,8 @@ dired-buffers."
2936 (beginning-of-line) ; alist stores b-o-l positions 2934 (beginning-of-line) ; alist stores b-o-l positions
2937 (and (zerop (- (point) 2935 (and (zerop (- (point)
2938 (cdr (assoc cur-dir 2936 (cdr (assoc cur-dir
2939 dired-subdir-alist)))) 2937 dired-subdir-alist))))
2940 cur-dir)))) 2938 cur-dir))))
2941 2939
2942(define-obsolete-function-alias 'dired-get-subdir-min 'cdr "27.1") 2940(define-obsolete-function-alias 'dired-get-subdir-min 'cdr "27.1")
2943 2941
@@ -3046,11 +3044,11 @@ instead of `dired-actual-switches'."
3046 new-dir-name) 3044 new-dir-name)
3047 (setq new-dir-name res))) 3045 (setq new-dir-name res)))
3048 (dired-alist-add-1 new-dir-name 3046 (dired-alist-add-1 new-dir-name
3049 ;; Place a sub directory boundary between lines. 3047 ;; Place a sub directory boundary between lines.
3050 (save-excursion 3048 (save-excursion
3051 (goto-char (match-beginning 0)) 3049 (goto-char (match-beginning 0))
3052 (beginning-of-line) 3050 (beginning-of-line)
3053 (point-marker))))) 3051 (point-marker)))))
3054 (if (and (> count 1) (called-interactively-p 'interactive)) 3052 (if (and (> count 1) (called-interactively-p 'interactive))
3055 (message "Buffer includes %d directories" count))) 3053 (message "Buffer includes %d directories" count)))
3056 ;; We don't need to sort it because it is in buffer order per 3054 ;; We don't need to sort it because it is in buffer order per
@@ -3378,7 +3376,7 @@ non-empty directories is allowed."
3378(defun dired-fun-in-all-buffers (directory file fun &rest args) 3376(defun dired-fun-in-all-buffers (directory file fun &rest args)
3379 "In all buffers dired'ing DIRECTORY, run FUN with ARGS. 3377 "In all buffers dired'ing DIRECTORY, run FUN with ARGS.
3380If the buffer has a wildcard pattern, check that it matches FILE. 3378If the buffer has a wildcard pattern, check that it matches FILE.
3381(FILE does not include a directory component.) 3379\(FILE does not include a directory component.)
3382FILE may be nil, in which case ignore it. 3380FILE may be nil, in which case ignore it.
3383Return list of buffers where FUN succeeded (i.e., returned non-nil)." 3381Return list of buffers where FUN succeeded (i.e., returned non-nil)."
3384 (let (success-list) 3382 (let (success-list)
@@ -3860,8 +3858,7 @@ since it was last visited."
3860 (with-temp-buffer 3858 (with-temp-buffer
3861 (insert-file-contents fn) 3859 (insert-file-contents fn)
3862 (goto-char (point-min)) 3860 (goto-char (point-min))
3863 (re-search-forward regexp nil t)))) 3861 (re-search-forward regexp nil t)))))))
3864 )))
3865 "matching file"))) 3862 "matching file")))
3866 3863
3867(defun dired-flag-files-regexp (regexp) 3864(defun dired-flag-files-regexp (regexp)
@@ -4406,10 +4403,10 @@ Ask means pop up a menu for the user to select one of copy, move or link."
4406 (desktop-file-name dired-directory dirname)) 4403 (desktop-file-name dired-directory dirname))
4407 ;; Subdirectories in `dired-subdir-alist'. 4404 ;; Subdirectories in `dired-subdir-alist'.
4408 (cdr 4405 (cdr
4409 (nreverse 4406 (nreverse
4410 (mapcar 4407 (mapcar
4411 (lambda (f) (desktop-file-name (car f) dirname)) 4408 (lambda (f) (desktop-file-name (car f) dirname))
4412 dired-subdir-alist))))) 4409 dired-subdir-alist)))))
4413 4410
4414(defun dired-restore-desktop-buffer (_file-name 4411(defun dired-restore-desktop-buffer (_file-name
4415 _buffer-name 4412 _buffer-name