-;;; dired-x.el --- Extra Dired functionality -*-byte-compile-dynamic: t;-*-
+;;; dired-x.el --- extra Dired functionality -*-byte-compile-dynamic: t;-*-
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
;; Maintainer: FSF (unless Dodd can be found)
;; Version: 2.37+
;; Date: 1994/08/18 19:27:42
-;; Keywords: dired extensions
+;; Keywords: dired extensions files
-;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1997, 2001 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;; Commentary:
;; This is Sebastian Kremer's excellent dired-x.el (Dired Extra), version
-;; 1.191, hacked up for GNU Emacs 19. Redundant or conflicting material
-;; has been removed or renamed in order to work properly with dired of
-;; GNU Emacs 19. All suggestions or comments are most welcomed.
+;; 1.191, hacked up for GNU Emacs. Redundant or conflicting material has
+;; been removed or renamed in order to work properly with dired of GNU
+;; Emacs. All suggestions or comments are most welcomed.
;;
;; Please, PLEASE, *PLEASE* see the info pages.
(interactive)
(dired-jump t))
\f
-;;; COPY NAMES OF MARKED FILES INTO KILL-RING.
-
-(defun dired-copy-filename-as-kill (&optional arg)
- "Copy names of marked (or next ARG) files into the kill ring.
-The names are separated by a space.
-With a zero prefix arg, use the complete pathname of each marked file.
-With \\[universal-argument], use the relative pathname of each marked file.
-
-If on a subdir headerline, use subdirname instead; prefix arg is ignored
-in this case.
-
-You can then feed the file name(s) to other commands with \\[yank]."
- (interactive "P")
- (let ((string
- (or (dired-get-subdir)
- (mapconcat (function identity)
- (if arg
- (cond ((zerop (prefix-numeric-value arg))
- (dired-get-marked-files))
- ((integerp arg)
- (dired-get-marked-files 'no-dir arg))
- (t ; else a raw arg
- (dired-get-marked-files t)))
- (dired-get-marked-files 'no-dir))
- " "))))
- (kill-new string)
- (message "%s" string)))
-
-\f
;;; OMITTING.
;;; Enhanced omitting of lines from directory listings.
(defun dired-omit-startup ()
(or (assq 'dired-omit-files-p minor-mode-alist)
(setq minor-mode-alist
- (append '((dired-omit-files-p " Omit")) minor-mode-alist))))
+ (append '((dired-omit-files-p
+ (:eval (if (eq major-mode 'dired-mode)
+ " Omit" ""))))
+ minor-mode-alist))))
(defun dired-omit-toggle (&optional flag)
"Toggle omitting files matching `dired-omit-files' and `dired-omit-extensions'.
(defun dired-virtual-guess-dir ()
"Guess and return appropriate working directory of this buffer.
-Th ebuffer is assumed to be in Dired or ls -lR format. The guess is
+The buffer is assumed to be in Dired or ls -lR format. The guess is
based upon buffer contents. If nothing could be guessed, returns
nil."