From: Paul Eggert Date: Sun, 8 Jul 2018 17:00:17 +0000 (-0700) Subject: Fix etc/HELLO searching in grep.el X-Git-Tag: emacs-27.0.90~4703 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9d09ced1d5d124893fbe9c176f821f6716e91392;p=emacs.git Fix etc/HELLO searching in grep.el * lisp/progmodes/grep.el (grep-compute-defaults): Search for "^Copyright", not "^English", as the latter is no longer present in etc/HELLO and the former is more likely to survive future changes to etc/HELLO (Bug#32093). --- diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index b7c44d60838..519b768ab40 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -632,22 +632,22 @@ This function is called from `compilation-filter-hook'." ;; `grep-command' is already set, so ;; use that for testing. (grep-probe grep-command - `(nil t nil "^English" ,hello-file) + `(nil t nil "^Copyright" ,hello-file) #'call-process-shell-command) ;; otherwise use `grep-program' (grep-probe grep-program - `(nil t nil "-nH" "^English" ,hello-file))) + `(nil t nil "-nH" "^Copyright" ,hello-file))) (progn (goto-char (point-min)) (looking-at (concat (regexp-quote hello-file) - ":[0-9]+:English"))))))))) + ":[0-9]+:Copyright"))))))))) (when (eq grep-use-null-filename-separator 'auto-detect) (setq grep-use-null-filename-separator (with-temp-buffer (let* ((hello-file (expand-file-name "HELLO" data-directory)) - (args `("--null" "-ne" "^English" ,hello-file))) + (args `("--null" "-ne" "^Copyright" ,hello-file))) (if grep-use-null-device (setq args (append args (list null-device))) (push "-H" args)) @@ -656,7 +656,7 @@ This function is called from `compilation-filter-hook'." (goto-char (point-min)) (looking-at (concat (regexp-quote hello-file) - "\0[0-9]+:English")))))))) + "\0[0-9]+:Copyright")))))))) (when (eq grep-highlight-matches 'auto-detect) (setq grep-highlight-matches