[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d08c947: Make compilation-mode regexp matching case-sensitive (bu
From: |
Mattias Engdegård |
Subject: |
master d08c947: Make compilation-mode regexp matching case-sensitive (bug#40119) |
Date: |
Wed, 25 Mar 2020 16:41:56 -0400 (EDT) |
branch: master
commit d08c9472e821615da06f92756e49c271be8da7f1
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Make compilation-mode regexp matching case-sensitive (bug#40119)
The number of regexps is large, they are written independently of one
another, and they frequently intersect. Using case-sensitive matching
improves separation and performance, and is probably what everyone
have being assuming was used by compilation-mode all along.
* lisp/progmodes/compile.el (compilation-error-case-fold-search): New.
(compilation-parse-errors): Bind case-fold-search to
compilation-error-case-fold-search during matching.
* etc/NEWS: Announce.
---
etc/NEWS | 6 ++++++
lisp/progmodes/compile.el | 11 ++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 1be5ad6..910d9fa 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -196,6 +196,12 @@ key binding
*** New user option 'gravatar-service' for host to query for gravatars.
Defaults to Libravatar, with Unicornify and Gravatar as options.
+** Compilation mode
+
+*** Regexp matching of messages is now case-sensitive by default.
+The user option 'compilation-error-case-fold-search' can be set
+for case-insensitive matching of messages.
+
* New Modes and Packages in Emacs 28.1
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 455f181..f4532b7 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -646,6 +646,14 @@ matched file names, and weeding out false positives."
:link `(file-link :tag "example file"
,(expand-file-name "compilation.txt" data-directory)))
+(defcustom compilation-error-case-fold-search nil
+ "If non-nil, use case-insensitive matching of compilation errors
+by the regexps of `compilation-error-regexp-alist' and
+`compilation-error-regexp-alist-alist'.
+If nil, matching is case-sensitive."
+ :type 'boolean
+ :version "28.1")
+
;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp)
(defvar compilation-directory nil
"Directory to restore to when doing `recompile'.")
@@ -1435,7 +1443,8 @@ to `compilation-error-regexp-alist' if RULES is nil."
(if (symbolp item)
(setq item (cdr (assq item
compilation-error-regexp-alist-alist))))
- (let ((file (nth 1 item))
+ (let ((case-fold-search compilation-error-case-fold-search)
+ (file (nth 1 item))
(line (nth 2 item))
(col (nth 3 item))
(type (nth 4 item))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d08c947: Make compilation-mode regexp matching case-sensitive (bug#40119),
Mattias Engdegård <=