aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-02-18 20:12:23 -0800
committerGlenn Morris2011-02-18 20:12:23 -0800
commit203784ccb151e37d6b1e1306b1f3a63d3b6d66f3 (patch)
tree1bc1b7b28184ecf3bfad20df34d53c8ca3b3eebc
parent30abce25f2c78c46994f22d60295c40578097b76 (diff)
downloademacs-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/ChangeLog3
-rw-r--r--doc/misc/dired-x.texi4
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/dired-x.el13
-rw-r--r--lisp/dired.el10
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 @@
12011-02-19 Glenn Morris <rgm@gnu.org> 12011-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
52011-02-18 Glenn Morris <rgm@gnu.org> 62011-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
193and from @file{dired-aux.el} the function @code{dired-read-shell-command}. 191and from @file{dired-aux.el} the function @code{dired-read-shell-command}.
194In addition, once @file{dired.el} is loaded, @code{dired-add-entry} 192In addition, once @file{dired.el} is loaded, @code{dired-add-entry}
195obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active. 193obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active.
194Similarly, @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 @@
12011-02-19 Glenn Morris <rgm@gnu.org> 12011-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.
1415Point assumed at beginning of new subdir line.
1416You 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. 2552Point 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.