diff options
author | Glenn Morris <rgm@gnu.org> | 2011-03-01 23:44:33 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-01 23:44:33 -0800 |
commit | 5dedeef28db7d08778cc90b78f53ef2df021b575 (patch) | |
tree | e4d51d68f2eb615d252c8f01c5c48755de758316 /lisp/dired-x.el | |
parent | 257219bd2eeebc6590fc075e74903c1d4cc43414 (diff) |
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.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r-- | lisp/dired-x.el | 12 |
1 files changed, 8 insertions, 4 deletions
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." (dired-omit-mode) (dired-goto-file file))))))) +;;;###autoload (defun dired-jump-other-window (&optional file-name) "Like \\[dired-jump] (`dired-jump') but in other window." (interactive @@ -704,12 +705,15 @@ Also useful for `auto-mode-alist' like this: (dired-current-directory) default-directory))) "Alist of major modes and their opinion on `default-directory'. -This is given as a Lisp expression to evaluate. A resulting value of -nil is ignored in favor of `default-directory'.") +Each element has the form (MAJOR . EXPRESSION). +The function `dired-default-directory' evaluates EXPRESSION to +determine a default directory.") + +(put 'dired-default-directory-alist 'risky-local-variable t) ; gets eval'd (defun dired-default-directory () - "Usage like variable `default-directory'. -Knows about the special cases in variable `dired-default-directory-alist'." + "Return the `dired-default-directory-alist' entry for the current major-mode. +If none, return `default-directory'." (or (eval (cdr (assq major-mode dired-default-directory-alist))) default-directory)) |