]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix etc/HELLO searching in grep.el
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>
Sun, 8 Jul 2018 17:00:17 +0000 (10:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Jul 2018 17:01:33 +0000 (10:01 -0700)
* 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).

lisp/progmodes/grep.el

index b7c44d60838c390cf9e2a33fe21a001f602a96ca..519b768ab40c8f1b5c4cc3c9f18007b1b7d3f2f2 100644 (file)
@@ -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