emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103476: Make dired-default-directory


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103476: Make dired-default-directory obsolete.
Date: Tue, 01 Mar 2011 23:59:02 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103476
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2011-03-01 23:59:02 -0800
message:
  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.
modified:
  doc/misc/ChangeLog
  doc/misc/dired-x.texi
  lisp/ChangeLog
  lisp/dired-x.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2011-03-02 06:07:30 +0000
+++ b/doc/misc/ChangeLog        2011-03-02 07:59:02 +0000
@@ -1,3 +1,10 @@
+2011-03-02  Glenn Morris  <address@hidden>
+
+       * 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.
+
 2011-03-02  Paul Eggert  <address@hidden>
 
        * texinfo.tex: Update to version 2011-02-24.09.

=== modified file 'doc/misc/dired-x.texi'
--- a/doc/misc/dired-x.texi     2011-03-02 04:13:57 +0000
+++ b/doc/misc/dired-x.texi     2011-03-02 07:59:02 +0000
@@ -867,24 +867,12 @@
 directory instead of @code{default-directory}, e.g., @code{find-file} and
 @code{compile}.
 
-A general mechanism is provided for special handling of the working
-directory in special major modes:
-
address@hidden @code
address@hidden dired-default-directory-alist
address@hidden dired-default-directory-alist
-Default: @code{((dired-mode . (dired-current-directory)))}
-
-Alist of major modes and their notion of @code{default-directory}, as a
-Lisp expression to evaluate.  A resulting value of @code{nil} is ignored
-in favor of @code{default-directory}.
-
address@hidden dired-default-directory
address@hidden dired-default-directory
-Use this function like you would use the variable
address@hidden, except that @code{dired-default-directory}
-also consults the variable @code{dired-default-directory-alist}.
address@hidden table
address@hidden dired-smart-shell-command
address@hidden shell-command
address@hidden M-!
+The command @code{dired-smart-shell-command}, bound to @kbd{M-!} in
+Dired buffers, is like @code{shell-command}, but it runs with
address@hidden bound to the current Dired directory.
 
 @node Find File At Point, Miscellaneous Commands, Multiple Dired Directories, 
Top
 @section Find File At Point
@@ -993,12 +981,6 @@
 @end table
 
 @table @code
address@hidden dired-smart-shell-command
address@hidden dired-smart-shell-command
address@hidden shell-command
address@hidden M-!
-Like function @code{shell-command}, but in the current Dired directory.
-Bound to @kbd{M-!} in Dired buffers.
 
 @item dired-jump
 @findex dired-jump

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-02 07:44:33 +0000
+++ b/lisp/ChangeLog    2011-03-02 07:59:02 +0000
@@ -1,5 +1,9 @@
 2011-03-02  Glenn Morris  <address@hidden>
 
+       * dired-x.el (dired-default-directory-alist, dired-default-directory):
+       Mark as obsolete.
+       (dired-smart-shell-command): Just call dired-current-directory.
+
        * dired-x.el (dired-jump-other-window): Add autoload.
        (dired-default-directory-alist, dired-default-directory): Doc fixes.
        (dired-default-directory-alist): Mark as risky.

=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el   2011-03-02 07:44:33 +0000
+++ b/lisp/dired-x.el   2011-03-02 07:59:02 +0000
@@ -710,6 +710,8 @@
 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 @@
   (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 @@
                         ((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)))
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]