X-Loop: help-debbugs@HIDDEN Subject: bug#58518: 29.0.50; [PATCH] Turning off compilation-minor-mode removes fontification of other modes Resent-From: miha@HIDDEN Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 14 Oct 2022 15:16:02 +0000 Resent-Message-ID: <handler.58518.B.166576055525566 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 58518 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 58518 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.166576055525566 (code B ref -1); Fri, 14 Oct 2022 15:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 15:15:55 +0000 Received: from localhost ([127.0.0.1]:38340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ojMPi-0006eI-Tr for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 11:15:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:60878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <miha@HIDDEN>) id 1ojMPg-0006e8-5D for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 11:15:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <miha@HIDDEN>) id 1ojMPb-0007Y1-6g for bug-gnu-emacs@HIDDEN; Fri, 14 Oct 2022 11:15:47 -0400 Received: from kamnitnik.top ([209.250.245.214]:48332) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <miha@HIDDEN>) id 1ojMPH-0007z4-RC for bug-gnu-emacs@HIDDEN; Fri, 14 Oct 2022 11:15:43 -0400 From: miha@HIDDEN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1665760524; bh=Q9Xenp0MfdQ+oLzHraPzEPVHklToSlBgjIyd0amhhzc=; h=From:To:Subject:Date:From; b=pgjWvCJseXQ5YkhvIyiTLgP1qIgc3YZKLaXrU1Ge1uKn81sdV1KBLtw9hCeW4b/yf NZVgWda5vvi2/rDVCaNdx/Tra1+84P33EQhKTt7Tq6nxzMx0yirzlpxn1UlhbArhip 0MyuzR4fzDy19QRCxEo6N5mqvetKnM41njZ7qDN1/gsaFwfzpLVwGRDKW/y5DruEx2 pcDfqKcwPdNTxM52afNW8ZXH4wvNMkW2+YyCpOGTWWtktrVwR0eQx7g5XmMtVB+t7I IadI3IUdIrHmIFpgTSeQk/2YzNEwou5clsW3KVWvmqeN6i60MBSaWlJ4lIOos46kIP VMDbi8oDOJy5w== Date: Fri, 14 Oct 2022 17:15:24 +0200 Message-ID: <87pmeue8s3.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=209.250.245.214; envelope-from=miha@HIDDEN; helo=kamnitnik.top X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.082, FROM_SUSPICIOUS_NTLD_FP=1.999, SPF_PASS=-0.001, T_PDS_OTHER_BAD_TLD=0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I propose the attached patch, which fixes the following problem: 1. M-x shell 2. grep -R -n --color=always 'some-search-string-which-yeilds-resuts' File names and line numbers output by grep should be in color 3. M-x compilation-shell-minor-mode File names and line [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.0 FROM_SUSPICIOUS_NTLD From abused NTLD X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.4 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain I propose the attached patch, which fixes the following problem: 1. M-x shell 2. grep -R -n --color=always 'some-search-string-which-yeilds-resuts' File names and line numbers output by grep should be in color 3. M-x compilation-shell-minor-mode File names and line numbers are now underlined by compile.el 4. M-x compilation-shell-minor-mode, to turn it back off File names and line numbers lose their fontification completely, that is, they are now in the default face. The attached patch makes them return to the face they had after step 2, as specified by the grep command. It also "name-spaces" other text properties used by compile.el, such as keymap and mouse-face. If other minor or major modes make use of these text properties, turning off compilation-shell-minor-mode or compilation-minor-mode should now leave them alone. (Though the ones from compile.el take precedence as long as compilation-*-mode is active.) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-compile-Don-t-clobber-text-properties-of-other-modes.patch Content-Transfer-Encoding: quoted-printable From=200b60dc0bfbe22dd8c570fab25b6ae1087da76022 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miha=3D20Rihtar=3DC5=3DA1i=3DC4=3D8D?=3D <miha@kamnitnik.= top> Date: Fri, 14 Oct 2022 14:58:44 +0200 Subject: [PATCH] compile.el: Don't clobber text properties of other modes * lisp/progmodes/compile.el (compilation-mode-font-lock-keywords): (compilation-directory-properties): (compilation-internal-error-properties): (compilation-parse-errors): (compilation--remove-properties): Don't modify 'font-lock-face' and other public text properties directly. Modify the private 'compilation-face' property instead. (compilation-setup): Set up 'compilation-face' text property up as an alias to the 'font-lock-face', and similarly for the other private compilation text properties. (compilation--unsetup): Remove the text property aliases. =2D-- lisp/progmodes/compile.el | 90 ++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 6473b50778..c543d40d64 100644 =2D-- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -762,10 +762,10 @@ compilation-mode-font-lock-keywords (1 font-lock-function-name-face) (3 compilation-line-face nil t)) (" --?o\\(?:utfile\\|utput\\)?[=3D ]\\(\\S +\\)" . 1) ("^Compilation \\(finished\\).*" =2D (0 '(face nil compilation-message nil help-echo nil mouse-face nil= ) t) + (0 '(face nil compilation-message nil compilation-help-echo nil comp= ilation-mouse-face nil) t) (1 compilation-info-face)) ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated= \\|segmentation fault\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" =2D (0 '(face nil compilation-message nil help-echo nil mouse-face nil= ) t) + (0 '(face nil compilation-message nil compilation-help-echo nil comp= ilation-mouse-face nil) t) (1 compilation-error-face) (2 compilation-error-face nil t))) "Additional things to highlight in Compilation mode. @@ -1185,9 +1185,9 @@ compilation-directory-properties (let ((dir (compilation--previous-directory (match-beginning 0)))) (setq dir (if dir (or (get-text-property (1- dir) 'compilation-directo= ry) (get-text-property dir 'compilation-directory)))) =2D `(font-lock-face ,(if leave =2D compilation-leave-directory-face =2D compilation-enter-directory-face) + `(compilation-face ,(if leave + compilation-leave-directory-face + compilation-enter-directory-face) compilation-directory ,(if leave (or (cdr dir) '(nil)) ; nil only isn't a property-c= hange @@ -1195,9 +1195,9 @@ compilation-directory-properties ;; Place a `compilation-message' everywhere we change text-properties ;; so compilation--remove-properties can know what to remove. compilation-message ,(compilation--make-message nil 0 nil nil) =2D mouse-face highlight =2D keymap compilation-button-map =2D help-echo "mouse-2: visit destination directory"))) + compilation-mouse-face highlight + compilation-keymap compilation-button-map + compilation-help-echo "mouse-2: visit destination directory"))) =20 ;; Data type `reverse-ordered-alist' retriever. This function retrieves t= he ;; KEY element from the ALIST, creating it in the right position if not al= ready @@ -1467,15 +1467,15 @@ compilation-internal-error-properties end-marker)))) =20 ;; Must start with face =2D `(font-lock-face ,compilation-message-face + `(compilation-face ,compilation-message-face compilation-message ,(compilation--make-message loc type end-loc rul= e) =2D help-echo ,(if col =2D "mouse-2: visit this file, line and column" =2D (if line =2D "mouse-2: visit this file and line" =2D "mouse-2: visit this file")) =2D keymap compilation-button-map =2D mouse-face highlight))) + compilation-help-echo ,(if col + "mouse-2: visit this file, line and colum= n" + (if line + "mouse-2: visit this file and line" + "mouse-2: visit this file")) + compilation-keymap compilation-button-map + compilation-mouse-face highlight))) =20 (defun compilation--put-prop (matchnum prop val) (when (and (integerp matchnum) (match-beginning matchnum)) @@ -1485,30 +1485,11 @@ compilation--put-prop =20 (defun compilation--remove-properties (&optional start end) (with-silent-modifications =2D ;; When compile.el used font-lock directly, we could just remove all =2D ;; our text-properties in one go, but now that we manually place =2D ;; font-lock-face, we have to be careful to only remove the font-loc= k-face =2D ;; we placed. =2D ;; (remove-list-of-text-properties =2D ;; (or start (point-min)) (or end (point-max)) =2D ;; '(compilation-debug compilation-directory compilation-message =2D ;; font-lock-face help-echo mouse-face)) =2D (let (next) =2D (unless start (setq start (point-min))) =2D (unless end (setq end (point-max))) =2D (compilation--flush-directory-cache start end) =2D (while =2D (progn =2D (setq next (or (next-single-property-change =2D start 'compilation-message nil end) =2D end)) =2D (when (get-text-property start 'compilation-message) =2D (remove-list-of-text-properties =2D start next =2D '(compilation-debug compilation-directory compilation-mes= sage =2D font-lock-face help-echo mouse-face))) =2D (< next end)) =2D (setq start next))))) + (remove-list-of-text-properties + (or start (point-min)) (or end (point-max)) + '( compilation-debug compilation-directory compilation-message + compilation-face compilation-help-echo compilation-keymap + compilation-mouse-face)))) =20 (defun compilation--parse-region (start end) (goto-char end) @@ -1609,21 +1590,21 @@ compilation-parse-errors (compilation--note-type this-type) =20 (compilation--put-prop =2D file 'font-lock-face + file 'compilation-face (symbol-value (aref [compilation-info-face compilation-warning-face compilation-error-face] this-type))))) =20 (compilation--put-prop =2D line 'font-lock-face compilation-line-face) + line 'compilation-face compilation-line-face) (compilation--put-prop =2D end-line 'font-lock-face compilation-line-face) + end-line 'compilation-face compilation-line-face) =20 (compilation--put-prop =2D col 'font-lock-face compilation-column-face) + col 'compilation-face compilation-column-face) (compilation--put-prop =2D end-col 'font-lock-face compilation-column-face) + end-col 'compilation-face compilation-column-face) =20 ;; Obey HIGHLIGHT. (dolist (extra-item (nthcdr 6 item)) @@ -1635,12 +1616,12 @@ compilation-parse-errors ((or (symbolp face) (stringp face)) (put-text-property (match-beginning mn) (match-end mn) =2D 'font-lock-face face)) + 'compilation-face face)) ((and (listp face) (eq (car face) 'face) (or (symbolp (cadr face)) (stringp (cadr face)))) =2D (compilation--put-prop mn 'font-lock-face (cadr fa= ce)) + (compilation--put-prop mn 'compilation-face (cadr fa= ce)) (add-text-properties (match-beginning mn) (match-end mn) (nthcdr 2 face))) @@ -1657,7 +1638,7 @@ compilation-parse-errors (cddr props)) (font-lock-append-text-property (match-beginning mn) (match-end mn) =2D 'font-lock-face (cadr props))))))))) + 'compilation-face (cadr props))))))))) =20 (defvar-local compilation--parsed -1) =20 @@ -2385,6 +2366,13 @@ compilation-setup (add-hook 'before-change-functions #'compilation--flush-parse nil t) ;; Also for minor mode, since it's not permanent-local. (add-hook 'change-major-mode-hook #'compilation--remove-properties nil t) + + (let ((alist (copy-alist char-property-alias-alist))) + (cl-pushnew 'compilation-face (alist-get 'face alist)) + (cl-pushnew 'compilation-mouse-face (alist-get 'mouse-face alist)) + (cl-pushnew 'compilation-help-echo (alist-get 'help-echo alist)) + (cl-pushnew 'compilation-keymap (alist-get 'keymap alist)) + (setq-local char-property-alias-alist alist)) (if minor (progn (font-lock-add-keywords nil (compilation-mode-font-lock-keywords)) @@ -2394,6 +2382,12 @@ compilation-setup (defun compilation--unsetup () ;; Only for minor mode. (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) + (let ((alist (copy-alist char-property-alias-alist))) + (when-let ((as (assq 'face alist))) (delq 'compilation-face as)) + (when-let ((as (assq 'mouse-face alist))) (delq 'compilation-mose-face= as)) + (when-let ((as (assq 'help-echo alist))) (delq 'compilation-help-echo = as)) + (when-let ((as (assq 'keymap alist))) (delq 'compilation-keymap as)) + (setq-local char-property-alias-alist alist)) (remove-hook 'before-change-functions #'compilation--flush-parse t) (kill-local-variable 'compilation--parsed) (compilation--remove-properties) =2D-=20 2.38.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmNJfQwTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP0zLD/99mVm8UbGOR748LwzVD+TAQ9QvifCq NpRL3BsxiybiTNjVCR1G9QjD57jIeeqP1XgTmZHAVdEgTfLwze0hs19VB7txIShG yHadm86kYfNBbjYWb+vZRiMROB4gFjQiM1D4xAAaq8KTzyYK3a6HartGqol1CU4N HPc+jidKXkZPdVVJGtxQC0E1VZqeogeKVu3oixw3Rpj0Q5qw44IRh8nc0ybLG4d/ g8TYq1IGp2AlphdVhhUjoHKyEtHXvEbj91Z1QBb252qLGSZmY1LnIaEvYWhHpC5t 237r3WJdMQfi9d9uehwjdT/7GEZQ5rUvYJxvwBvLYQNU7JUxA+hh7yIHC1NtGiHh PesGqHBlkBITWJZecdiPzz4jgJ/zFa2Gek3HhNBs8xQpDvgr+iC4wC01ricn70dY IYgiIXcNCYO9FBAx2PozyJ6WPTvLbGmh2dHsv52xukg4r+09ezMi6M/2LfFeFLuv YcDpErUuUreZVaP4hiqq4nzOYZngbr5envRpzUVwcWwMoALEoq/AauDw7hI7p0n3 znMLRmTdA85jTi3sgpjnNBlMELvNpB2NDv6eQlxbiS31+sgG9qVmXB1pqqlIQ7k1 wFHlEv8fiviTNymhz8yep0QrZ5IlWhDK1oxGnI4JewduBHDOrl52XAXig9hKPg00 ypLj1XG1FXD+Ng== =9rR6 -----END PGP SIGNATURE----- --==-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: miha@HIDDEN Subject: bug#58518: Acknowledgement (29.0.50; [PATCH] Turning off compilation-minor-mode removes fontification of other modes) Message-ID: <handler.58518.B.166576055525566.ack <at> debbugs.gnu.org> References: <87pmeue8s3.fsf@miha-pc> X-Gnu-PR-Message: ack 58518 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 58518 <at> debbugs.gnu.org Date: Fri, 14 Oct 2022 15:16:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 58518 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 58518: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58518 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#58518: 29.0.50; [PATCH] Turning off compilation-minor-mode removes fontification of other modes Resent-From: Lars Ingebrigtsen <larsi@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 15 Oct 2022 10:26:01 +0000 Resent-Message-ID: <handler.58518.B58518.166582954813396 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 58518 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: miha@HIDDEN Cc: Eli Zaretskii <eliz@HIDDEN>, 58518 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 58518-submit <at> debbugs.gnu.org id=B58518.166582954813396 (code B ref 58518); Sat, 15 Oct 2022 10:26:01 +0000 Received: (at 58518) by debbugs.gnu.org; 15 Oct 2022 10:25:48 +0000 Received: from localhost ([127.0.0.1]:39573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ojeMW-0003U0-Fc for submit <at> debbugs.gnu.org; Sat, 15 Oct 2022 06:25:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <larsi@HIDDEN>) id 1ojeMU-0003Tg-8O for 58518 <at> debbugs.gnu.org; Sat, 15 Oct 2022 06:25:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eo2107vitzMh0+HKAZX2mYVrTo9olPHspkIE8RZA77g=; b=gwlbJsYU6OeaciZULziTFv/RFz y5zpfxetWgFvYx6quq1IjBQzPMR/nrQpCrno06csEuhnkjNTQqO0cuUnSbJHkKrL37Syf8x4Iqx8r EKd2SPD1cq+ABuH46sR9W3aKRIF44gBQ7mIvb7EB75NnjpOnriZfxYLBJfLcp/SQvUlI=; Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1ojeMH-000764-6s; Sat, 15 Oct 2022 12:25:35 +0200 From: Lars Ingebrigtsen <larsi@HIDDEN> In-Reply-To: <87pmeue8s3.fsf@miha-pc> (miha@HIDDEN's message of "Fri, 14 Oct 2022 17:15:24 +0200") References: <87pmeue8s3.fsf@miha-pc> X-Now-Playing: Bill Callahan & Bonnie Prince Billy's _Blind Date Party (2)_: "The Wild Kindness" Date: Sat, 15 Oct 2022 12:25:32 +0200 Message-ID: <87mt9x4c4j.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: miha@HIDDEN writes: > The attached patch makes them return to the face they had after step 2, > as specified by the grep command. [...] > - `(font-lock-face ,(if leave > - compilation-leave-directory-face > - compilation-enter-directory-face) > + `(compilation-face ,(if leave > + compilation-leave-directory-face Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.3 (-) miha@HIDDEN writes: > The attached patch makes them return to the face they had after step 2, > as specified by the grep command. [...] > - `(font-lock-face ,(if leave > - compilation-leave-directory-face > - compilation-enter-directory-face) > + `(compilation-face ,(if leave > + compilation-leave-directory-face [...] > + (let ((alist (copy-alist char-property-alias-alist))) > + (cl-pushnew 'compilation-face (alist-get 'face alist)) Hm, it's an interesting approach -- we don't use this trick elsewhere in other mode (I mean, except for `font-lock-face'), but this seems like a good solution. But since it's so unusual, I wonder whether there's any reason we don't use this more in general. Are there performance impacts, for instance? (I don't think so, since it's a buffer-local variable.) But I've added Stefan and Eli to the CCs; perhaps they have comments.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.