Commits

Anonymous committed f9d7245

Experimental Dired 7.10, package version 1.10.

Comments (0)

Files changed (23)

-1998-12-09  SL Baur  <steve@altair.xemacs.org>
+2001-03-31  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
-	* Makefile.dired: Remove conflicting install: target.
+	* Makefile.dired: Added IGNORE_CUSTOM variable to control inclusion
+ 	of cust-stub.el.
 
-1998-05-05  SL Baur  <steve@altair.xemacs.org>
+	* cust-stub.el: Added, courtesy of Noah Friedman
+	<friedman@prep.ai.mit.edu>.
 
-	* dired-xemacs.el (dired-install-menubar): Use easy-menu for
-	adding menus to menubar.
+	* dired.el (dired-recursive-delete-directory): Hopefully make it
+	less Unix-dependent.
+
+	* Makefile (REQUIRES): Add prog-modes dependency.
+
+	* diff.el: Remove diff parsing code, now uses Stefan Monnier's
+	diff-mode which is far more robust.
+	(diff): Properly support `diff-do-narrow'.
+
+2000-06-14  Masatake YAMATO" <masata-y@is.aist-nara.ac.jp>
+
+	* dired.el (dired-compression-method-alist): Add bzip2 support.
+
+2001-03-20  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired-shell.el (dired-run-shell-command): Fix another
+	characters-and-ints-are-different-in-XEmacs bug.
+
+2000-03-10  Rodney Stromlund  <Rodney.Stromlund@wnco.com>
+
+	* dired.el (dired-find-alternate-file): Added function and bound
+	it to control return.  It replaces the dired buffer with the file
+	or directory.
+
+1999-06-28  Karl M. Hegbloom  <karlheg@debian.org>
+
+	* dired-xemacs.el (dired-move-to-permissions): New function.
+	(dired-setup-chmod-keymap): Keybindings inside permissions extents
+ 	for C-p, up, C-n, and down.  Name the keymap with the domain
+ 	(u,g,o).  Now up and down movements in the permissions will stay
+ 	in the permissions, instead of jumping to the filename.
+	(dired-permissions-arrow-move): New function.
+	(dired-activate-permissions): Set 'dired-permissions extent
+ 	property to the domain, which was stowed as the keymap name.
+	(dired-mode-map): Define `home' to move to the permissions when
+ 	`dired-do-interactive-chmod' is set, or beginning of line
+ 	otherwise.  Define `end' to move to the beginning of the
+	filename.  To get to the end of the line, use C-e.
+
+1999-04-11  Masatake YAMATO  <masata-y@is.aist-nara.ac.jp>
+
+        * dired.el (dired-insert-headerline): Insert text properties.
+	 
+	* dired-xemacs.el (dired-insert-set-headerline-properties): 
+	(dired-get-headerline): 
+	(dired-insert-set-headerline-properties-internal): 
+	(dired-split-headerline): 
+	(dired-headerline-dired): 
+	(dired-headerline-dired-other-window): 
+	(dired-headerline-dired-other-frame): 
+	(dired-headerline-dired-internal): 
+	(dired-headerline-dired-by-key):
+	(dired-headerline-dired-other-window-by-key): 
+	(dired-headerline-dired-other-frame-by-key): 
+	(dired-headerline-dired-by-key-internal): New functions.
+	(dired-headerline-local-map): New key map.
+	
+	* dired-faces.el (dired-face-header): New face.
+
+1999-03-15  Ben North <north@robots.ox.ac.uk>
+
+	* dired.el (dired-unmark-all-files): Fix bug when removing a
+	specific mark.
+
+1999-03-12   Kevin Broadey <kevin.broadey@eds.com>
+
+	* dired.el (dired-re-month-and-time): Make the order of month and
+	day arbitrary.
+
+2001-03-09  Darryl Okahata <darrylo@sr.hp.com>
+
+	* dired.el (dired-insert-directory): Under XEmacs, indenting a
+	fontified region is very expensive and time-consuming.  The
+	included patch indents the dired buffer before fontifying it.  On
+	the XEmacs MS Windows port, this patch improves the speed by a
+	factor of 1.5-3X.
+
+2001-03-09  Michael Ernst <mernst@cs.washington.edu>
+
+	* dired.el (dired-omit-extensions): Doc fix.
+
+2001-03-09  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* dired-shell.el (dired-auto-shell-command-alist): defcustom'ed.
+
+1998-04-25  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* dired-shell.el (dired-default-auto-shell-command-alist): bumped
+ 	`ghostview' aside in favor of the more modern `gv', add support
+ 	for `pdf/acroread', and `lect/LecternClient' (for DEC SRC
+ 	Lectern).
+
+1998-04-08  Greg Klanderman  <greg@alphatech.com>
+
+	* dired.el (dired-pop-to-buffer): respect the user's setting of
+	temp-buffer-show-function. 
+
+2001-03-09  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired-shell.el (dired-run-shell-command): Fixed XEmacs char
+	vs. number  bug.
+
+2001-03-09  dsg@mitre.org <David S. Goldberg>
+
+	* dired-shell.el (dired-do-shell-command): Add triple C-u for dwim
+	support.
+
+2001-03-02  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired.el: 
+	* dired-cmpr.el: 
+	* dired-diff.el: 
+	* dired-grep.el: 
+	* dired-mob.el: 
+	* dired-rgxp.el: 
+	* dired-sex.el: 
+	* dired-shell.el: 
+	* dired-uu.el: 
+	* dired-vir.el: 
+	* dired-xy.el: Added auto-autoload declarations.
+
+2000-09-21  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired-faces.el: Changes 'dired groups to 'dired-faces.
+
+2000-02-28  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* diff.el (diff-temp-template): Parameterize over (temp-directory).
+
+	* dired-help.el (dired-documentation): Typo fix:
+	Switch keys for dired-previous-line and dired-next-line.
+
+	* dired-xemacs.el (dired-setup-menus): Fix typo in
+	<m11D0qG-000VqDC@held> on efs-bugs.
+
+1999-08-25  Jason Kim <jason@meta4.net>
+
+	* dired.el (dired-find-and-bury-buffer): Added function for
+	loading up a whole bunch of (marked) files into Emacs, bound to
+	C-c C-f.
+
+1999-08-16  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+	* dired-uu.el: Ditto.
+
+	* dired-shell.el: Ditto.
+
+	* dired.el: Replace "-c" where `shell-command-switch' should be
+ 	used instead.
+
+Tue Oct 19 14:46:41 1999  Noah Friedman  <friedman@splode.com>
+
+	* dired.el (dired-goto-subdir): Use = to compare the results of
+	goto-char and point.  In emacs 20.4, goto-char returns a marker if
+	its arg is a marker, and these are never eq with point.
+
+1998-08-22  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired.el, dired-help.el, LISTS: Updated mailing list addresses.
+
+1998-08-22  Noah Friedman <friedman@prep.ai.mit.edu>
+
+	* dired-fsf.el (characterp): Added.
+
+1998-08-22  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired.el (dired-next-line): Simplified.
+
+1998-03-13  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* fixup.el (load-path): Added $CUSTOMDIR.
+
+	* dired.el: GNU Emacs compatibility adjustments.
+
+	* dired-fsf.el (char-before): Added.
+
+	* diff.el: Required custom.
+
+1998-03-12  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+	* dired-faces.el (dired-face-permissions): Made them visible on a
+ 	TTY.
 
 1998-02-17  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
 
-There are several mailing lists relevant to efs.  If you wish to join
+There are several mailing lists relevant to Dired.  If you wish to join
 a list, send e-mail to their -request address.
 
-  efs-bugs@cuckoo.hpl.hp.com
+  efs-bugs@hplb.hpl.hp.com
 
-This is where all bug reports should go.  M-x efs-report-bug is the
-recommended way of sending bug reports about efs, and this will send by
-default to this address.
+This is where all bug reports should go.  M-x dired-report-bug is the
+recommended way of sending bug reports about Dired, and this will send
+by default to this address.
 
-  efs-help@cuckoo.hpl.hp.com
+  efs-help@hplb.hpl.hp.com
 
-This is where general discussions about efs should go.  For beta-testing
+This is where general discussions about Dired should go.  For beta-testing
 discussions, use efs-testers instead.
 
-  efs-testers@cuckoo.hpl.hp.com
+  efs-testers@hplb.hpl.hp.com
 
-This is where discussions about beta testing efs should go.  Bugs should
+This is where discussions about beta testing Dired should go.  Bugs should
 however be reported to efs-bugs. Patches for beta test bugs will be
 sent to this list.
 
-  efs-announce@cuckoo.hpl.hp.com
+  efs-announce@hplb.hpl.hp.com
 
 This is where announcements such as new generally available releases of efs
 should go.
 
 include Makefile.dired
 
-VERSION = 1.09
-AUTHOR_VERSION = 7.9
+VERSION = 1.10
+AUTHOR_VERSION = 7.10
 MAINTAINER = Mike Sperber <sperber@informatik.uni-tuebingen.de>
 PACKAGE = dired
 PKG_TYPE = regular
-REQUIRES = xemacs-base
+REQUIRES = xemacs-base prog-modes
 CATEGORY = libs
 
 ELCS = $(DOBJS) $(XEOBJS_DIRED) $(MULEOBJS_DIRED)
 
 include ../../XEmacs.rules
 
-GENERATED += custom-load.elc
-
 all:: $(ELCS) auto-autoloads.elc custom-load.elc
 
 srckit: srckit-std
 
-binkit: binkit-common
+binkit: binkit-sourceonly
 #
 # File:         Makefile
 # Release:      $EFS release: 1.16 $
-# Release:      $dired release: 7.9 $
+# Release:      $dired release: 7.10 $
 # Version:      $Revision$
 # RCS:
 # Description:  Makefile for byte-compiling dired (primarily) and EFS.
 #
 ###############################################################################
 
-## Installation Instructions
-############################
-# 1. Edit the configuration variables below.
-#    EMACS should be the name of the emacs program on your system.
-#    EMACS_VERSION should be the emacs version. This must be one of:
-#      18     for all versions of Emacs 18.
-#      19     for all versions of the original GNU Emacs from FSF between
-#             19.1 and 19.22, inclusive.
-#      19.23  for version 19.23 and later of the original GNU Emacs from FSF
-#      l19.11 for XEmacs 19.11 trhu 19.14
-#      x19.15 for XEmacs 19.15
-#      x20    for XEmacs 20.1 and later
-#    LISPDIR should be the directory in which you want the .elc
-#      files installed.
-#    BDIR should be the directory containing the .elc files for the
-#      byte-compiler.  Although efs byte-compiles and works with the
-#      Emacs V18 byte-compiler, it is strongly recommended to use
-#      Jamie Zawinski's V19 byte-compiler. This byte-compiler is
-#      standard with Lucid Emacs, XEmacs, and GNU Emacs V19, so in this
-#      case you can set BDIR to nothing.
-#    VMDIR should be set to the directory containing the .elc files for
-#      VM. If you aren't using VM, then set this to nothing.
-#
-# 2. To byte-compile the entire package, except for VM support (efs-vm.el),
-#    run make EMACS_VERSION, where EMACS_VERSION is the emacs version that you are
-#    compiling for.  It must be one of:
-#    18     for Emacs 18
-#    19     for the original GNU Emacs from FSF, versions 19.1 through
-#             19.22, inclusive
-#    19.23  for the original GNU Emacs from FSF, version 19.23 and later.
-#    l19.11 for Lucid XEmacs 19.11 thru 19.14
-#    x19.15 for XEmacs 19.15
-#    x20    for XEmacs 20.1 and later
-#
-#    If you have set the EMACS_VERSION variable correctly, then typing just    
-#    make will suffice.
-#
-# 3. To byte-compile everything, including VM support, run make all.
-#
-# 4. To byte-compile all the efs files, except for VM support,
-#    run make efs.
-#
-# 5. To byte-compile only the core efs files run make core.
-#
-# 6. To byte compile an efs-XXX.el file, run make XXX.
-#    This means that VM support can be compiled by running make vm.
-#
-# 7. To byte compile only dired, run make dired.
-#
-# 8. To byte-compile only efs-auto.el, for autoloading efs, run make auto.
-#
-
 ## Edit these variables according to your configuration.
 
 # Name of Emacs program
 EMACS=xemacs
-# Emacs version. This must be set to one of 18, 19, 19.23,
+# Emacs version. This must be set to one of 18, 19, 19.23, 19.34
 # l19.11, x19.15
 EMACS_VERSION=x19.15
 # Current working directory
 CWD=`pwd`
+# Load custom stubs instead of the real thing.
+# You may want to do this if your Emacs (say, GNU Emacs 19.34) supports
+# only the old custom interface, in which case EFS won't be able to
+# use customization, but at least, other software won't break.
+# IGNORE_CUSTOM=-l $(CWD)/cust-stub.el
 # Directory in which to install the lisp files
 LISPDIR=
 # Directory in which to install the info files
 BDIR=
 # Directory containing VM's .elc files.
 VMDIR=
+# Directory containing custom's .elc files.
+CUSTOMDIR=
 # Bourne shell executable, please.
 SHELL=/bin/sh
 
 GEOBJS_EFS = passwd.elc auto-save.elc \
 	 $(MULEOBJS_EFS)
 GEOBJS_DIRED = dired-fsf.elc \
-	 passwd.elc diff.elc \
+	 diff.elc \
 	 $(MULEOBJS_DIRED)
 GEOBJS = $(GEOBJS_EFS) $(GEOBJS_DIRED)
 GESRC_EFS = passwd.el auto-save.el \
 GESRC_DIRED = dired-fsf.el \
 	diff.el\
 	$(MULESRC_DIRED)
-XEOBJS_EFS = dired-faces.elc dired-xemacs.elc \
-	$(VMOBJS)
+XEOBJS_EFS = $(VMOBJS)
 XEOBJS_DIRED = dired-faces.elc dired-xemacs.elc diff.elc
 XEOBJS = $(XEOBJS_EFS) $(XEOBJS_DIRED)
-XESRC_EFS = dired-faces.el dired-xemacs.el \
-	$(VMSRC) $(MULESRC_EFS)
+XESRC_EFS = $(VMSRC) $(MULESRC_EFS)
 XESRC_DIRED = dired-faces.el dired-xemacs.el diff.el \
 	$(MULESRC_DIRED)
+XEPACKAGESRC_EFS = $(EFSSRC) efs-x19.15.el $(XESRC_EFS) $(MULESRC_EFS)
+XEPACKAGEMISC_EFS = README ChangeLog LISTS efs.texi \
+	            Makefile Makefile.efs \
+	            dumped-lisp.el package-info.in
+XEPACKAGESRC_DIRED = $(DSRC) $(XESRC_DIRED) $(MULESRC_DIRED)
+XEPACKAGEMISC_DIRED = README ChangeLog LISTS \
+	            Makefile Makefile.dired \
+	            package-info.in
+DISTSRC_EFS = $(EFSSRC) $(GESRC_EFS) $(XESRC_EFS) \
+       efs-18.el efs-19.el efs-19.23.el efs-19.34.el \
+       efs-l19.11.el efs-x19.15.el \
+       emacs-19.el fn-handler.el \
+       reporter.el fixup.el cust-stub.el
+DISTSRC_DIRED = $(DSRC) $(GESRC_DIRED) $(XESRC_DIRED) \
+	fn-handler.el \
+	reporter.el fixup.el cust-stub.el
+DISTMISC_EFS = README RELEASE INSTALL ChangeLog LISTS efs.texi \
+	       Makefile.efs
+DISTMISC_DIRED = README RELEASE INSTALL ChangeLog LISTS \
+	         Makefile.dired
 OBJS = $(DOBJS) $(EFSOBJS) $(VMOBJS) $(GEOBJS) $(XEOBJS) \
-       efs-18.elc efs-19.elc efs-19.23.elc \
+       efs-18.elc efs-19.elc efs-19.23.elc efs-19.34.elc \
        efs-l19.11.elc efs-x19.15.elc \
        emacs-19.elc fn-handler.elc \
        reporter.elc
+INFOS = efs.aux efs.cp efs.dvi efs.fn efs.info efs.ky efs.log efs.pg \
+        efs.toc efs.tp efs.vr
 
 # fixup.el is never byte-compiled.  It would do no harm, but be a waste
 # of time.
 .SUFFIXES: .elc .el .texi .info
 
 .el.elc:
-	BDIR=$(BDIR) CWD=$(CWD) VMDIR=$(VMDIR) \
-  $(EMACS) -batch -no-site-file -l $(CWD)/fixup -f batch-byte-compile $(CWD)/$<
+	BDIR=$(BDIR) CWD=$(CWD) VMDIR=$(VMDIR) CUSTOMDIR=$(CUSTOMDIR)\
+   $(EMACS) -batch -no-site-file -l $(CWD)/fixup $(IGNORE_CUSTOM) -f batch-byte-compile $(CWD)/$<
 
 .texi.info:
 	$(EMACS) -batch -f batch-texinfo-format $(CWD)/$<
 efs-18.elc: efs-18.el
 efs-19.elc: efs-19.el
 efs-19.23.elc: efs-19.23.el
+efs-19.34.elc: efs-19.34.el
 efs-l19.11.elc: efs-l19.11.el
 efs-x19.15.elc: efs-x19.15.el
 # efs vm support
     efs-dired-mule.elc reporter.elc passwd.elc auto-save.elc
 efs-19: fn-handler.elc efs efs-19.elc $(GEOBJS_EFS)
 efs-19.23: efs efs-19.23.elc $(GEOBJS_EFS)
+efs-19.34: efs efs-19.34.elc $(GEOBJS_EFS)
 efs-l19.11: efs efs-l19.11.elc $(XEOBJS_EFS)
 efs-x19.15: efs efs-x19.15.elc $(XEOBJS_EFS)
 efs-x20: efs efs-x19.15.elc $(XEOBJS_EFS) $(MULEOBJS_EFS)
     reporter.elc diff.elc
 dired-19: fn-handler.elc efs dired $(GEOBJS_DIRED)
 dired-19.23: dired $(GEOBJS_DIRED)
+dired-19.34: dired $(GEOBJS_DIRED)
 dired-l19.11: dired $(XEOBJS_DIRED)
 dired-x19.15: dired $(XEOBJS_DIRED)
 dired-x20: dired $(XEOBJS_DIRED) $(MULEOBJS_DIRED)
 
 # Installation
-#install:
-#	@echo "Installing in $(LISPDIR)..."
-#	cp *.elc $(LISPDIR)
-#	cp *.info $(INFODIR)
+install_obj:
+	@echo "Installing in $(LISPDIR) and $(INFODIR)..."
+	cp *.elc $(LISPDIR)
+	cp *.info $(INFODIR)
 install_src:
 	@echo "Installing in $(LISPDIR)..."
 	cp `ls *.el | grep -v "fixup"` $(LISPDIR)
 	cp *texi $(TEXIDIR)
+
+efs_package_dist:
+	@echo "Installing in $(STAGING)..."
+	cp $(XEPACKAGESRC_EFS) $(XEPACKAGEMISC_EFS) $(STAGING)
+	cp kill-revs $(STAGING)
+	cd $(STAGING) ; $(SHELL) ./kill-revs ; rm -f kill-revs
+
+efs_dist:
+	@echo "Installing in $(STAGING)..."
+	cp $(DISTSRC_EFS) $(DISTMISC_EFS) $(STAGING)
+	cd $(STAGING); mv Makefile.efs Makefile
+
+dired_package_dist:
+	@echo "Installing in $(STAGING)..."
+	cp $(XEPACKAGESRC_DIRED) $(XEPACKAGEMISC_DIRED) $(STAGING)
+	cp kill-revs $(STAGING)
+	cd $(STAGING) ; $(SHELL) ./kill-revs ; rm -f kill-revs
+
+dired_dist:
+	@echo "Installing in $(STAGING)..."
+	cp $(DISTSRC_DIRED) $(DISTMISC_DIRED) $(STAGING)
+	cd $(STAGING); mv Makefile.dired Makefile
 clean::
-	rm -f $(OBJS)
+	rm -f $(OBJS) $(INFOS)
 
 ## end of Makefile ##
-This version of Dired was modified for integration with XEmacs by
-Mike Sperber <sperber@informatik.uni-tuebingen.de>.
-He is the current maintainer of this version of Dired.
+This is Dired 7.10
+==================
 
-A Few Things That You Should Know About Dired:
---------------------------------------------
+Dired is a special mode for editing directory trees, both local and
+remote.  Thus, it resembles traditional "file managers."
 
-Dired requires customize for customization. Just do an
+It is available from
 
-M-x customize RET dired RET
+http://www-uk.hpl.hp.com/people/ange/efs
 
-to find out about user-configurable options of Dired.
-
-Of course, you invoke Dired by doing
-
-M-x dired RET
+For installation instructions, see file INSTALL.
 
 Note that Dired used to be part of the EFS package and is still being
-maintained via the same mailing lists.
+maintained via the same mailing lists.  The file LISTS contains a
+description of mailing lists relevant to Dired.  We encourage users to
+join these lists.
 
-The file LISTS contains a description of mailing lists relevant to
-Dired.
-We encourage users to join these lists.
-
-Dired/EFS and archie.el:
-------------------
-
-To use archie.el (by Jack Repenning) with Dired/EFS, you need at least
-archie.el V3.0.1.  Problems using Dired/EFS with archie may be posted
-to the EFS mailing lists.
+This is a beta release.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:         diff.el
-;; Version:      #Revision: 3.4 $
+;; Version:      #Revision: 4.0 $
 ;; Author:       This file is based on diff.el by
 ;;               sunpitt!wpmstr!fbresz@Sun.COM 1/27/89.
 ;;               It has been completely rewritten in July 1994 by
 ;;               Sandy Rutherford <sandy@ibm550.sissa.it>
+;;               It has mostly been demolished in March 2001 by
+;;               Mike Sperber <mike@xemacs.org> to use
+;;               Stefan Monnier's diff-mode.
 ;; RCS:          
-;; Description:  diff-mode for handling output from unix diff utility.
+;; Description:  Call unix diff utility.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;; This file is based on diff.el by sunpitt!wpmstr!fbresz@Sun.COM 1/27/89.
 ;;; It has been completely rewritten in July 1994 by
 ;;; Sandy Rutherford <sandy@ibm550.sissa.it>
+;;; It has mostly been demolished in March 2001 by
+;;; Mike Sperber <mike@xemacs.org> to use
 
 ;;; This program is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
 ;;; from the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
 ;;; MA 02139, USA.
 
+(require 'custom)
+(require 'diff-mode)
+
 (provide 'diff)
 
 ;;; User Variables
 ;; whether we should delete the buffer on quit.
 (defvar diff-new-file nil)
 ;; Same as diff-old-file, except for the new file.
-(defvar diff-total-differences "0")
-;; Total number of difference hunks as a string.
-(defvar diff-current-difference "0")
-;; Current difference hunk as a string.
-(defvar diff-current-hunk 0)
-;; Current difference hunk as an integer.
-(defvar diff-total-hunks 0)
-;; Total number of difference hunks as an integer.
-(defvar diff-hunk-vector (vector 0))
-;; Vector storing the starting positions of the difference hunks.
-(defvar diff-old-file-pattern nil)
-(defvar diff-new-file-pattern nil)
-(defvar diff-hunk-pattern nil)
-;; Regexps to use when parsing file lines in difference hunks.
 
-
-(defvar diff-search-pattern-alist
-  (list
-    (list ?e "^[0-9]\\(,[0-9]+\\)?[acd]$" "^\\([0-9]+\\)" nil)
-    (list ?c "^\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n"
-	  "^\\*+ \\([0-9]+\\)" "^-+ \\([0-9]+\\)")
-    (list ?u "^@@ " "^@@ -\\([0-9]+\\)" "^@@ -[0-9,]+ \\+\\([0-9]+\\)")
-    (list nil "^[0-9]+" "^\\([0-9]+\\)" "^[0-9,]+[acd]\\([0-9]+\\)")))
-
-(defvar diff-keymap-grokked nil)
-
-(defvar diff-temp-template "/tmp/diff")
-
-;; Initialize the keymap if it isn't already
-
-(defvar diff-mode-map nil
-  "Keymap used in diff mode.")
-
-(if diff-mode-map
-    nil
-  (setq diff-mode-map (make-keymap))
-  (suppress-keymap diff-mode-map)
-  (define-key diff-mode-map "?" 'describe-mode)
-  (define-key diff-mode-map "." 'diff-display-file)
-  (define-key diff-mode-map "N" 'diff-narrow)
-  (define-key diff-mode-map "W" 'widen)
-  (define-key diff-mode-map "f" 'diff-find-file)
-  (define-key diff-mode-map "h" 'diff-show-header)
-  (define-key diff-mode-map "j" 'diff-show-difference)
-  (define-key diff-mode-map "n" 'diff-next-difference)
-  (define-key diff-mode-map "o" 'diff-find-file-other-window)
-  (define-key diff-mode-map "p" 'diff-previous-difference)
-  (define-key diff-mode-map "q" 'diff-quit)
-  (define-key diff-mode-map "w" 'diff-find-file-other-frame)
-  (define-key diff-mode-map "\C-c\C-c" 'diff-find-file-other-window)
-  (define-key diff-mode-map " " 'diff-advertised-scroll-up)
-  (define-key diff-mode-map "\177" 'diff-advertised-scroll-down)
-  (define-key diff-mode-map "\C-n" 'diff-next-line)
-  (define-key diff-mode-map "\C-p" 'diff-previous-line)
-  (define-key diff-mode-map "\M->" 'diff-end-of-buffer)
-  (define-key diff-mode-map "\M-<" 'diff-beginning-of-buffer))
-
-;;; Internal functions
-
-(defun diff-grok-keys (to-command from-command)
-  ;; Assigns to TO-COMMAND the keys for the global binding of FROM-COMMAND.
-  ;; Does not clobber anything in the local keymap.
-  (let ((keys (where-is-internal from-command)))
-    (while keys
-      (condition-case nil
-	  (if (eq (global-key-binding (car keys)) (key-binding (car keys)))
-	      (local-set-key (car keys) to-command))
-	(error nil))
-      (setq keys (cdr keys)))))
-
-(defun diff-grok-keymap ()
-  (if diff-keymap-grokked
-      ()
-    (if (and term-setup-hook (boundp 'command-line-args-left))
-	(progn
-	  (if diff-emacs-19-p
-	      (run-hooks term-setup-hook)
-	    (funcall term-setup-hook))
-	  (setq term-setup-hook nil)))
-    (setq diff-keymap-grokked t)
-    (diff-grok-keys 'diff-next-line 'next-line)
-    (diff-grok-keys 'diff-previous-line 'previous-line)
-    (diff-grok-keys 'diff-forward-char 'forward-char)
-    (diff-grok-keys 'diff-backward-char 'backward-char)
-    (diff-grok-keys 'diff-scroll-up 'scroll-up)
-    (diff-grok-keys 'diff-scroll-down 'scroll-down)
-    (diff-grok-keys 'diff-beginning-of-buffer 'beginning-of-buffer)
-    (diff-grok-keys 'diff-end-of-buffer 'end-of-buffer)))
-
-(defun diff-buffer-narrowed-p ()
-  ;; Returns t if the current buffer is narrowed
-  (save-restriction
-    (let ((min (point-min))
-	  (max (point-max)))
-      (widen)
-      (not (and (= min (point-min)) (= max (point-max)))))))
-
-(defun diff-current-hunk ()
-  ;; Returns the current diff hunk.
-  (let ((pt (point))
-	(start 0)
-	(end (1+ diff-total-hunks))
-	m)
-    (while (> (- end start) 1)
-      (setq m (/ (+ start end) 2))
-      (if (>= pt (aref diff-hunk-vector m))
-	  (setq start m)
-	(setq end m)))
-    (if (>= pt (aref diff-hunk-vector end))
-	(setq m end)
-      (setq m start))
-    ;; Don't treat end of buffer as start of next hunk
-    (if (eobp) (1- m) m)))
-
-(defun diff-hunk-min (n)
-  ;; Returns the start of the current diff hunk.
-  (aref diff-hunk-vector n))
-
-(defun diff-hunk-max (n)
-  ;; Returns the end of the current diff hunk.
-  (aref diff-hunk-vector (1+ n)))
-
-(defun diff-parse-hunks ()
-  ;; Parses a buffer of diff output.
-  (save-excursion
-    (save-restriction
-      (message "Parsing differences...")
-      (widen)
-      (goto-char (point-min))
-      (let ((hunks (list 1)))
-	(while (re-search-forward diff-hunk-pattern nil t)
-	  (setq hunks (cons (match-beginning 0) hunks)))
-	(setq diff-total-hunks (1- (length hunks))
-	      diff-hunk-vector (apply 'vector
-				      (nreverse (cons (point-max) hunks)))))))
-  (message "Parsing differences...done"))
-
-(defun diff-update-modeline ()
-  ;; Updates the mode line to show current diff hunk.
-  (if (or (< (point) (diff-hunk-min diff-current-hunk))
-	  (>= (point) (diff-hunk-max diff-current-hunk)))
-      (progn
-	(setq diff-current-hunk (diff-current-hunk)
-	      diff-current-difference (int-to-string diff-current-hunk))
-	(set-buffer-modified-p (buffer-modified-p)))))
+(defvar diff-temp-template (expand-file-name "diff" (temp-directory)))
 
 (defun diff-read-args (oldprompt newprompt switchprompt
 				 &optional file-for-backup)
 			  (> (backup-extract-version fn1)
 			     (backup-extract-version fn2))))))))))))
 
-(defun diff-file-line (&optional old-file-p)
-  "Return line number of current hunk in `diff-new-file'.
-With optional argument OLD-FILE-P, use `diff-old-file' instead."
-  (save-excursion
-    (let ((min (diff-hunk-min diff-current-hunk))
-	  (max (diff-hunk-max diff-current-hunk))
-	  (regexp (if old-file-p diff-old-file-pattern diff-new-file-pattern)))
-      (goto-char min)
-      (or (and regexp (re-search-forward regexp max t))
-	  (error "Unable to locate a file line for %s file."
-		 (if old-file-p "old" "new")))
-      (string-to-int (buffer-substring (match-beginning 1) (match-end 1))))))
-
 (defun diff-run-diff (switches old old-temp new new-temp)
   ;; Actually run the diff process with SWITCHES on OLD and NEW.
   ;; OLD-TEMP and NEW-TEMP are names of temp files that can be used
 	  (setq files (cdr files)
 		temps (cdr temps)))))))
 
-;;;; User commands	 
-
-(defun diff-mode ()
-  "Diff Mode is used by \\[diff] for perusing the output from the diff program.
-All normal editing commands are turned off.  Instead, these are available:
-\\<diff-mode-map>
-\\[diff-advertised-scroll-up]	Scroll to next screen of this difference.
-\\[diff-advertised-scroll-down]	Scroll to previous screen of this difference.
-\\[diff-next-difference]	Move to Next Difference.
-\\[diff-previous-difference]	Move to Previous Difference.
-\\[diff-show-difference]	Jump to difference specified by numeric position.
-\\[diff-find-file]	Find current diff in file
-\\[diff-find-file-other-window]	Find current diff in file in other window
-\\[diff-display-file]	Display file in other window
-\\[diff-narrow]	Narrow diff buffer to current difference
-\\[widen]	Widen diff buffer
-\\[diff-show-header]	Show diff header describing file name etc.
-\\[diff-quit]	Quit diff
-"
-  (interactive)
-  (use-local-map diff-mode-map)
-  (diff-grok-keymap)
-  (setq buffer-read-only t
-	major-mode 'diff-mode
-	mode-name "Diff"
-	mode-line-modified "--- "
-	mode-line-process
-	'(" " diff-current-difference "/" diff-total-differences))
-  (diff-parse-hunks)
-  (setq diff-total-differences (int-to-string diff-total-hunks)))
-
-;;; Motion commands
-
-(defun diff-next-difference (n)
-  "In diff-mode go the the beginning of the next difference hunk."
-  (interactive "p")
-  (if (zerop n)
-      (goto-char (diff-hunk-min diff-current-hunk))
-    (let ((narrow (diff-buffer-narrowed-p))
-	  (max (point-max))
-	  (min (point-min)))
-      (unwind-protect
-	  (progn
-	    (widen)
-	    (setq diff-current-hunk (+ n diff-current-hunk))
-	    (cond ((> diff-current-hunk diff-total-hunks)
-		   (setq diff-current-hunk diff-total-hunks)
-		   (message "No following difference hunks."))
-		  ((< diff-current-hunk 0)
-		   (setq diff-current-hunk 0)
-		   (message "No preceding difference hunks.")))
-	    (setq diff-current-difference (int-to-string diff-current-hunk)
-		  min (goto-char (diff-hunk-min diff-current-hunk))
-		  max (diff-hunk-max diff-current-hunk)))
-	(if narrow (narrow-to-region min max))))
-    (set-buffer-modified-p (buffer-modified-p))))
-
-(defun diff-previous-difference (n)
-  "In diff-mode go the the beginning of the previous difference hunk."
-  (interactive "p")
-  (diff-next-difference (- n)))
-
-(defun diff-next-line (n)
-  "In diff-mode go to the next line."
-  (interactive "p")
-  (condition-case nil
-      (next-line n)
-    (error (if (> n 0) (message "End of difference hunk"))))
-  (diff-update-modeline))
-
-(defun diff-previous-line (n)
-  "In diff-mode go to the previous line."
-  (interactive "p")
-  (diff-next-line (- n)))
-
-(defun diff-forward-char (n)
-  "In diff-mode move the point forward."
-  (interactive "p")
-  (forward-char n)
-  (diff-update-modeline))
-
-(defun diff-backward-char (n)
-  "In diff-mode move the point backward."
-  (interactive "p")
-  (backward-char n)
-  (diff-update-modeline))
-
-(defun diff-scroll-up (n)
-  "In diff-mode scroll the buffer up."
-  (interactive "P")
-  (scroll-up n)
-  (diff-update-modeline))
-
-(fset 'diff-advertised-scroll-up 'diff-scroll-up)
-
-(defun diff-scroll-down (n)
-  "In diff-mode scroll the buffer down."
-  (interactive "P")
-  (scroll-down n)
-  (diff-update-modeline))
-
-(fset 'diff-advertised-scroll-down 'diff-scroll-down)
-
-(defun diff-beginning-of-buffer (n)
-  "In diff-mode go to the beginning of the buffer."
-  (interactive "_P")
-  (beginning-of-buffer n)
-  (diff-update-modeline))
-
-(defun diff-end-of-buffer (n)
-  "In diff-mode go to the end of the buffer."
-  (interactive "_P")
-  (end-of-buffer n)
-  (diff-update-modeline))
-
-;;; The main command.
-
 ;;;###autoload
 (defun diff (old new &optional switches)
   "Find and display the differences between OLD and NEW files.
 		     (setq flag (aref x (match-beginning 0))))))
 	      switches))
     (unwind-protect
-	(let ((patterns (assq flag diff-search-pattern-alist)))
+	(progn
 	  (set-buffer (get-buffer-create "*Diff Output*"))
-	  (setq default-directory (file-name-directory new)
-		diff-old-file-pattern (nth 2 patterns)
-		diff-new-file-pattern (nth 3 patterns)
-		diff-hunk-pattern (nth 1 patterns))
+	  (setq default-directory (file-name-directory new))
 	  (let (buffer-read-only)
 	    (if (fboundp 'buffer-disable-undo)
 		(buffer-disable-undo (current-buffer))
 	    (widen)
 	    (erase-buffer)
 	    (if doing-dirs
-		(progn
-		  (diff-run-diff switches old old new new)
-		  (setq diff-hunk-pattern (concat diff-hunk-pattern
-						  "\\|^Only in ")))
+		(diff-run-diff switches old old new new)
 	      (save-excursion
 		(set-buffer (car old-buffer))
 		(write-region (point-min) (point-max) old-temp nil 'quiet)
 	    ;; Need to replace file names
 	    (if (and (not doing-dirs) (memq flag '(?c ?u)))
 		(diff-fix-file-names old old-temp new new-temp
-				     diff-hunk-pattern))
+				     diff-hunk-header-re))
 	    (diff-mode)
 	    (goto-char (point-min))
-	    (setq diff-current-difference "0"
-		  diff-current-hunk 0)
-	    (if (zerop diff-total-hunks)
+	    (if diff-do-narrow
 		(progn
-		  (diff-cleanup-buffers)
-		  (message "No differences"))
-	      (if diff-do-narrow (narrow-to-region (point) (diff-hunk-max 0)))
-	      (display-buffer (current-buffer))
-	      (message "%s difference hunk%s" diff-total-differences
-		       (if (= diff-total-hunks 1) "" "s")))))
-      (condition-case nil
-	  (delete-file old-temp)
-	(error nil))
-      (condition-case nil
-	  (delete-file new-temp)
-	(error nil))
-      (set-buffer curr-buff))))
+		  (diff-next-hunk)
+		  (diff-restrict-view)))
+	    (display-buffer (current-buffer))))
+	  (condition-case nil
+	      (delete-file old-temp)
+	    (error nil))
+	  (condition-case nil
+	      (delete-file new-temp)
+	    (error nil))
+	  (set-buffer curr-buff))))
 
 ;;;###autoload
 (defun diff-backup (file &optional switches)
 	    ori file))
     (diff bak ori switches)))
 
-(defun diff-show-difference (n)
-  "Show difference number N (prefix argument)."
-  (interactive "p")
-  (let ((narrowedp (diff-buffer-narrowed-p))
-	(min (diff-hunk-min diff-current-hunk))
-	(max (diff-hunk-max diff-current-hunk)))
-    (unwind-protect
-	(progn
-	  (widen)
-	  (cond
-	   ((< n 0)
-	    (message "No negative hunks.")
-	    (setq n 0))
-	   ((> n diff-total-hunks)
-	    (message "No hunk %d." n)
-	    (setq n diff-total-hunks)))
-	  (setq diff-current-hunk n
-		diff-current-difference (int-to-string diff-current-hunk)
-		min (diff-hunk-min n)
-		max (diff-hunk-max n))
-	  (goto-char min))
-      (if narrowedp (narrow-to-region min max))
-      (set-buffer-modified-p (buffer-modified-p)))))
-
-(defun diff-show-header ()
-  "Show `diff-header'."
-  (interactive)
-  (with-output-to-temp-buffer "*Diff Header*"
-    (princ (save-restriction
-	     (widen)
-	     (buffer-substring (diff-hunk-min 0) (diff-hunk-max 0))))))
-
-
-(defun diff-find-file (old-file-p)
-  "Visit diffed file, at the point corresponding to the current hunk.
-Default is to visit the new file; prefix means visit old file instead."
-  (interactive "P")
-  (let ((line (diff-file-line old-file-p)))
-    (find-file 
-     (if old-file-p
-	 (car diff-old-file)
-       (car diff-new-file)))
-    (goto-line line)
-    (recenter 0)))
-
-(defun diff-find-file-other-window (old-file-p)
-  "Visit the diffed file in other window, with the point at the current hunk.
-Default is to visit the new file; prefix means visit the old file instead."
-  (interactive "P")
-  (let ((line (diff-file-line old-file-p)))
-    (find-file-other-window
-     (if old-file-p
-	 (car diff-old-file)
-       (car diff-new-file)))
-    (goto-line line)
-    (recenter 0)))
-
-(defun diff-find-file-other-frame (old-file-p)
-  "Visit the diffed file in other frame, with point at the current hunk.
-Default is to visit the new file; prefix means visit the old file instead."
-  (interactive "P")
-  (let ((line (diff-file-line old-file-p)))
-    (find-file-other-frame
-     (if old-file-p
-	 (car diff-old-file)
-       (car diff-new-file)))
-    (goto-line line)
-    (recenter 0)))
-
-(defun diff-display-file (old-file-p)
-  "Display the diffed file in other window, with point at the current hunk.
-Default is to visit the new file; prefix means visit the old file instead."
-  (interactive "P")
-  (let ((line (diff-file-line old-file-p))
-	(wind (display-buffer (find-file-noselect (if old-file-p
-						      (car diff-old-file)
-						    (car diff-new-file)))))
-	(curr-wind (selected-window)))
-    (unwind-protect
-	(progn
-	  (select-window wind)
-	  (goto-line line)
-	  (recenter 0))
-      (select-window curr-wind))))
-
-(defun diff-quit ()
-  "Quit diff by killing the diff buffer."
-  (interactive)
-  (kill-buffer "*Diff Output*")
-  (diff-cleanup-buffers))
-
-(defun diff-narrow ()
-  "Narrow diff buffer to current difference hunk."
-  (interactive)
-  (narrow-to-region (diff-hunk-min diff-current-hunk)
-		    (diff-hunk-max diff-current-hunk)))
-
 ;;; Run any load hooks
 (run-hooks 'diff-load-hook)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-cmpr.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Commands for compressing marked files.
 ;;
 
 ;;; Entry points.
 
+;;;###autoload
 (defun dired-do-compress (&optional arg files)
   "Compress or uncompress marked (or next ARG) files.
 With a zero prefix, prompts for a new value of `dired-compression-method'."
 	      (substring fn 0 (- (length (nth 1 cfn))))))))
        dired-keep-marker-compress nil t)))
 
+;;;###autoload
 (defun dired-compress-subdir-files (&optional uncompress)
   "Compress all uncompressed files in the current subdirectory.
 With a prefix argument uncompresses all compressed files."
 ;;
 ;; File:           dired-diff.el
 ;; RCS:
-;; Dired Version:  #Revision: 7.9 $
+;; Dired Version:  #Revision: 7.10 $
 ;; Description:    Support for diff and related commands.
 ;; Author:         Sandy Rutherford <sandy@ibm550.sissa.it>
 ;; Created:        Fri Jun 24 08:50:20 1994 by sandy on ibm550
 
 (provide 'dired-diff)
 (require 'dired)
+(require 'diff-mode)
 
 (defvar emerge-last-dir-input)
 (defvar emerge-last-dir-output)
 
 (defun dired-diff-read-switches (switchprompt)
   ;; Read and return a list of switches
-  (or (boundp 'diff-switches)
-      (require 'diff)) ; Make sure that `diff-switches' is defined.
   (let* ((default (if (listp diff-switches)
 		      (mapconcat 'identity diff-switches " ")
 		    diff-switches))
 	      start (match-end 0)))
       (nreverse result))))
 
