From dfeb87d8e54ee5f2ce3e16d34a812131bb2f6e4d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 26 Mar 2020 10:58:30 +0100 Subject: [PATCH] Turn compilation-error-case-fold-search into a defvar See bug#40119, and the discussion at https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00653.html * lisp/progmodes/compile.el (compilation-error-case-fold-search): Turn into a defvar. * etc/NEWS: Update. --- etc/NEWS | 6 ++++-- lisp/progmodes/compile.el | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 49b7fcd8c21..870d39f7eef 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -218,8 +218,10 @@ 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. +The variable 'compilation-error-case-fold-search' can be set for +case-insensitive matching of messages when the old behaviour is +required, but the recommended solution is to use a correctly matching +regexp instead. * New Modes and Packages in Emacs 28.1 diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f4532b7edb7..e5878b28f96 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -646,13 +646,15 @@ 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 +(defvar 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") +If nil, matching is case-sensitive. + +This variable should only be set for backward compatibility as a temporary +measure. The proper solution is to use a regexp that matches the +messages without case-folding.") ;;;###autoload(put 'compilation-directory 'safe-local-variable 'stringp) (defvar compilation-directory nil -- 2.39.2