diff options
| author | Glenn Morris | 2011-02-18 20:12:23 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-02-18 20:12:23 -0800 |
| commit | 203784ccb151e37d6b1e1306b1f3a63d3b6d66f3 (patch) | |
| tree | 1bc1b7b28184ecf3bfad20df34d53c8ca3b3eebc | |
| parent | 30abce25f2c78c46994f22d60295c40578097b76 (diff) | |
| download | emacs-203784ccb151e37d6b1e1306b1f3a63d3b6d66f3.tar.gz emacs-203784ccb151e37d6b1e1306b1f3a63d3b6d66f3.zip | |
Merge dired-x's redefinition of dired-initial-position into the main version.
* lisp/dired-x.el (dired-initial-position): Merge into dired.el's version.
* lisp/dired.el (dired-initial-position): Merge dired-x's version here.
(dired-find-subdir): Declare.
* doc/misc/dired-x.texi (Technical Details):
No longer redefines dired-initial-position.
| -rw-r--r-- | doc/misc/ChangeLog | 3 | ||||
| -rw-r--r-- | doc/misc/dired-x.texi | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/dired-x.el | 13 | ||||
| -rw-r--r-- | lisp/dired.el | 10 |
5 files changed, 16 insertions, 18 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c11618649da..882eec34193 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | 2011-02-19 Glenn Morris <rgm@gnu.org> | 1 | 2011-02-19 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * dired-x.texi (Technical Details): No longer redefines dired-add-entry. | 3 | * dired-x.texi (Technical Details): No longer redefines dired-add-entry, |
| 4 | or dired-initial-position. | ||
| 4 | 5 | ||
| 5 | 2011-02-18 Glenn Morris <rgm@gnu.org> | 6 | 2011-02-18 Glenn Morris <rgm@gnu.org> |
| 6 | 7 | ||
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi index 931af07be4e..9f7b40ceb58 100644 --- a/doc/misc/dired-x.texi +++ b/doc/misc/dired-x.texi | |||
| @@ -185,14 +185,14 @@ from @file{dired.el} | |||
| 185 | @code{dired-clean-up-after-deletion} | 185 | @code{dired-clean-up-after-deletion} |
| 186 | @item | 186 | @item |
| 187 | @code{dired-find-buffer-nocreate} | 187 | @code{dired-find-buffer-nocreate} |
| 188 | @item | ||
| 189 | @code{dired-initial-position} | ||
| 190 | @end itemize | 188 | @end itemize |
| 191 | 189 | ||
| 192 | @noindent | 190 | @noindent |
| 193 | and from @file{dired-aux.el} the function @code{dired-read-shell-command}. | 191 | and from @file{dired-aux.el} the function @code{dired-read-shell-command}. |
| 194 | In addition, once @file{dired.el} is loaded, @code{dired-add-entry} | 192 | In addition, once @file{dired.el} is loaded, @code{dired-add-entry} |
| 195 | obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active. | 193 | obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active. |
| 194 | Similarly, @code{dired-initial-position} obeys @code{dired-find-subdir} | ||
| 195 | (@pxref{Miscellaneous Commands}). | ||
| 196 | 196 | ||
| 197 | @node Installation, Omitting Files in Dired, Introduction, Top | 197 | @node Installation, Omitting Files in Dired, Introduction, Top |
| 198 | @chapter Installation | 198 | @chapter Installation |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e54788610e..824f5f24d06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2011-02-19 Glenn Morris <rgm@gnu.org> | 1 | 2011-02-19 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * dired-x.el (dired-initial-position): Merge into dired.el's version. | ||
| 4 | * dired.el (dired-initial-position): Merge dired-x's version here. | ||
| 5 | (dired-find-subdir): Declare. | ||
| 6 | |||
| 3 | * dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry. | 7 | * dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry. |
| 4 | * dired-aux.el (dired-add-entry): Give it a doc-string. | 8 | * dired-aux.el (dired-add-entry): Give it a doc-string. |
| 5 | Merge dired-x's dired-omit handling here. | 9 | Merge dired-x's dired-omit handling here. |
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 0bdf4950a58..901614e49d0 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -48,8 +48,7 @@ | |||
| 48 | ;; User customization: M-x customize-group RET dired-x RET. | 48 | ;; User customization: M-x customize-group RET dired-x RET. |
| 49 | 49 | ||
| 50 | ;; When loaded this code redefines the following functions of GNU Emacs: | 50 | ;; When loaded this code redefines the following functions of GNU Emacs: |
| 51 | ;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate, | 51 | ;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate. |
| 52 | ;; and dired-initial-position. | ||
| 53 | ;; From dired-aux.el: dired-read-shell-command. | 52 | ;; From dired-aux.el: dired-read-shell-command. |
| 54 | 53 | ||
| 55 | ;; *Please* see the `dired-x' info pages for more details. | 54 | ;; *Please* see the `dired-x' info pages for more details. |
| @@ -1408,16 +1407,6 @@ Considers buffers closer to the car of `buffer-list' to be more recent." | |||
| 1408 | ;; (setq dired-buffers (delq elt dired-buffers))))) | 1407 | ;; (setq dired-buffers (delq elt dired-buffers))))) |
| 1409 | ;; result)) | 1408 | ;; result)) |
| 1410 | 1409 | ||
| 1411 | ;; REDEFINE. | ||
| 1412 | ;; Redefines dired.el's version of `dired-initial-position' | ||
| 1413 | (defun dired-initial-position (dirname) | ||
| 1414 | "Where point should go in a new listing of DIRNAME. | ||
| 1415 | Point assumed at beginning of new subdir line. | ||
| 1416 | You may redefine this function as you wish, e.g. like in `dired-x.el'." | ||
| 1417 | (end-of-line) | ||
| 1418 | (if dired-find-subdir (dired-goto-subdir dirname)) ; new | ||
| 1419 | (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) | ||
| 1420 | |||
| 1421 | 1410 | ||
| 1422 | ;; Does anyone use this? - lrd 6/29/93. | 1411 | ;; Does anyone use this? - lrd 6/29/93. |
| 1423 | ;; Apparently people do use it. - lrd 12/22/97. | 1412 | ;; Apparently people do use it. - lrd 12/22/97. |
diff --git a/lisp/dired.el b/lisp/dired.el index 22d9f91648c..ab327d9afbc 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2544,11 +2544,15 @@ instead of `dired-actual-switches'." | |||
| 2544 | ;; return value of point (i.e., FOUND): | 2544 | ;; return value of point (i.e., FOUND): |
| 2545 | (goto-char found)))) | 2545 | (goto-char found)))) |
| 2546 | 2546 | ||
| 2547 | (defvar dired-find-subdir) | ||
| 2548 | |||
| 2549 | ;; FIXME document whatever dired-x is doing. | ||
| 2547 | (defun dired-initial-position (dirname) | 2550 | (defun dired-initial-position (dirname) |
| 2548 | ;; Where point should go in a new listing of DIRNAME. | 2551 | "Where point should go in a new listing of DIRNAME. |
| 2549 | ;; Point assumed at beginning of new subdir line. | 2552 | Point assumed at beginning of new subdir line." |
| 2550 | ;; You may redefine this function as you wish, e.g. like in dired-x.el. | ||
| 2551 | (end-of-line) | 2553 | (end-of-line) |
| 2554 | (and (featurep 'dired-x) dired-find-subdir | ||
| 2555 | (dired-goto-subdir dirname)) | ||
| 2552 | (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) | 2556 | (if dired-trivial-filenames (dired-goto-next-nontrivial-file))) |
| 2553 | 2557 | ||
| 2554 | ;; These are hooks which make tree dired work. | 2558 | ;; These are hooks which make tree dired work. |