aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-03-26 15:17:50 +0000
committerStefan Monnier2004-03-26 15:17:50 +0000
commitff3d76aafc1e59374432914b8087097c886d7292 (patch)
treef17c09df80bf9f78459cf8590c813d618be302db
parent7d0b18b11a00ccd546bd4b902a990cf66cf19835 (diff)
downloademacs-ff3d76aafc1e59374432914b8087097c886d7292.tar.gz
emacs-ff3d76aafc1e59374432914b8087097c886d7292.zip
(dired-mode): Use run-mode-hooks.
(dired-move-to-end-of-filename): Use match-string.
-rw-r--r--lisp/dired.el19
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 515daa03f27..29ee70367d5 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1323,7 +1323,7 @@ Keybindings:
1323 (set (make-local-variable 'font-lock-defaults) 1323 (set (make-local-variable 'font-lock-defaults)
1324 '(dired-font-lock-keywords t nil nil beginning-of-line)) 1324 '(dired-font-lock-keywords t nil nil beginning-of-line))
1325 (dired-sort-other dired-actual-switches t) 1325 (dired-sort-other dired-actual-switches t)
1326 (run-hooks 'dired-mode-hook) 1326 (run-mode-hooks 'dired-mode-hook)
1327 (when (featurep 'x-dnd) 1327 (when (featurep 'x-dnd)
1328 (make-variable-buffer-local 'x-dnd-test-function) 1328 (make-variable-buffer-local 'x-dnd-test-function)
1329 (make-variable-buffer-local 'x-dnd-protocol-alist) 1329 (make-variable-buffer-local 'x-dnd-protocol-alist)
@@ -1720,12 +1720,9 @@ regardless of the language.")
1720 (string-match 1720 (string-match
1721 "[xst]" ;; execute bit set anywhere? 1721 "[xst]" ;; execute bit set anywhere?
1722 (concat 1722 (concat
1723 (buffer-substring (match-beginning 2) 1723 (match-string 2)
1724 (match-end 2)) 1724 (match-string 3)
1725 (buffer-substring (match-beginning 3) 1725 (match-string 4)))))
1726 (match-end 3))
1727 (buffer-substring (match-beginning 4)
1728 (match-end 4))))))
1729 (or no-error (error "No file on this line")))) 1726 (or no-error (error "No file on this line"))))
1730 ;; Move point to end of name: 1727 ;; Move point to end of name:
1731 (if symlink 1728 (if symlink
@@ -2897,10 +2894,10 @@ With a prefix argument you can edit the current listing switches instead."
2897 (concat result (substring string start)))) 2894 (concat result (substring string start))))
2898 2895
2899(defun dired-sort-other (switches &optional no-revert) 2896(defun dired-sort-other (switches &optional no-revert)
2900 ;; Specify new ls SWITCHES for current dired buffer. Values matching 2897 "Specify new ls SWITCHES for current dired buffer.
2901 ;; `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' set the 2898Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp'
2902 ;; minor mode accordingly, others appear literally in the mode line. 2899set the minor mode accordingly, others appear literally in the mode line.
2903 ;; With optional second arg NO-REVERT, don't refresh the listing afterwards. 2900With optional second arg NO-REVERT, don't refresh the listing afterwards."
2904 (dired-sort-R-check switches) 2901 (dired-sort-R-check switches)
2905 (setq dired-actual-switches switches) 2902 (setq dired-actual-switches switches)
2906 (if (eq major-mode 'dired-mode) (dired-sort-set-modeline)) 2903 (if (eq major-mode 'dired-mode) (dired-sort-set-modeline))