X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/4a47c2757309e338321da1e7a2f6d399a306ce7d..7d0c323f58edf5b4e557233fd268215de2b1db4a:/lisp/locate.el diff --git a/lisp/locate.el b/lisp/locate.el index 4e8925665c..29d7c75cbb 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -1,7 +1,6 @@ ;;; locate.el --- interface to the locate command -;; Copyright (C) 1996, 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1998, 2001-2012 Free Software Foundation, Inc. ;; Author: Peter Breton ;; Keywords: unix files @@ -145,6 +144,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 +230,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 +480,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 "") @@ -579,7 +588,7 @@ do not work in subdirectories. (message "This command only works inside main listing."))) ;; From Stephen Eglen -(defun locate-update (ignore1 ignore2) +(defun locate-update (_ignore1 _ignore2) "Revert the *Locate* buffer. If `locate-update-when-revert' is non-nil, offer to update the locate database using the shell command in `locate-update-command'."