+;;;###autoload
 (defun dired-diff (file &optional switches)
   "Compare file at point with file FILE using `diff'.
 FILE defaults to the file at the mark.
       (diff file (dired-get-filename) switches)
     (diff file (dired-get-filename))))
 
+;;;###autoload
 (defun dired-backup-diff (&optional switches)
   "Diff this file with its backup file or vice versa.
 Uses the latest backup, if there are several numerical backups.
       (diff-backup (dired-get-filename) switches)
     (diff-backup (dired-get-filename))))
 
+;;;###autoload
 (defun dired-emerge (arg file out-file)
   "Merge file at point with FILE using `emerge'.
 FILE defaults to the file at the mark."
 			       (dired-abbreviate-file-name file) file)))))
   (emerge-files arg file (dired-get-filename) out-file))
 
+;;;###autoload
 (defun dired-emerge-with-ancestor (arg file ancestor file-out)
   "Merge file at point with FILE, using a common ANCESTOR file.
 FILE defaults to the file at the mark."
   (emerge-files-with-ancestor arg file (dired-get-filename)
 			      ancestor file-out))
 
+;;;###autoload
 (defun dired-ediff (file)
   "Ediff file at point with FILE.
 FILE defaults to the file at the mark."
   (interactive (list (dired-diff-read-file-name "Ediff")))
   (ediff-files file (dired-get-filename)))
 
