Merge dired-x's redefinition of dired-initial-position into the main version.
authorGlenn Morris <rgm@gnu.org>
Sat, 19 Feb 2011 04:12:23 +0000 (20:12 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 19 Feb 2011 04:12:23 +0000 (20:12 -0800)
* 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.

doc/misc/ChangeLog
doc/misc/dired-x.texi
lisp/ChangeLog
lisp/dired-x.el
lisp/dired.el

index c116186..882eec3 100644 (file)
@@ -1,6 +1,7 @@
 2011-02-19  Glenn Morris  <rgm@gnu.org>
 
-       * dired-x.texi (Technical Details): No longer redefines dired-add-entry.
+       * dired-x.texi (Technical Details): No longer redefines dired-add-entry,
+       or dired-initial-position.
 
 2011-02-18  Glenn Morris  <rgm@gnu.org>
 
index 931af07..9f7b40c 100644 (file)
@@ -185,14 +185,14 @@ from @file{dired.el}
 @code{dired-clean-up-after-deletion}
 @item
 @code{dired-find-buffer-nocreate}
-@item
-@code{dired-initial-position}
 @end itemize
 
 @noindent
 and from @file{dired-aux.el} the function @code{dired-read-shell-command}.
 In addition, once @file{dired.el} is loaded, @code{dired-add-entry}
 obeys Dired Omit mode (@pxref{Omitting Files in Dired}), if it is active.
+Similarly, @code{dired-initial-position} obeys @code{dired-find-subdir}
+(@pxref{Miscellaneous Commands}).
 
 @node Installation, Omitting Files in Dired, Introduction, Top
 @chapter Installation
index 8e54788..824f5f2 100644 (file)
@@ -1,5 +1,9 @@
 2011-02-19  Glenn Morris  <rgm@gnu.org>
 
+       * dired-x.el (dired-initial-position): Merge into dired.el's version.
+       * dired.el (dired-initial-position): Merge dired-x's version here.
+       (dired-find-subdir): Declare.
+
        * dired-x.el (dired-omit-new-add-entry): Merge into dired-add-entry.
        * dired-aux.el (dired-add-entry): Give it a doc-string.
        Merge dired-x's dired-omit handling here.
index 0bdf495..901614e 100644 (file)
@@ -48,8 +48,7 @@
 ;; User customization: M-x customize-group RET dired-x RET.
 
 ;; When loaded this code redefines the following functions of GNU Emacs:
-;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate,
-;; and dired-initial-position.
+;; From dired.el: dired-clean-up-after-deletion, dired-find-buffer-nocreate.
 ;; From dired-aux.el: dired-read-shell-command.
 
 ;; *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."
 ;;           (setq dired-buffers (delq elt dired-buffers)))))
 ;;     result))
 
-;; REDEFINE.
-;; Redefines dired.el's version of `dired-initial-position'
-(defun dired-initial-position (dirname)
-  "Where point should go in a new listing of DIRNAME.
-Point assumed at beginning of new subdir line.
-You may redefine this function as you wish, e.g. like in `dired-x.el'."
-  (end-of-line)
-  (if dired-find-subdir (dired-goto-subdir dirname)) ; new
-  (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))
-
 \f
 ;; Does anyone use this? - lrd 6/29/93.
 ;; Apparently people do use it. - lrd 12/22/97.
index 22d9f91..ab327d9 100644 (file)
@@ -2544,11 +2544,15 @@ instead of `dired-actual-switches'."
         ;; return value of point (i.e., FOUND):
         (goto-char found))))
 
+(defvar dired-find-subdir)
+
+;; FIXME document whatever dired-x is doing.
 (defun dired-initial-position (dirname)
-  ;; Where point should go in a new listing of DIRNAME.
-  ;; Point assumed at beginning of new subdir line.
-  ;; You may redefine this function as you wish, e.g. like in dired-x.el.
+  "Where point should go in a new listing of DIRNAME.
+Point assumed at beginning of new subdir line."
   (end-of-line)
+  (and (featurep 'dired-x) dired-find-subdir
+       (dired-goto-subdir dirname))
   (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))
 \f
 ;; These are hooks which make tree dired work.