[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33618: better fix
From: |
Stephen Leake |
Subject: |
bug#33618: better fix |
Date: |
Sat, 20 Apr 2019 08:47:47 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
`grep-mode' is defined by `define-compilation-mode', which sets
`compilation-search-path' to a buffer-local copy of `grep-search-path',
if the latter is defined.
So there is precedent for making custom vars buffer-local, and it seems
the proper fix for this bug is to define `grep-search-path':
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -441,6 +441,14 @@ grep-find-abbreviate
:version "27.1"
:group 'grep)
+(defcustom grep-search-path '(nil)
+ "Search path for grep results.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+ :group 'grep
+ :type '(repeat (choice (const :tag "Default" nil)
+ (string :tag "Directory"))))
+
(defvar grep-find-abbreviate-properties
(let ((ellipsis (if (char-displayable-p ?…) "[…]" "[...]"))
(map (make-sparse-keymap)))
`emacs-lisp-compilation-mode' needs a similar fix:
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1022,6 +1022,14 @@ emacs-lisp-compilation-parse-errors-filename-function
"The value for `compilation-parse-errors-filename-function' for when
we go into emacs-lisp-compilation-mode.")
+(defcustom emacs-lisp-compilation-search-path '(nil)
+ "Search path for byte-compile error messages.
+Elements should be directory names, not file names of directories.
+The value nil as an element means to try the default directory."
+ :group 'bytecomp
+ :type '(repeat (choice (const :tag "Default" nil)
+ (string :tag "Directory"))))
+
(define-compilation-mode emacs-lisp-compilation-mode "elisp-compile"
"The variant of `compilation-mode' used for emacs-lisp error buffers")
--
-- Stephe
- bug#33618: better fix,
Stephen Leake <=