+;;;###autoload
 (defun dired-epatch (file)
   "Patch file at point using `epatch'."
   (interactive
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-faces.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   rudimentary face customization support for dired
 ;; Author:        Mike Sperber <sperber@informatik.uni-tuebingen.de>
 (defcustom dired-do-highlighting t
   "Set if we should use highlighting according to filetype."
   :type 'boolean
-  :group 'dired)
+  :group 'dired-faces)
 
 (defcustom dired-do-interactive-permissions t
   "Set if we should allow interactive chmod."
   :type 'boolean
-  :group 'dired)
+  :group 'dired-faces)
+
 
 (defface dired-face-marked '((((class color))
 			       (:background "PaleVioletRed"))
 			     (t (:underline t)))
   "Face used for marked files."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-flagged '((((class color))
 			       (:background "LightSlateGray"))
 			      (t (:underline t)))
   "Face used for flagged files."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-directory '((t (:bold t)))
   "Face used for directories."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-executable '((((class color))
 				  (:foreground "SeaGreen"))
 				 (t (:bold t)))
   "Face used for executables."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-setuid '((((class color))
 			      (:foreground "Red"))
 			     (t (:bold t)))
   "Face used for setuid executables."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-boring '((((class color))
 			      (:foreground "Gray65"))
 			     (((class grayscale))
 			      (:foreground "Gray65")))
   "Face used for unimportant files."
