From fa80f93ad1596d9c7e3dc1b7d0af61a1cc0b9ed3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 18 Mar 2019 14:25:49 -0400 Subject: [PATCH] * lisp/locate.el (locate-mode): Setup invisibility for Dired commands Also, use lexical-binding. --- lisp/locate.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/locate.el b/lisp/locate.el index 106f805038a..452f74610fb 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -1,4 +1,4 @@ -;;; locate.el --- interface to the locate command +;;; locate.el --- interface to the locate command -*- lexical-binding:t -*- ;; Copyright (C) 1996, 1998, 2001-2019 Free Software Foundation, Inc. @@ -261,7 +261,7 @@ that is, with a prefix arg, you get the default behavior." "Run locate (like this): " (cons (concat (car locate-cmd) " " - (mapconcat 'identity (cdr locate-cmd) " ")) + (mapconcat #'identity (cdr locate-cmd) " ")) (+ 2 (length (car locate-cmd)))) nil nil 'locate-history-list)) (let* ((default (locate-word-at-point)) @@ -313,7 +313,7 @@ then `locate-post-command-hook'." (and (not arg) locate-prompt-for-command)))) ;; Find the Locate buffer - (save-window-excursion + (save-window-excursion ;FIXME: What window-excursion? (set-buffer (get-buffer-create locate-buffer-name)) (locate-mode) (let ((inhibit-read-only t) @@ -327,7 +327,7 @@ then `locate-post-command-hook'." (if run-locate-command (shell-command search-string locate-buffer-name) - (apply 'call-process locate-cmd nil t nil locate-cmd-args)) + (apply #'call-process locate-cmd nil t nil locate-cmd-args)) (and filter (locate-filter-output filter)) @@ -466,8 +466,8 @@ do not work in subdirectories. ;; Avoid clobbering this variable (make-local-variable 'dired-subdir-alist) (setq default-directory "/" - buffer-read-only t - selective-display t) + buffer-read-only t) + (add-to-invisibility-spec '(dired . t)) (dired-alist-add-1 default-directory (point-min-marker)) (set (make-local-variable 'dired-directory) "/") (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) @@ -554,7 +554,7 @@ do not work in subdirectories. locate-regexp-match (concat locate-regexp-match ":\n")) - (insert (apply 'format locate-format-string (reverse locate-format-args))) + (insert (apply #'format locate-format-string (reverse locate-format-args))) (save-excursion (goto-char (point-min)) -- 2.39.2