aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-03-01 23:44:33 -0800
committerGlenn Morris2011-03-01 23:44:33 -0800
commit5dedeef28db7d08778cc90b78f53ef2df021b575 (patch)
treee4d51d68f2eb615d252c8f01c5c48755de758316
parent257219bd2eeebc6590fc075e74903c1d4cc43414 (diff)
downloademacs-5dedeef28db7d08778cc90b78f53ef2df021b575.tar.gz
emacs-5dedeef28db7d08778cc90b78f53ef2df021b575.zip
dired-x trivia.
* lisp/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.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/dired-x.el12
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1f1dbf69fe5..4534cde3dcf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12011-03-02 Glenn Morris <rgm@gnu.org> 12011-03-02 Glenn Morris <rgm@gnu.org>
2 2
3 * dired-x.el (dired-jump-other-window): Add autoload.
4 (dired-default-directory-alist, dired-default-directory): Doc fixes.
5 (dired-default-directory-alist): Mark as risky.
6
3 * dired-x.el (dired-omit-here-always): Make it obsolete. 7 * dired-x.el (dired-omit-here-always): Make it obsolete.
4 8
52011-03-02 Chong Yidong <cyd@stupidchicken.com> 92011-03-02 Chong Yidong <cyd@stupidchicken.com>
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 81f77b48289..e3ba03e318e 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -436,6 +436,7 @@ move to its line in dired."
436 (dired-omit-mode) 436 (dired-omit-mode)
437 (dired-goto-file file))))))) 437 (dired-goto-file file)))))))
438 438
439;;;###autoload
439(defun dired-jump-other-window (&optional file-name) 440(defun dired-jump-other-window (&optional file-name)
440 "Like \\[dired-jump] (`dired-jump') but in other window." 441 "Like \\[dired-jump] (`dired-jump') but in other window."
441 (interactive 442 (interactive
@@ -704,12 +705,15 @@ Also useful for `auto-mode-alist' like this:
704 (dired-current-directory) 705 (dired-current-directory)
705 default-directory))) 706 default-directory)))
706 "Alist of major modes and their opinion on `default-directory'. 707 "Alist of major modes and their opinion on `default-directory'.
707This is given as a Lisp expression to evaluate. A resulting value of 708Each element has the form (MAJOR . EXPRESSION).
708nil is ignored in favor of `default-directory'.") 709The function `dired-default-directory' evaluates EXPRESSION to
710determine a default directory.")
711
712(put 'dired-default-directory-alist 'risky-local-variable t) ; gets eval'd
709 713
710(defun dired-default-directory () 714(defun dired-default-directory ()
711 "Usage like variable `default-directory'. 715 "Return the `dired-default-directory-alist' entry for the current major-mode.
712Knows about the special cases in variable `dired-default-directory-alist'." 716If none, return `default-directory'."
713 (or (eval (cdr (assq major-mode dired-default-directory-alist))) 717 (or (eval (cdr (assq major-mode dired-default-directory-alist)))
714 default-directory)) 718 default-directory))
715 719