-  :group 'dired)
+  :group 'dired-faces)
 
-(defface dired-face-permissions '((t (:background "grey75"
-				      :foreground "black")))
+(defface dired-face-permissions '((((type tty))
+				   (:foreground "black"
+				    :background "white"))
+				  (t
+				    (:background "grey75"
+				     :foreground "black")))
   "Face used for interactive permissions."
+  :group 'dired-faces)
+
+(defface dired-face-header '((t (:background "grey75"
+                                 :foreground "black")))
+  "Face used for directory header."
   :group 'dired)
 
 (defface dired-face-socket '((((class color))
 			      (:foreground "magenta"))
 			     (t (:bold nil)))
   "Face used to indicate sockets."
-  :group 'dired)
+  :group 'dired-faces)
 
 (defface dired-face-symlink  '((((class color))
 			      (:foreground "cyan"))
 			     (t (:bold t)))
   "Face used to indicate symbolic links."
-  :group 'dired)
+  :group 'dired-faces)
 
 ;;; end of dired-faces.el
 ;;
 ;; File:           dired-grep.el
 ;; RCS:
-;; Dired Version:  #Revision: 7.9 $
+;; Dired Version:  #Revision: 7.10 $
 ;; Description:    Support for running grep on marked files in a dired buffer.
 ;; Author:         Sandy Rutherford <sandy@ibm550.sissa.it>
 ;; Created:        Tue Jul 13 22:59:37 1993 by sandy on ibm550
 	   (dired-log (buffer-name (current-buffer)) (concat result "\n"))
 	   file))))
 
