diff options
author | Eduard Wiebe <usenet@pusto.de> | 2010-11-27 11:56:49 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-11-27 11:56:49 +0200 |
commit | d1882ac7c91cbaa51aeea68433f1867e73a431c2 (patch) | |
tree | 16483fbbb771b967bca9ebfaa30bf5bde90e4afc /lisp/locate.el | |
parent | da2b5401e8747adb28558684b48328806bf43e1e (diff) | |
download | emacs-d1882ac7c91cbaa51aeea68433f1867e73a431c2.tar.gz |
Fix bug #7308 with `locate' on MS-Windows.
dired.el (dired-get-filename): Replace backslashes with slashes
in file names on MS-Windows, needed by `locate'.
locate.el (locate-default-make-command-line): Don't consider
drive letter and root directory part of
`directory-listing-before-filename-regexp'.
(locate-post-command-hook, locate-post-command-hook): New defcustoms.
Diffstat (limited to 'lisp/locate.el')
-rw-r--r-- | lisp/locate.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/locate.el b/lisp/locate.el index ce1154c9739..d5caf8615cd 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -145,6 +145,11 @@ the version.)" :type 'string :group 'locate) +(defcustom locate-post-command-hook nil + "List of hook functions run after `locate' (see `run-hooks')." + :type 'hook + :group 'locate) + (defvar locate-history-list nil "The history list used by the \\[locate] command.") @@ -226,6 +231,11 @@ that is, with a prefix arg, you get the default behavior." :group 'locate :type 'boolean) +(defcustom locate-mode-hook nil + "List of hook functions run by `locate-mode' (see `run-mode-hooks')." + :type 'hook + :group 'locate) + ;; Functions (defun locate-default-make-command-line (search-string) @@ -471,9 +481,9 @@ do not work in subdirectories. (make-local-variable 'directory-listing-before-filename-regexp) ;; This should support both Unix and Windoze style names (setq directory-listing-before-filename-regexp - (concat "^." + (concat "^.\\(" (make-string (1- locate-filename-indentation) ?\s) - "\\(/\\|[A-Za-z]:\\)\\|" + "\\)\\|" (default-value 'directory-listing-before-filename-regexp))) (make-local-variable 'dired-actual-switches) (setq dired-actual-switches "") |