]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-isearch-filter-predicate-orig): Rename from
authorJuri Linkov <juri@jurta.org>
Mon, 17 Nov 2008 00:43:27 +0000 (00:43 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 17 Nov 2008 00:43:27 +0000 (00:43 +0000)
`dired-isearch-orig-success-function'.
(dired-isearch-filenames-toggle, dired-isearch-filenames-setup)
(dired-isearch-filenames-end): Rename `isearch-success-function' to
`isearch-filter-predicate'.  Doc fix.
(dired-isearch-filter-filenames): Rename from
`dired-isearch-success-function'.

lisp/dired-aux.el

index 930c4e32340c53675d4f4bc64139e30208d6879b..1df5dc82dcff89e52fe72f2b5f7a6ab75bc58cc0 100644 (file)
@@ -2310,19 +2310,18 @@ Use \\[dired-hide-subdir] to (un)hide a particular subdirectory."
   :group 'dired
   :version "23.1")
 
-(defvar dired-isearch-orig-success-function nil)
+(defvar dired-isearch-filter-predicate-orig nil)
 
 (defun dired-isearch-filenames-toggle ()
   "Toggle file names searching on or off.
-When on, Isearch checks the success of the current matching point
-using the function `dired-isearch-success-function' that matches only
-at file names.  When off, it uses the default function
-`isearch-success-function-default'."
+When on, Isearch skips matches outside file names using the predicate
+`dired-isearch-filter-filenames' that matches only at file names.
+When off, it uses the default predicate `isearch-filter-invisible'."
   (interactive)
-  (setq isearch-success-function
-       (if (eq isearch-success-function 'dired-isearch-success-function)
-           'isearch-success-function-default
-         'dired-isearch-success-function))
+  (setq isearch-filter-predicate
+       (if (eq isearch-filter-predicate 'dired-isearch-filter-filenames)
+           'isearch-filter-invisible
+         'dired-isearch-filter-filenames))
   (setq isearch-success t isearch-adjusted t)
   (isearch-update))
 
@@ -2332,20 +2331,20 @@ at file names.  When off, it uses the default function
 Intended to be added to `isearch-mode-hook'."
   (when dired-isearch-filenames
     (define-key isearch-mode-map "\M-sf" 'dired-isearch-filenames-toggle)
-    (setq dired-isearch-orig-success-function
-         (default-value 'isearch-success-function))
-    (setq-default isearch-success-function 'dired-isearch-success-function)
+    (setq dired-isearch-filter-predicate-orig
+         (default-value 'isearch-filter-predicate))
+    (setq-default isearch-filter-predicate 'dired-isearch-filter-filenames)
     (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t)))
 
 (defun dired-isearch-filenames-end ()
   "Clean up the Dired file name search after terminating isearch."
   (define-key isearch-mode-map "\M-sf" nil)
-  (setq-default isearch-success-function dired-isearch-orig-success-function)
+  (setq-default isearch-filter-predicate dired-isearch-filter-predicate-orig)
   (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t))
 
-(defun dired-isearch-success-function (beg end)
+(defun dired-isearch-filter-filenames (beg end)
   "Match only at visible regions with the text property `dired-filename'."
-  (and (isearch-success-function-default beg end)
+  (and (isearch-filter-invisible beg end)
        (if dired-isearch-filenames
           (text-property-not-all (min beg end) (max beg end)
                                  'dired-filename nil)