+;;;###autoload
 (defun dired-do-grep (pattern &optional flags arg)
   "Grep marked files for a pattern. With a \C-u prefix prompts for grep flags."
   (interactive
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-help.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Obtaining help for dired
 ;; Modified:      Sun Nov 20 21:10:47 1994 by sandy on gandalf
 
 ;;; Constants
 
-(defconst dired-bug-address "efs-bugs@cuckoo.hpl.hp.com")
+(defconst dired-bug-address "efs-bugs@hplb.hpl.hp.com")
 
 (defvar dired-documentation nil)
 
 Summary of commands:
 
 Motion Commands
-      move up to previous line                             \\[dired-next-line]
-      move down to next line                               \\[dired-previous-line]
+      move up to previous line                             \\[dired-previous-line]
+      move down to next line                               \\[dired-next-line]
       move up to previous directory line                   \\[dired-prev-dirline]
       move down to next directory line                     \\[dired-next-dirline]
       move up to previous subdirectory                     \\[dired-advertised-prev-subdir]
 
 ;;; Commands
 
+;;;###autoload
 (defun dired-describe-mode (&optional info)
   "Detailed description of dired mode.
 With a prefix, runs the info documentation browser for dired."
 	  (princ mess)
 	  (print-help-return-message))))))
 
+;;;###autoload
 (defun dired-apropos (string &optional var-p)
   "Does command apropos for dired commands.
 With prefix does apropos for dired variables."
 	"\(not on any keys\)"
       res)))
 
