diff options
Diffstat (limited to 'lisp/find-lisp.el')
-rw-r--r-- | lisp/find-lisp.el | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index 3428a151522..2f432936033 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el @@ -212,24 +212,17 @@ It is a function which takes two arguments, the directory and its parent." (use-local-map (append (make-sparse-keymap) (current-local-map))) - (make-local-variable 'find-lisp-file-predicate) - (setq find-lisp-file-predicate file-predicate) - (make-local-variable 'find-lisp-directory-predicate) - (setq find-lisp-directory-predicate directory-predicate) - (make-local-variable 'find-lisp-regexp) - (setq find-lisp-regexp regexp) - - (make-local-variable 'revert-buffer-function) - (setq revert-buffer-function - (function - (lambda (_ignore1 _ignore2) - (find-lisp-insert-directory - default-directory - find-lisp-file-predicate - find-lisp-directory-predicate - 'ignore) - ) - )) + (setq-local find-lisp-file-predicate file-predicate) + (setq-local find-lisp-directory-predicate directory-predicate) + (setq-local find-lisp-regexp regexp) + + (setq-local revert-buffer-function + (lambda (_ignore1 _ignore2) + (find-lisp-insert-directory + default-directory + find-lisp-file-predicate + find-lisp-directory-predicate + 'ignore))) ;; Set subdir-alist so that Tree Dired will work: (if (fboundp 'dired-simple-subdir-alist) @@ -238,8 +231,8 @@ It is a function which takes two arguments, the directory and its parent." (dired-simple-subdir-alist) ;; else we have an ancient tree dired (or classic dired, where ;; this does no harm) - (set (make-local-variable 'dired-subdir-alist) - (list (cons default-directory (point-min-marker))))) + (setq-local dired-subdir-alist + (list (cons default-directory (point-min-marker))))) (find-lisp-insert-directory dir file-predicate directory-predicate 'ignore) (goto-char (point-min)) @@ -267,11 +260,10 @@ It is a function which takes two arguments, the directory and its parent." (insert find-lisp-line-indent "\n") ;; Run the find function (mapc - (function - (lambda (file) - (find-lisp-find-dired-insert-file - (substring file len) - (current-buffer)))) + (lambda (file) + (find-lisp-find-dired-insert-file + (substring file len) + (current-buffer))) (sort files 'string-lessp)) ;; FIXME: Sort function is ignored for now ;; (funcall sort-function files)) |