summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-03-01 23:59:02 -0800
committerGlenn Morris <rgm@gnu.org>2011-03-01 23:59:02 -0800
commit2777ccbfdea689327c54278ff6b5303c1fe8bac0 (patch)
treeedef7c297d22c91070aa9fb8cdf07a22fa03c0fd /lisp/dired-x.el
parent5dedeef28db7d08778cc90b78f53ef2df021b575 (diff)
downloademacs-2777ccbfdea689327c54278ff6b5303c1fe8bac0.tar.gz
emacs-2777ccbfdea689327c54278ff6b5303c1fe8bac0.tar.bz2
emacs-2777ccbfdea689327c54278ff6b5303c1fe8bac0.zip
Make dired-default-directory obsolete.
As far as I can tell, it was never used outside of dired-smart-shell-command. It doesn't seem worth keeping around as a separate function. * lisp/dired-x.el (dired-default-directory-alist, dired-default-directory): Mark as obsolete. (dired-smart-shell-command): Just call dired-current-directory. * doc/misc/dired-x.texi (Multiple Dired Directories): Remove mentions of dired-default-directory-alist and dired-default-directory. Move dired-smart-shell-command here... (Miscellaneous Commands): ... from here.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index e3ba03e318e..a049bd00ccd 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -710,6 +710,8 @@ The function `dired-default-directory' evaluates EXPRESSION to
determine a default directory.")
(put 'dired-default-directory-alist 'risky-local-variable t) ; gets eval'd
+(make-obsolete-variable 'dired-default-directory-alist
+ "this feature is due to be removed." "24.1")
(defun dired-default-directory ()
"Return the `dired-default-directory-alist' entry for the current major-mode.
@@ -717,6 +719,12 @@ If none, return `default-directory'."
(or (eval (cdr (assq major-mode dired-default-directory-alist)))
default-directory))
+;; It looks like this was intended to be something of a "general" feature,
+;; but it only ever seems to have been used in dired-smart-shell-command,
+;; and does not seem worth keeping around (?).
+(make-obsolete 'dired-default-directory
+ "this feature is due to be removed." "24.1")
+
(defun dired-smart-shell-command (command &optional output-buffer error-buffer)
"Like function `shell-command', but in the current Virtual Dired directory."
(interactive
@@ -727,7 +735,9 @@ If none, return `default-directory'."
((eq major-mode 'dired-mode) (dired-get-filename t t))))
current-prefix-arg
shell-command-default-error-buffer))
- (let ((default-directory (dired-default-directory)))
+ (let ((default-directory (if (eq major-mode 'dired-mode)
+ (dired-current-directory)
+ default-directory)))
(shell-command command output-buffer error-buffer)))