+;;;###autoload
 (defun dired-summary ()
   "Display summary of basic dired commands in the minibuffer."
   (interactive)
 
 ;;; Submitting bug reports.
 
+;;;###autoload
 (defun dired-report-bug ()
   "Submit a bug report for dired."
   (interactive)
 ;;
 ;; File:           dired-mob.el
 ;; RCS:
-;; Dired Version:  #Revision: 7.9 $
+;; Dired Version:  #Revision: 7.10 $
 ;; Description:    Commands for marking files from another buffer.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;; User commands
 
+;;;###autoload
 (defun dired-mark-files-from-other-dired-buffer (buf)
   "Mark files that are marked in the other Dired buffer.
 I.e, mark those files in this Dired buffer that have the same
 		       (dired-get-marked-files 'no-dir))))
     (dired-mark-these-files other-files (concat "from buffer " buf))))
 
+;;;###autoload
 (defun dired-mark-files-compilation-buffer (&optional buf)
   "Mark the files mentioned in the `*compilation*' buffer.
 With a prefix, you may specify the other buffer."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-mule.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   MULE support for dired.
 ;; Created:       Sun Jul 17 14:45:12 1994 by sandy on ibm550
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-oas.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   dired odds and sods. Dired functions not usually needed.
 ;;                This file is not a reference to the Organization of
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:           dired-rgxp.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Commands for running commands on files whose names
 ;;                match a regular expression.
 
 ;;; Marking file names matching a regexp.
 
+;;;###autoload
 (defun dired-mark-files-regexp (regexp &optional marker-char omission-files-p)
   "\\<dired-mode-map>Mark all files matching REGEXP for use in later commands.
 
 	 "omission candidate file"
        "matching file"))))
 
+;;;###autoload
 (defun dired-flag-files-regexp (regexp)
   "In dired, flag all files containing the specified REGEXP for deletion.
 The match is against the non-directory part of the filename.  Use `^'
 		      'dired-regexp-history)))
   (dired-mark-files-regexp regexp dired-del-marker))
 
+;;;###autoload
 (defun dired-mark-extension (extension &optional marker-char)
   "Mark all files with a certain extension for use in later commands.
 A `.' is not prepended to the string entered."
 	   "\\)$")
    marker-char))
 
+;;;###autoload
 (defun dired-flag-extension (extension)
   "In dired, flag all files with a certain extension for deletion.
 A `.' is not prepended to the string entered."
   (interactive "sFlag files with extension: ")
   (dired-mark-extension extension dired-del-marker))
 
+;;;###autoload
 (defun dired-cleanup (program)
   "Flag for deletion dispensable files created by PROGRAM.
 See variable `dired-cleanup-alist'."
 
 ;;; Commands on marked files whose names also match a regexp.
 
+;;;###autoload
 (defun dired-do-rename-regexp (regexp newname &optional arg whole-path)
   "Rename marked files containing REGEXP to NEWNAME.
 As each match is found, the user must type a character saying
    (function dired-rename-file)
    "Rename" arg regexp newname whole-path dired-keep-marker-rename))
 
+;;;###autoload
 (defun dired-do-copy-regexp (regexp newname &optional arg whole-path)
   "Copy all marked files containing REGEXP to NEWNAME.
 See function `dired-rename-regexp' for more info."
    (if dired-copy-preserve-time "Copy [-p]" "Copy")
    arg regexp newname whole-path dired-keep-marker-copy))
 
+;;;###autoload
 (defun dired-do-hardlink-regexp (regexp newname &optional arg whole-path)
   "Hardlink all marked files containing REGEXP to NEWNAME.
 See function `dired-rename-regexp' for more info."
    (function add-name-to-file)
    "HardLink" arg regexp newname whole-path dired-keep-marker-hardlink))
 
+;;;###autoload
 (defun dired-do-symlink-regexp (regexp newname &optional arg whole-path)
   "Symlink all marked files containing REGEXP to NEWNAME.
 See function `dired-rename-regexp' for more info."
    (function make-symbolic-link)
    "SymLink" arg regexp newname whole-path dired-keep-marker-symlink))
 
+;;;###autoload
 (defun dired-do-relsymlink-regexp (regexp newname &optional whole-path)
   "RelSymlink all marked files containing REGEXP to NEWNAME.
 See functions `dired-rename-regexp' and `dired-do-relsymlink'
    (function dired-rename-file)
    basename-constructor operation arg))
 
+;;;###autoload
 (defun dired-upcase (&optional arg)
   "Rename all marked (or next ARG) files to upper case."
   (interactive "P")
   (dired-rename-non-directory (function upcase) "Rename upcase" arg))
 
+;;;###autoload
 (defun dired-downcase (&optional arg)
   "Rename all marked (or next ARG) files to lower case."
   (interactive "P")
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-sex.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Marking files according to sexpressions.  Sorry.
 ;; Created:       Wed Sep 14 01:30:43 1994 by sandy on ibm550
 	   t)))) ; return t if parsing was a success
 
 
