diff options
author | Juri Linkov <juri@jurta.org> | 2008-07-29 14:42:07 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2008-07-29 14:42:07 +0000 |
commit | eae2c85eec693a0ffed2fa5f3edf43f3d4ac2845 (patch) | |
tree | 89bee615794145f728542b2fa706371d668d454f /lisp | |
parent | 32b1a27f286c7d588ef3c49559d3ecd08d1ef154 (diff) | |
download | emacs-eae2c85eec693a0ffed2fa5f3edf43f3d4ac2845.tar.gz |
(dired-insert-set-properties): Add new text property
`dired-filename' to put on file names.
(dired-mode-map): Bind `M-s f C-s' to `dired-isearch-filenames'
and `M-s f M-C-s' to `dired-isearch-filenames-regexp'.
Add menu items.
(dired-mode): Add hook `dired-isearch-filenames-setup' to
buffer-local `isearch-mode-hook'.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/dired.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index fdfac22b1e3..311744eeca0 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1068,6 +1068,7 @@ If HDR is non-nil, insert a header line with the directory name." (dired-move-to-end-of-filename) (point)) '(mouse-face highlight + dired-filename t help-echo "mouse-2: visit this file in other window"))) (error nil)) (forward-line 1)))) @@ -1298,6 +1299,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." ;; isearch (define-key map (kbd "M-s a C-s") 'dired-do-isearch) (define-key map (kbd "M-s a M-C-s") 'dired-do-isearch-regexp) + (define-key map (kbd "M-s f C-s") 'dired-isearch-filenames) + (define-key map (kbd "M-s f M-C-s") 'dired-isearch-filenames-regexp) ;; misc (define-key map "\C-x\C-q" 'dired-toggle-read-only) (define-key map "?" 'dired-summary) @@ -1409,6 +1412,12 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate dashes] '("--")) + (define-key map [menu-bar immediate isearch-filenames-regexp] + '(menu-item "Isearch Regexp in File Names..." dired-isearch-filenames-regexp + :help "Incrementally search for regexp in file names only")) + (define-key map [menu-bar immediate isearch-filenames] + '(menu-item "Isearch in File Names..." dired-isearch-filenames + :help "Incrementally search for string in file names only.")) (define-key map [menu-bar immediate compare-directories] '(menu-item "Compare Directories..." dired-compare-directories :help "Mark files with different attributes in two dired buffers")) @@ -1723,6 +1732,7 @@ Keybindings: (when (featurep 'dnd) (set (make-local-variable 'dnd-protocol-alist) (append dired-dnd-protocol-alist dnd-protocol-alist))) + (add-hook 'isearch-mode-hook 'dired-isearch-filenames-setup nil t) (run-mode-hooks 'dired-mode-hook)) ;; Idiosyncratic dired commands that don't deal with marks. |