;;; dired.el --- directory-browsing commands
-;; Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 86, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Maintainer: FSF
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;;###autoload
(defvar dired-chown-program
- (if (memq system-type '(hpux dgux usg-unix-v irix linux))
- "chown" "/etc/chown")
+ (if (memq system-type '(hpux dgux usg-unix-v irix linux gnu/linux))
+ "chown"
+ (if (file-exists-p "/usr/sbin/chown")
+ "/usr/sbin/chown"
+ "/etc/chown"))
"Name of chown command (usually `chown' or `/etc/chown').")
(defvar dired-chmod-program
(setq dirname dir-or-list))
(setq dirname (abbreviate-file-name
(expand-file-name (directory-file-name dirname))))
+ (if find-file-visit-truename
+ (setq dirname (file-truename dirname)))
(if (file-directory-p dirname)
(setq dirname (file-name-as-directory dirname)))
(if (consp dir-or-list)
(and (= (car (nth 5 attributes)) (car modtime))
(= (nth 1 (nth 5 attributes)) (cdr modtime)))))
nil
- (message
- (substitute-command-keys
- "Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
+ (message "%s"
+ (substitute-command-keys
+ "Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
;; Else a new buffer
(setq default-directory
(if (file-directory-p dirname)
(define-key map [menu-bar immediate]
(cons "Immediate" (make-sparse-keymap "Immediate")))
+ (define-key map [menu-bar immediate revert-buffer]
+ '("Update Buffer" . revert-buffer))
+
+ (define-key map [menu-bar immediate dashes]
+ '("--"))
+
(define-key map [menu-bar immediate backup-diff]
'("Compare with Backup" . dired-backup-diff))
(define-key map [menu-bar immediate diff]
;; some ls -b don't escape quotes, argh!
;; This is not needed for GNU ls, though.
(or (dired-string-replace-match
- "\\([^\\]\\)\"" file "\\1\\\\\"")
+ "\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t)
file)
"\"")))))
(if (eq localp 'no-dir)