+;;;###autoload
 (defun dired-mark-sexp (predicate &optional unflag-p)
   "Mark files for which PREDICATE returns non-nil.
 With a prefix arg, unflag those files instead.
 
     inode  [integer] the inode of the file (only for ls -i output)
     s      [integer] the size of the file for ls -s output
-	             (usually in blocks or, with -k, in KByte)
+	             (ususally in blocks or, with -k, in KByte)
     mode   [string]  file permission bits, e.g. \"-rw-r--r--\"
     nlink  [integer] number of links to file
     uid    [string]  owner
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-shell.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Commands for running shell commands on marked files.
 ;;
 This is used by `dired-do-print' to determine the default print command for
 printing the marked files.")
 
-(defvar dired-auto-shell-command-alist nil
+(defcustom dired-auto-shell-command-alist nil
   "*Alist of regexps and command lists to guess shell commands.
 Each element of this list should be a list of regular expression, and a list
 of guesses for shell commands to be used if the file name matches the regular
 expression. The list of guesses is evalled. This alist is appended to the front
 of dired-default-auto-shell-command-alist before prompting for each shell
-command.")
+command."
+  :group 'dired
+  :type '(repeat (cons (regexp)
+		       (choice (repeat (string))
+			       (sexp)))))
 
 (defvar dired-default-auto-shell-command-alist
   (list
    '("\\.gp$" "gnuplot")
    '("\\.gif$" "xv")			; view gif pictures
    '("\\.fig$" "xfig")			; edit fig pictures
+   '("\\.ps\\(?:\.gz\\|\.Z\\)?$" "gv")	; gv reads gzipped files.
    '("\\.ps$" "ghostview")
+   '("\\.pdf$" "acroread")		; Adobe acrobat (pdftex)
+   '("\\.lect$" "LecternClient")	; DEC SRC Virtual Paper
 
    ;; Typesetting.  For printing documents, see dired-print-program-alist.
    '("\\.tex$" "latex" "tex")
   "Wildcard character used by dired shell commands.
 Indicates where file names should be inserted.")
 
-(defvar dired-shell-command-separators '(?\  ?| ?> ?< ?& ?;)
+(defvar dired-shell-command-separators '(?\  ?| ?> ?< ?& ?;
+					     )
   "Defines the start of a string specifying a word in a shell command.")
 
 (defvar dired-trans-map
    (cons ?v 'dired-file-name-sans-rcs-extension)
    (cons ?z 'dired-file-name-sans-compress-extension))
   "Alist that associates keys with file transformer functions
-Each transformer function should be a function of one argument, the file name.
+Each transformer function should be a funcion of one argument, the file name.
 The keys are characters.")
 
 (defvar dired-shell-failure-marker ?!
 	    (progn
 	      (setq mode-line-process '(": %s"))
 	      (start-process "Shell" (current-buffer)
-			     shell-file-name "-c" command))
-	  (call-process shell-file-name nil t nil "-c" command))))))
+			     shell-file-name shell-command-switch command))
+	  (call-process shell-file-name nil t nil shell-command-switch command))))))
 
+;;;###autoload
 (defun dired-run-shell-command (command dir in-background &optional append)
   ;; COMMAND is shell command
   ;; DIR is directory in which to do the shell command.
 	  (if append
 	      (progn
 		(goto-char (point-max))
-		(or (= (char-before (point)) ?\n) (bobp) (insert "\n")))
+		(or (equal (char-before (point)) ?\n) (bobp) (insert "\n")))
 	    (erase-buffer)
 	    (if (stringp in-background)
 		(progn
 	(if append
 	    (progn
 	      (goto-char (point-max))
-	      (or (= (char-before (point)) ?\n) (bobp) (insert "\n")))
+	      (or (equal (char-before (point)) ?\n) (bobp) (insert "\n")))
 	  (erase-buffer))
 	(dired-shell-call-process command dir)))))
 
 ;;; User commands
 
+;;;###autoload
 (defun dired-do-shell-command (command arg files &optional in-background)
+  ;; ARG = (64) means operate on each file, in (dired-dwim-target-directory)
   ;; ARG = (16) means operate on each file, in its own directory.
   ;; ARG = (4) means operate on each file, but in the current
   ;;       default-directory.
 With a prefix of \\[universal-argument], a separate command for each file will
 be executed.
 
-With a prefix of \\[universal-argument] \\[universal-argument], a separate command will be sent for each file,
-and the command will be executed in the directory of that file.  The explicit
-command will be of the form 
+With a prefix of \\[universal-argument] \\[universal-argument], a
+separate command will be sent for each file, and the command will be
+executed in the directory of that file.  The explicit command will be
+of the form
 
                       cd dir; cmd file
 
 When prompting for the shell command, dired will always indicate the directory
 in which the command will be executed.
 
+With a prefix of \\[universal-argument] \\[universal-argument]
+\\[universal-argument], a eparate command will be sent for each file,
+and the command will be executed in the dwim directory.
+
 The following documentation depends on the settings of `dired-file-wildcard',
 `dired-shell-command-separators', `dired-trans-map', `dired-shell-prefix',
 `dired-shell-separator', and `dired-shell-postfix'. See the documentation for
 
   (interactive
    (let ((on-each (or (equal '(4) current-prefix-arg)
-		      (equal '(16) current-prefix-arg)))
+		      (equal '(16) current-prefix-arg)
+		      (equal '(64) current-prefix-arg)))
 	 (files (dired-get-marked-files
 		 nil (and (not (consp current-prefix-arg))
 			  current-prefix-arg)))
-	 (dir (and (not (equal current-prefix-arg '(16)))
-		   (dired-current-directory))))
+	 (dir (or (and (equal current-prefix-arg '(64))
+		       (dired-dwim-target-directory))
+		  (and (not (equal current-prefix-arg '(16)))
+		       (dired-current-directory)))))
      (list
       (dired-read-shell-command
        (concat (if dir
 
   ;; Look out for remote file names.
   
-  (let* ((on-each (or (equal arg '(4)) (and (equal arg '(16)) 'dir)))
+  (let* ((on-each (or (equal arg '(4)) (and (equal arg '(16)) 'dir)
+		      (equal arg '(64))))
 	 (ufiles (mapcar 'dired-shell-unhandle-file-name files))
-	 (dir (dired-current-directory))
+	 (dir (or (and (equal arg '(64)) (dired-dwim-target-directory))
+		  (dired-current-directory)))
 	 (udir (dired-shell-unhandle-file-name dir)))
 
     (save-excursion ; in case `shell-command' changes buffer
 	;; A better solution needs to be found.
 	(dired-run-shell-command
 	 (dired-shell-stuff-it command ufiles udir on-each)
-	 dir (if (equal arg '(16))
+	 dir (if (or (equal arg '(16)) (equal arg '(64)))
 		 (concat "cd <dir>; \"" command "\"\n\n")
 	       (concat "\"" command "\" in " dir "\n\n"))))
        (on-each
 	(let ((dired-no-confirm '(revert-subdirs)))
 	  (dired-verify-modtimes)))))
 
+;;;###autoload
 (defun dired-do-background-shell-command (command arg files)
   "Like \\[dired-do-shell-command], but starts command in background.
 Note that you can type input to the command in its buffer.
 
 ;;; Printing files
 
+;;;###autoload
 (defun dired-do-print (&optional arg command files)
   "Print the marked (or next ARG) files.
 Uses the shell command coming from variable `dired-print-program-alist'."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-uu.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Commands for uuencoding/uudecoding marked files.
 ;; Author:        Sandy Rutherford <sandy@math.ubc.ca>
 	   (if (assoc file dired-uu-files-to-decode)
 	       (let ((default-directory (file-name-directory file)))
 		 (if (dired-check-process
-		      (concat "Uudecoding " file) shell-file-name "-c"
+		      (concat "Uudecoding " file) shell-file-name shell-command-switch
 		      (format "uudecode %s" file))
 		    (signal 'file-error (list "Error uudecoding" file))))
 	     (let ((nfile (concat file ".uu")))
 	       (if (dired-check-process
-		   (concat "Uuencoding " file) shell-file-name "-c"
+		   (concat "Uuencoding " file) shell-file-name shell-command-switch
 		   (format "uuencode %s %s > %s"
 			   file (file-name-nondirectory file) nfile))
 		   (signal 'file-error (list "Error uuencoding" file)))))))))
 	   (file-name-directory file))
 	nil))))
 
+;;;###autoload
 (defun dired-do-uucode (&optional arg files to-decode)
   "Uuencode or uudecode marked (or next ARG) files."
   (interactive
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-vir.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Virtual dired mode for browsing ls -lR listings.
 ;; Author:        Sebastian Kremer <sk@thp.uni-koeln.de>
 (provide 'dired-vir)
 (require 'dired)
 
+;;;###autoload
 (defun dired-virtual (dirname &optional switches)
   "Put this buffer into Virtual Dired mode.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-xemacs.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   dired functions for XEmacs
 ;; Author:        Mike Sperber <sperber@informatik.uni-tuebingen.de>
      ["Compress/Uncompress" dired-do-compress t]
      ["Uuencode/Uudecode" dired-do-uucode t]
      ["Print..." dired-do-print t]
-     ["Change Mode..." dired-do-interactive-chmod t]
+     ["Change Mode..." dired-do-chmod t]
      ["Change Owner..." dired-do-chown t]
      ["Change Group..." dired-do-chgrp t]
      ["Load" dired-do-load t]
   "Installs the Dired menu at the menubar."
   (if (null dired-help-menu)
       (dired-setup-menus))
-  (when (and (featurep 'menubar) current-menubar)
-    (mapcar
-     (function
-      (lambda (pair)
-	(let ((name (car pair))
-	      (menu (symbol-value (cdr pair))))
-	  (easy-menu-add (cons name menu)))))
-     dired-menubar-menus)
-    (unless (featurep 'infodock)
-      (add-menu-button '("Help") (list "---"))
-      (add-submenu '("Help") (cons "Dired" dired-help-menu)))))
+  (if (and (featurep 'menubar) current-menubar)
+      (progn
+	(let ((buffer-menubar (copy-sequence current-menubar)))
+	  (set-buffer-menubar buffer-menubar)
+	  (mapcar
+	   (function
+	    (lambda (pair)
+	      (let ((name (car pair))
+		    (menu (symbol-value (cdr pair))))
+		(add-submenu nil (cons name menu)))))
+	   dired-menubar-menus))
+	(add-menu-button '("Help") (list "---"))
+	(add-submenu '("Help") (cons "Dired" dired-help-menu)))))
 
 (add-hook 'dired-mode-hook 'dired-install-menubar)
 
 ;; Make this defined everywhere in the dired buffer.
 (define-key dired-mode-map '(meta button3) 'dired-mouse-get-target)
 
+
+(define-key dired-mode-map [(home)] (function (lambda ()
+				      (interactive)
+				      (beginning-of-line)
+				      (when dired-do-interactive-permissions
+					(dired-move-to-permissions ?u 1)))))
+
+(define-key dired-mode-map [(end)] (function (lambda ()
+				     (interactive)
+				     (beginning-of-line)
+				     (dired-move-to-filename))))
+
 ;;; Extent managment
 
 (defun dired-set-text-properties (start end &optional face)
 	(goto-char (extent-end-position filename-extent))
       (and (null no-error) (error "No file on this line")))))
 
+(defun dired-move-to-permissions (domain direction)
+  (skip-chars-backward "^\r\n")
+  (let (extent)
+    (while (not (setq extent (map-extents (function
+					   (lambda (e p)
+					    (and
+					     (char-equal domain (extent-property e p))
+					     e)))
+					  (current-buffer)
+					  (point)
+					  (save-excursion
+					    (skip-chars-forward "^\r\n")
+					    (point))
+					  'dired-permissions)))
+      (forward-line direction))
+    (goto-char (extent-start-position extent))))
+
 ;;; Interactive chmod
 ;;; (based on ideas from Russell Ritchie's dired-chmod.el)
 
 
       (define-key keymap 'button2 mouse-toggle-name)
       (define-key keymap 'button3 mouse-menu-name)
+      (define-key keymap [(control ?p)] (function (lambda ()
+					  (interactive)
+					  (dired-permissions-arrow-move -1))))
+      (define-key keymap [(up)] (function (lambda ()
+				  (interactive)
+				  (dired-permissions-arrow-move -1))))
+      (define-key keymap [(control ?n)] (function (lambda ()
+					  (interactive)
+					  (dired-permissions-arrow-move 1))))
+      (define-key keymap [(down)] (function (lambda ()
+				    (interactive)
+				    (dired-permissions-arrow-move 1))))
+      (set-keymap-name keymap (char-to-string domain))
       keymap)))
-    
+
+(defun dired-permissions-arrow-move (direction)
+  (let ((domain (extent-property
+		 (extent-at (point) nil 'dired-permissions)
+		 'dired-permissions))
+	(here (point)))
+    (forward-line direction)
+    ;; /etc/rcN.d is ".", "..", and the rest all symlinks.
+    (if (catch 'found-one
+	  (while t
+	    (cond
+	      ;; Cannot modify symlink permissions.
+	      ((looking-at dired-re-sym) (forward-line direction))
+	      ((looking-at "^. [ \t0-9]*[^l][r-][w-]") (throw 'found-one t))
+	      (t (throw 'found-one nil)))))
+	(dired-move-to-permissions domain direction)
+      (goto-char here)
+      (if (save-excursion
+	    (forward-line direction)
+	    (looking-at dired-re-sym))
+	  (progn
+	    (forward-line direction)
+	    (dired-move-to-filename))
+	(dired-move-to-permissions domain direction)
+	(when signal-error-on-buffer-boundary
+	  ;; it'll do for now...
+	  (ding nil 'buffer-bound))))))
+
 (defvar dired-u-r-keymap nil "internal keymap for dired")
 (defvar dired-u-w-keymap nil "internal keymap for dired")
 (defvar dired-u-x-keymap nil "internal keymap for dired")
   (set-extent-face extent 'dired-face-permissions)
   (set-extent-property extent 'keymap keymap)
   (set-extent-property extent 'highlight t)
-  (set-extent-property
-   extent 'help-echo
+  (set-extent-property extent 'dired-permissions (string-to-char (keymap-name keymap)))
+  (set-extent-property extent 'help-echo
    "button2 toggles, button3 changes otherwise."))
 
 (dired-setup-chmod-keymaps)
-	  
+
+
+;;; Popup header supports
+(defun dired-insert-set-headerline-properties ()
+  ;; Sets the extents for the current directory header line
+  (let ((position (dired-get-headerline)))
+    (dired-insert-set-headerline-properties-internal (car position)
+						     (cdr position))))
+  
+(defun dired-get-headerline ()
+  ;; Get the bufffer position of the current directory header line
+  (save-excursion
+    (beginning-of-line)
+    (save-match-data
+      (re-search-forward " *\\(.*\\):$" nil t)
+      ;; Return begin and end pair
+      (cons (match-beginning 1) (match-end 1)))))
+
+(defun dired-insert-set-headerline-properties-internal (b e)
+  (let ((extent (make-extent b e)))
+    (set-extent-face extent 'dired-face-header)
+    (set-extent-property extent 'keymap dired-headerline-local-map)
+    (set-extent-property extent 'highlight t)
+    (set-extent-property
+     extent 'help-echo
+     "button2 do dired this window.")))
+
+(defvar dired-headerline-local-map 
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-name map 'dired-headerline-local-map)
+    (define-key map [button2] 'dired-headerline-dired)
+    (define-key map [(shift button2)] 'dired-headerline-dired-other-window)
+    (define-key map [(meta button2)] 'dired-headerline-dired-other-frame)
+    ;; 
+    (define-key map "f" 'dired-headerline-dired-by-key)
+    (define-key map "o" 'dired-headerline-dired-other-window-by-key)
+    (define-key map "w" 'dired-headerline-dired-frame-window-by-key)
+    map)
+  "Keymap used to activate actions on the header line in dired directory.")
+
+(defun dired-split-headerline (dir)
+  ;; (dired-split-headerline "/")
+  ;; => (list "/")
+  ;;
+  ;; (dired-split-headerline "/a/b/c")
+  ;; => (list  "/" "/a" "/a/b" "/a/b/c")
+  ;;
+  ;; (dired-split-headerline "/masat-y@foo:/a")
+  ;; => (list  "/"  "/masat-y@foo:/" "/masat-y@foo:/a")
+  ;; 
+  ;; (dired-split-headerline "/masat-y@foo:/")
+  ;; => (list  "/"  "/masat-y@foo:/")
+  
+  (let ((dirlist (cons dir nil))
+	(lastdir dir))			; To check double entry item
+    (setq dir (directory-file-name
+	       (file-name-directory  dir)))
+    (while (not (string= dir lastdir))
+      (setq dirlist (cons dir dirlist)
+	    lastdir dir
+	    dir (directory-file-name 
+		     (file-name-directory dir))))
+    ;; Add "/" if it is not in `dirlist'.
+    (if (not (string= (car dirlist) "/")) 
+	(setq dirlist (cons "/" dirlist)))
+    dirlist))
+
+;; by mouse
+(defun dired-headerline-dired (event)
+  "On the header line in dired, visit the parent directory."
+  (interactive "e")
+  (dired-headerline-dired-internal event 'dired "Dired"))
+
+(defun dired-headerline-dired-other-window (event)
+  "On the header line in dired, visit the parent directory in another window."
+  (interactive "e")
+  (dired-headerline-dired-internal event 
+				   'dired-other-window
+				   "Dired in Other Window"))
+
+(defun dired-headerline-dired-other-frame (event)
+  "On the header line in dired, visit the parent directory in another frame."
+  (interactive "e")
+  (dired-headerline-dired-internal event 
+				   'dired-other-frame
+				   "Dired in Other Frame"))
+
+(defun dired-headerline-dired-internal (event func title)
+  ;;
+  ;; Header line:  /a/b/c
+  ;; =>
+  ;; Popup menu: TITLE
+  ;;             ------
+  ;;             /a/b/c
+  ;;             /a/b
+  ;;             /a
+  ;;             /
+  ;;
+  (interactive "e")
+  (let (dirlist)
+    ;;
+    ;; Get directory list
+    ;;
+    (let (points basedir)
+      (save-excursion
+	(set-buffer (window-buffer (event-window event)))
+	(save-excursion
+	  (goto-char (event-point event))
+	  (setq points (dired-get-headerline)
+		dirlist (dired-split-headerline
+			 (buffer-substring (car points) (cdr points)))))))
+    ;;
+    ;; Create menu and popup it
+    ;;
+    (let (v items dir)
+      (while dirlist
+	(setq dir (car dirlist)
+	      dirlist (cdr dirlist)
+	      v (make-vector 3 0))
+	(aset v 0 dir) (aset v 1 (list func dir)) (aset v 2 t)
+	(setq items (cons v items)))
+      (popup-menu (cons title items)))))
+
+;; By key
+(defun dired-headerline-dired-by-key (p)
+  "On the header line in dired, visit the parent directory under ther cursor."
+  (interactive "d")
+  (dired-headerline-dired-by-key-internal p 'dired))
+
+(defun dired-headerline-dired-other-window-by-key (p)
+  "On the header line in dired, visit the parent directory under ther cursor on another window."
+  (interactive "d")
+  (dired-headerline-dired-by-key-internal p 'dired-other-window))
+
+(defun dired-headerline-dired-other-frame-by-key (p)
+  "On the header line in dired, visit the parent directory under ther cursor on another frame."
+  (interactive "d")
+  (dired-headerline-dired-by-key-internal p 'dired-other-frame))
+
+(defun dired-headerline-dired-by-key-internal (p func)
+  (let ((points (dired-get-headerline))
+	dirlist
+	basedir
+	dir
+	(check-remote nil))
+    ;; A function that checks the headerline shows remote directry.
+    (fset 'check-remote (lambda (str)
+			  (save-match-data (string-match "/.*@.*:/" str))))
+
+    ;; Calculate position in headerline
+    (setq p       (- p (car points)))
+
+    ;; Get directory list
+    (setq basedir (buffer-substring (car points) (cdr points)))
+    (setq dirlist (dired-split-headerline basedir))
+
+    ;; Which directory 'p' in on...
+    (setq dir
+	  (catch 'found
+	    ;;
+	    ;; P points out Root directory?
+	    (if (= p 0)
+		;; p is on "/"
+		(throw 'found "/") 
+	      ;; p is not on "/".
+	      (setq dirlist (cdr dirlist)))
+	    ;;
+	    ;; P points out remote host name field.
+	    ;;
+	    (if (and dirlist 
+		     (apply 'check-remote (list (car dirlist)))) 
+		;; P points out remote host field in headerline?
+		(if (< p (length (car dirlist))) 
+		    (throw 'found (car dirlist))
+		  ;; P points out remote directory not remote host field.
+		  (setq dirlist (cdr dirlist))))
+	    ;;
+	    ;; Find p  from directory list
+	    ;;
+	    (let (tmpdir)
+	      (while  dirlist
+		(setq tmpdir (car dirlist))
+		(if (<= p (length tmpdir))
+		    (throw 'found tmpdir)
+		  (setq dirlist (cdr dirlist))))
+	      nil)
+	    ))
+    ;;
+    ;; Run dired
+    ;;
+    (if (string= dir basedir)
+	(revert-buffer dir)
+      (funcall func dir))))
+
 ;;; end of dired-xemacs.el
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-xy.el
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; RCS:
 ;; Description:   Commands for reading mail from dired.
 ;;
 
 ;;; Special request: Will an mh-e user please write some mh support in here?
 
+;;;###autoload
 (defun dired-read-mail (&optional arg)
   "Reads the current file as a mail folder.
 Uses the setting of `dired-mail-reader' to determine which reader to use.
    (t (error "Never heard of the mail reader %s" dired-mail-reader))))
 
 ;; Read-only folders only work in VM 5, not in VM 4.
+;;;###autoload
 (defun dired-vm (&optional read-only)
   "Run VM on this file.
 With prefix arg, visit folder read-only (this requires at least VM 5).
     ;; so that pressing `v' inside VM does prompt within current directory:
     (set (make-local-variable 'vm-folder-directory) dir)))
 
+;;;###autoload
 (defun dired-rmail ()
   "Run RMAIL on this file."
   (interactive)
 ;;
 ;; File:          dired.el
 ;; RCS:           
-;; Dired Version: #Revision: 7.9 $
+;; Dired Version: #Revision: 7.10 $
 ;; Description:   The DIRectory EDitor is for manipulating, and running
 ;;                commands on files in a directory.
 ;; Authors:       FSF,
 
 ;;; Dired Version
 
-(defconst dired-version (substring "#Revision: 7.9 $" 11 -2)
+(defconst dired-version (substring "#Revision: 7.10 $" 11 -2)
   "The revision number of Tree Dired (as a string).
 
 Don't forget to mention this when reporting bugs to:
    
-   efs-bugs@cuckoo.hpl.hp.com")
+   efs-bugs@hplb.hpl.hp.com")
 
 ;; Global key bindings:
 ;; --------------------
     ;; pack support may not work well.  pack is too chatty and there is no way
     ;; to force overwrites.
     (pack     ".z"  ("pack" "-f")     ("unpack"))
-    (compact  ".C"  ("compact")       ("uncompact")))
+    (compact  ".C"  ("compact")       ("uncompact"))
+    (bzip2    ".bz2" ("bzip2")        ("bunzip2") "-f"))
   
   "*Association list of compression method descriptions.
  Each element of the table should be a list of the form
 
 Note that this list also applies to remote files accessed with efs
 or ange-ftp."
-  :type '(set (byte-compile chgrp chmod chown compress copy
-			    delete hardlink load move print
-			    shell symlink uncompress recursive-delete
-			    kill-file-buffer kill-dired-buffer patch
-			    create-top-dir revert-subdirs))
-  :group 'dired-behavior)
+  :type '(set (const byte-compile) (const chgrp) (const chmod)
+	      (const chown) (const compress) (const copy)
+	      (const delete) (const hardlink) (const load)
+	      (const move) (const print) (const shell)
+	      (const symlink) (const uncompress)
+	      (const recursive-delete) (const kill-file-buffer)
+	      (const kill-dired-buffer) (const patch)
+	      (const create-top-dir) (const revert-subdirs))
+:group 'dired-behavior)
 		      
 ;;;###autoload
 (defcustom dired-backup-if-overwrite nil
   "*List of extensions for file names that will be omitted (buffer-local).
 This only has effect when the subdirectory is in omission mode.
 To make omission mode the default, set `dired-omit-files' to t.
-See also `dired-omit-extensions'."
+See also `dired-omit-regexps'."
   :type '(list string)
   :group 'dired-file-names)
 (make-variable-buffer-local 'dired-omit-extensions)
 (defvar dired-re-dot "^.* \\.\\.?/?$")	; with -F, might end in `/'
 ;; . and .. files