Commit 98f8c5fb authored by Filipp Gunbin's avatar Filipp Gunbin

Do not call custom-reevaluate-setting in dired-isearch-filenames-end

  * lisp/dired-aux.el (dired-isearch-filenames-end)
  (dired-isearch-filenames, dired-isearch-filenames-regexp): Use
  temporary local variable for dired-isearch-filenames instead of
  custom-reevaluate-setting (Bug#30187).  Without this fix, the value
  set in .emacs with plain setq would be lost after one isearch.
parent af724ed5
Pipeline #4191 failed with stage
in 55 minutes and 57 seconds
......@@ -2876,7 +2876,7 @@ Intended to be added to `isearch-mode-hook'."
(dired-isearch-filenames-mode -1)
(remove-hook 'isearch-mode-end-hook #'dired-isearch-filenames-end t)
(unless isearch-suspended
(custom-reevaluate-setting 'dired-isearch-filenames)))
(kill-local-variable 'dired-isearch-filenames)))
(defun dired-isearch-filter-filenames (beg end)
"Test whether some part of the current search match is inside a file name.
......@@ -2889,14 +2889,14 @@ is part of a file name (i.e., has the text property `dired-filename')."
(defun dired-isearch-filenames ()
"Search for a string using Isearch only in file names in the Dired buffer."
(interactive)
(setq dired-isearch-filenames t)
(set (make-local-variable 'dired-isearch-filenames) t)
(isearch-forward nil t))
;;;###autoload
(defun dired-isearch-filenames-regexp ()
"Search for a regexp using Isearch only in file names in the Dired buffer."
(interactive)
(setq dired-isearch-filenames t)
(set (make-local-variable 'dired-isearch-filenames) t)
(isearch-forward-regexp nil t))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment