diff lisp/dired.el @ 83085:c0e839b60d0b

Merged in changes from CVS HEAD Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-173 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-174 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-125
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 28 Mar 2004 06:08:38 +0000
parents ab1f2de47b6b
children 7b96c8a4ad75
line wrap: on
line diff
--- a/lisp/dired.el	Fri Mar 26 04:35:08 2004 +0000
+++ b/lisp/dired.el	Sun Mar 28 06:08:38 2004 +0000
@@ -1227,8 +1227,6 @@
 ;; Dired mode is suitable only for specially formatted data.
 (put 'dired-mode 'mode-class 'special)
 
-(defvar buffer-stale-function)
-
 (defun dired-mode (&optional dirname switches)
   "\
 Mode for \"editing\" directory listings.
@@ -1323,7 +1321,7 @@
   (set (make-local-variable 'font-lock-defaults)
        '(dired-font-lock-keywords t nil nil beginning-of-line))
   (dired-sort-other dired-actual-switches t)
-  (run-hooks 'dired-mode-hook)
+  (run-mode-hooks 'dired-mode-hook)
   (when (featurep 'x-dnd)
     (make-variable-buffer-local 'x-dnd-test-function)
     (make-variable-buffer-local 'x-dnd-protocol-alist)
@@ -1720,12 +1718,9 @@
 				(string-match
 				 "[xst]" ;; execute bit set anywhere?
 				 (concat
-				  (buffer-substring (match-beginning 2)
-						    (match-end 2))
-				  (buffer-substring (match-beginning 3)
-						    (match-end 3))
-				  (buffer-substring (match-beginning 4)
-						    (match-end 4))))))
+				  (match-string 2)
+				  (match-string 3)
+				  (match-string 4)))))
 	    (or no-error (error "No file on this line"))))
 	;; Move point to end of name:
 	(if symlink
@@ -2897,10 +2892,10 @@
     (concat result (substring string start))))
 
 (defun dired-sort-other (switches &optional no-revert)
-  ;; Specify new ls SWITCHES for current dired buffer.  Values matching
-  ;; `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' set the
-  ;; minor mode accordingly, others appear literally in the mode line.
-  ;; With optional second arg NO-REVERT, don't refresh the listing afterwards.
+  "Specify new ls SWITCHES for current dired buffer.
+Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp'
+set the minor mode accordingly, others appear literally in the mode line.
+With optional second arg NO-REVERT, don't refresh the listing afterwards."
   (dired-sort-R-check switches)
   (setq dired-actual-switches switches)
   (if (eq major-mode 'dired-mode) (dired-sort-set-modeline))