emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103346: Merge dired-x's redefinition


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103346: Merge dired-x's redefinition of dired-initial-position into the main version.
Date: Fri, 18 Feb 2011 20:12:23 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103346
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2011-02-18 20:12:23 -0800
message:
  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.
modified:
  doc/misc/ChangeLog
  doc/misc/dired-x.texi
  lisp/ChangeLog
  lisp/dired-x.el
  lisp/dired.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2011-02-19 03:53:35 +0000
+++ b/doc/misc/ChangeLog        2011-02-19 04:12:23 +0000
@@ -1,6 +1,7 @@
 2011-02-19  Glenn Morris  <address@hidden>
 
-       * 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  <address@hidden>
 

=== modified file 'doc/misc/dired-x.texi'
--- a/doc/misc/dired-x.texi     2011-02-19 03:53:35 +0000
+++ b/doc/misc/dired-x.texi     2011-02-19 04:12:23 +0000
@@ -185,14 +185,14 @@
 @code{dired-clean-up-after-deletion}
 @item
 @code{dired-find-buffer-nocreate}
address@hidden
address@hidden
 @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

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-02-19 03:53:35 +0000
+++ b/lisp/ChangeLog    2011-02-19 04:12:23 +0000
@@ -1,5 +1,9 @@
 2011-02-19  Glenn Morris  <address@hidden>
 
+       * 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.

=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el   2011-02-19 03:53:35 +0000
+++ b/lisp/dired-x.el   2011-02-19 04:12:23 +0000
@@ -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 @@
 ;;           (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)))
-
 
 ;; Does anyone use this? - lrd 6/29/93.
 ;; Apparently people do use it. - lrd 12/22/97.

=== modified file 'lisp/dired.el'
--- a/lisp/dired.el     2011-02-17 22:57:38 +0000
+++ b/lisp/dired.el     2011-02-19 04:12:23 +0000
@@ -2544,11 +2544,15 @@
         ;; 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)))
 
 ;; These are hooks which make tree dired work.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]