Mercurial > hg > xemacs-beta
diff lisp/efs/dired.el @ 40:7e54bd776075 r19-15b103
Import from CVS: tag r19-15b103
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:54:25 +0200 |
parents | 4103f0995bd7 |
children | 8b8b7f3559a2 |
line wrap: on
line diff
--- a/lisp/efs/dired.el Mon Aug 13 08:54:02 2007 +0200 +++ b/lisp/efs/dired.el Mon Aug 13 08:54:25 2007 +0200 @@ -92,9 +92,24 @@ ((< ver 18) (error "dired does not work with emacs version %s" emacs-version)))) -;; Load default-dir last, because we want its interactive specs. -(require 'default-dir) - +;; We duplicate default-dir stuff to avoid its overwrites unless +;; they are explicitly requested. + +(defvar default-directory-function nil + "A function to call to compute the default-directory for the current buffer. +If this is nil, the function default-directory will return the value of the +variable default-directory. +Buffer local.") +(make-variable-buffer-local 'default-directory-function) + +(defun default-directory () + " Returns the default-directory for the current buffer. +Will use the variable default-directory-function if it non-nil." + (if default-directory-function + (funcall default-directory-function) + (if (string-match "Lucid" emacs-version) + (abbreviate-file-name default-directory t) + (abbreviate-file-name default-directory)))) ;;;;---------------------------------------------------------------- ;;;; Customizable variables @@ -143,7 +158,7 @@ For example: - \(setq dired-compresssion-method-alist + \(setq dired-compression-method-alist \(cons '\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\) \"-f\"\) dired-compression-method-alist\)\) => \(\(frobnicate \".frob\" \(\"frob\"\) \(\"frob\" \"-d\"\)\) @@ -207,7 +222,7 @@ ;;;###autoload (defvar dired-chown-program (if (memq system-type '(hpux dgux usg-unix-v)) "chown" "/etc/chown") - "*Name of chown command (usully `chown' or `/etc/chown').") + "*Name of chown command (usually `chown' or `/etc/chown').") ;;;###autoload (defvar dired-gnutar-program nil @@ -3776,7 +3791,7 @@ Optional CHAR indicates a marker character to use." (let (buffer-read-only) (if (memq (or char dired-marker-char) '(?\ ?\n ?\r)) - (error "Invalid marker charcter %c" dired-marker-char)) + (error "Invalid marker character %c" dired-marker-char)) (or char (setq char dired-marker-char)) (dired-repeat-over-lines arg