From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 16:16:26 2015 Received: (at submit) by debbugs.gnu.org; 9 Sep 2015 20:16:27 +0000 Received: from localhost ([127.0.0.1]:54224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZln8-0008MO-47 for submit@debbugs.gnu.org; Wed, 09 Sep 2015 16:16:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36477) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZln6-0008ME-7M for submit@debbugs.gnu.org; Wed, 09 Sep 2015 16:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZln4-0003Vm-Ia for submit@debbugs.gnu.org; Wed, 09 Sep 2015 16:16:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZln4-0003Vf-G4 for submit@debbugs.gnu.org; Wed, 09 Sep 2015 16:16:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZln3-0004Fg-20 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2015 16:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZlmx-0003TL-U3 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2015 16:16:20 -0400 Received: from mail.muc.de ([193.149.48.3]:43489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZlmx-0003Sb-Hn for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2015 16:16:15 -0400 Received: (qmail 31047 invoked by uid 3782); 9 Sep 2015 20:09:32 -0000 Received: from acm.muc.de (p579E9A15.dip0.t-ipconnect.de [87.158.154.21]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 09 Sep 2015 22:09:31 +0200 Received: (qmail 10482 invoked by uid 1000); 9 Sep 2015 20:10:42 -0000 Date: Wed, 9 Sep 2015 20:10:42 +0000 To: bug-gnu-emacs@gnu.org Subject: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. Message-ID: <20150909201042.GA10205@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Hello, Emacs. In Emacs lisp mode, write something like: (defun fix-re--RA|RB->R\(A|B\) (foo bar) ...) ^^^^^^^ . The part of the symbol indicated remains unfontified. This happens because the fontification patterns in .../lisp/emacs-lisp/lisp-mode.el dont't take account of escaped characters in symbol names. By replacing lots of "\\(?:\\sw\\|\\s_\\)" by "\\(?:\\sw\\|\\s_\\|\\\\.\\)", the fontification is repaired. As a bonus, this fix makes imenu work properly with these symbols too. Unfortunately, as yet the regular expression expressions "\\_<" and "\\_>" don't work properly with these symbols. To fix that would need an amendment to .../src/regex.c, with possibly .../src/syntax.c needing one too. It feels like there really ought to be some major mode dependent flag saying whether or not escaped characters are valid in identifiers. They are in Emacs lisp, but they're not in C. Anyhow, here's the patch: diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 8aa34c7..7be7cb3 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -110,7 +110,7 @@ ;; CLOS and EIEIO "defgeneric" "defmethod") t)) - "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+\\(\\(\\sw\\|\\s_\\|\\\\.\\)+\\)")) 2) (list (purecopy "Variables") (purecopy (concat "^\\s-*(" @@ -122,11 +122,11 @@ "defconstant" "defparameter" "define-symbol-macro") t)) - "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+\\(\\(\\sw\\|\\s_\\|\\\\.\\)+\\)")) 2) ;; For `defvar', we ignore (defvar FOO) constructs. (list (purecopy "Variables") - (purecopy (concat "^\\s-*(defvar\\s-+\\(\\(\\sw\\|\\s_\\)+\\)" + (purecopy (concat "^\\s-*(defvar\\s-+\\(\\(\\sw\\|\\s_\\|\\\\.\\)+\\)" "[[:space:]\n]+[^)]")) 1) (list (purecopy "Types") @@ -143,7 +143,7 @@ ;; CLOS and EIEIO "defclass") t)) - "\\s-+'?\\(\\(\\sw\\|\\s_\\)+\\)")) + "\\s-+'?\\(\\(\\sw\\|\\s_\\|\\\\.\\)+\\)")) 2)) "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") @@ -220,7 +220,7 @@ (defun lisp--el-match-keyword (limit) ;; FIXME: Move to elisp-mode.el. (catch 'found - (while (re-search-forward "(\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" limit t) + (while (re-search-forward "(\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)\\_>" limit t) (let ((sym (intern-soft (match-string 1)))) (when (or (special-form-p sym) (and (macrop sym) @@ -349,7 +349,7 @@ ;; Any whitespace and defined object. "[ \t']*" "\\(([ \t']*\\)?" ;; An opening paren. - "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") + "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\|\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)?") (1 font-lock-keyword-face) (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) (cond ((eq type 'var) font-lock-variable-name-face) @@ -373,7 +373,7 @@ ;; Any whitespace and defined object. "[ \t']*" "\\(([ \t']*\\)?" ;; An opening paren. - "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") + "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\|\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)?") (1 font-lock-keyword-face) (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) (cond ((eq type 'var) font-lock-variable-name-face) @@ -395,22 +395,22 @@ (lisp--el-match-keyword . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>" - "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) ;; Erroneous structures. (,(concat "(" el-errs-re "\\_>") (1 font-lock-warning-face)) ;; Words inside \\[] tend to be for `substitute-command-keys'. - ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]" + ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)\\]" (1 font-lock-constant-face prepend)) ;; Words inside ‘’ and '' and `' tend to be symbol names. - ("['`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" + ("['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)['’]" (1 font-lock-constant-face prepend)) ;; Constant values. - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) + ("\\_<:\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" 0 font-lock-builtin-face) ;; ELisp and CLisp `&' keywords as types. - ("\\_<\\&\\(?:\\sw\\|\\s_\\)+\\_>" . font-lock-type-face) + ("\\_<\\&\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" . font-lock-type-face) ;; ELisp regexp grouping constructs (,(lambda (bound) (catch 'found @@ -447,19 +447,19 @@ (,(concat "(" cl-kws-re "\\_>") . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>" - "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) ;; Erroneous structures. (,(concat "(" cl-errs-re "\\_>") (1 font-lock-warning-face)) ;; Words inside ‘’ and '' and `' tend to be symbol names. - ("['`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]" + ("['`‘]\\(\\(?:\\sw\\|\\s_\\|\\\\.\\)\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\)['’]" (1 font-lock-constant-face prepend)) ;; Constant values. - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) + ("\\_<:\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" 0 font-lock-builtin-face) ;; ELisp and CLisp `&' keywords as types. - ("\\_<\\&\\(?:\\sw\\|\\s_\\)+\\_>" . font-lock-type-face) + ("\\_<\\&\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" . font-lock-type-face) ;; This is too general -- rms. ;; A user complained that he has functions whose names start with `do' ;; and that they get the wrong color. @@ -482,7 +482,7 @@ (let* ((firstsym (and listbeg (save-excursion (goto-char listbeg) - (and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)") + (and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\|\\\\.\\)+\\)") (match-string 1))))) (docelt (and firstsym (function-get (intern-soft firstsym) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 23:30:39 2015 Received: (at 21449) by debbugs.gnu.org; 10 Sep 2015 03:30:39 +0000 Received: from localhost ([127.0.0.1]:54381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZsZH-0003AI-Ny for submit@debbugs.gnu.org; Wed, 09 Sep 2015 23:30:37 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:51243) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZsZF-0003A8-AS for 21449@debbugs.gnu.org; Wed, 09 Sep 2015 23:30:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CVDQA731xV/+uZpUVcgxCEAsEVh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQcBAQEBHos6hQUHhC0BBLM/gUUjgjuBWSKCeAEBAQ X-IPAS-Result: A0CVDQA731xV/+uZpUVcgxCEAsEVh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQcBAQEBHos6hQUHhC0BBLM/gUUjgjuBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="164401065" Received: from 69-165-153-235.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.165.153.235]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Sep 2015 23:30:31 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 701ECAE12D; Wed, 9 Sep 2015 23:30:31 -0400 (EDT) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#21449: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. Message-ID: References: <20150909201042.GA10205@acm.fritz.box> Date: Wed, 09 Sep 2015 23:30:31 -0400 In-Reply-To: <20150909201042.GA10205@acm.fritz.box> (Alan Mackenzie's message of "Wed, 9 Sep 2015 20:10:42 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21449 Cc: 21449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > one too. It feels like there really ought to be some major mode > dependent flag saying whether or not escaped characters are valid in > identifiers. They are in Emacs lisp, but they're not in C. You mean like words-include-escapes? Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 06:43:26 2015 Received: (at 21449) by debbugs.gnu.org; 10 Sep 2015 10:43:26 +0000 Received: from localhost ([127.0.0.1]:54536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZzKA-00050d-AG for submit@debbugs.gnu.org; Thu, 10 Sep 2015 06:43:26 -0400 Received: from mail.muc.de ([193.149.48.3]:59440) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZZzK8-00050U-4A for 21449@debbugs.gnu.org; Thu, 10 Sep 2015 06:43:25 -0400 Received: (qmail 38343 invoked by uid 3782); 10 Sep 2015 10:43:22 -0000 Received: from acm.muc.de (p548A48B1.dip0.t-ipconnect.de [84.138.72.177]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 10 Sep 2015 12:43:21 +0200 Received: (qmail 3361 invoked by uid 1000); 10 Sep 2015 10:44:34 -0000 Date: Thu, 10 Sep 2015 10:44:34 +0000 To: Stefan Monnier Subject: Re: bug#21449: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. Message-ID: <20150910104433.GA3324@acm.fritz.box> References: <20150909201042.GA10205@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21449 Cc: 21449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Stefan. On Wed, Sep 09, 2015 at 11:30:31PM -0400, Stefan Monnier wrote: > > one too. It feels like there really ought to be some major mode > > dependent flag saying whether or not escaped characters are valid in > > identifiers. They are in Emacs lisp, but they're not in C. > You mean like words-include-escapes? Something like that, yes. I don't think words-include-escapes is the right thing to use, though. I think that doing M-f on "R\(A|B\)", one would want point to move to just after the R, not just after the A; escaped characters should be word separators, just like -s are; they should be thought of as \\s_ rather than \\sw. Something like `identifiers-include-escapes', maybe? > Stefan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 10:48:14 2015 Received: (at 21449) by debbugs.gnu.org; 11 Sep 2015 14:48:14 +0000 Received: from localhost ([127.0.0.1]:57012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaPcb-0001MF-P1 for submit@debbugs.gnu.org; Fri, 11 Sep 2015 10:48:13 -0400 Received: from mail.muc.de ([193.149.48.3]:63021) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaPcZ-0001M7-NO for 21449@debbugs.gnu.org; Fri, 11 Sep 2015 10:48:12 -0400 Received: (qmail 50484 invoked by uid 3782); 11 Sep 2015 14:48:10 -0000 Received: from acm.muc.de (p548A57D7.dip0.t-ipconnect.de [84.138.87.215]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 11 Sep 2015 16:48:09 +0200 Received: (qmail 3324 invoked by uid 1000); 11 Sep 2015 14:49:22 -0000 Date: Fri, 11 Sep 2015 14:49:22 +0000 To: Stefan Monnier Subject: Re: bug#21449: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. Message-ID: <20150911144922.GA3234@acm.fritz.box> References: <20150909201042.GA10205@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21449 Cc: 21449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Stefan. On Wed, Sep 09, 2015 at 11:30:31PM -0400, Stefan Monnier wrote: > > one too. It feels like there really ought to be some major mode > > dependent flag saying whether or not escaped characters are valid in > > identifiers. They are in Emacs lisp, but they're not in C. > You mean like words-include-escapes? Is there any objection to me installing the patch to lisp-mode.el? It inserts "\\|\\\\." into each font-locking regexp which contains a bit looking like "(?:\\sw\\|\\s_", so that escaped characters will be picked up. There are no other changes. I think it unlikely this will do any damage. > Stefan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 12:56:53 2015 Received: (at 21449) by debbugs.gnu.org; 11 Sep 2015 16:56:53 +0000 Received: from localhost ([127.0.0.1]:57174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaRd6-0005yw-FC for submit@debbugs.gnu.org; Fri, 11 Sep 2015 12:56:52 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:14652) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZaRd4-0005yo-Mz for 21449@debbugs.gnu.org; Fri, 11 Sep 2015 12:56:50 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CtCwA731xV/zi6xEVcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEHAQEBAR6LOoUFB4QtAQSfF4ZpjT+BRSOCO4FZIoJ4AQEB X-IPAS-Result: A0CtCwA731xV/zi6xEVcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBViMFCwsOJhIUGA0kiDcIzyMBAQEHAQEBAR6LOoUFB4QtAQSfF4ZpjT+BRSOCO4FZIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="164572673" Received: from 69-196-186-56.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.186.56]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Sep 2015 12:56:48 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F07A9AE12C; Fri, 11 Sep 2015 12:56:47 -0400 (EDT) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#21449: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. Message-ID: References: <20150909201042.GA10205@acm.fritz.box> <20150911144922.GA3234@acm.fritz.box> Date: Fri, 11 Sep 2015 12:56:47 -0400 In-Reply-To: <20150911144922.GA3234@acm.fritz.box> (Alan Mackenzie's message of "Fri, 11 Sep 2015 14:49:22 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21449 Cc: 21449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Is there any objection to me installing the patch to lisp-mode.el? The resulting regexps are harder to read, for a very small benefit since identifiers with backslashes should be avoided for the sanity of the human reader anyway. But if you like it, fell free to install it, Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 13:00:40 2019 Received: (at 21449) by debbugs.gnu.org; 31 Oct 2019 17:00:40 +0000 Received: from localhost ([127.0.0.1]:54169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDoN-0003B2-PK for submit@debbugs.gnu.org; Thu, 31 Oct 2019 13:00:39 -0400 Received: from quimby.gnus.org ([80.91.231.51]:48366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDoL-0003Ao-0x for 21449@debbugs.gnu.org; Thu, 31 Oct 2019 13:00:38 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQDoH-0002mV-5g; Thu, 31 Oct 2019 18:00:35 +0100 From: Lars Ingebrigtsen To: Alan Mackenzie Subject: Re: Emacs lisp mode: incorrect fontification of symbols containing escaped characters. References: <20150909201042.GA10205@acm.fritz.box> Date: Thu, 31 Oct 2019 18:00:32 +0100 In-Reply-To: <20150909201042.GA10205@acm.fritz.box> (Alan Mackenzie's message of "Wed, 9 Sep 2015 20:10:42 +0000") Message-ID: <87d0ec7sun.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) 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: Alan Mackenzie writes: > ;; Constant values. > - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) > + ("\\_<:\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" 0 font-lock-builtin-face) This code has changed a lot since this was reported: 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.0 (/) X-Debbugs-Envelope-To: 21449 Cc: 21449@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alan Mackenzie writes: > ;; Constant values. > - ("\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" 0 font-lock-builtin-face) > + ("\\_<:\\(?:\\sw\\|\\s_\\|\\\\.\\)+\\_>" 0 font-lock-builtin-face) This code has changed a lot since this was reported: ;; Constant values. (,(concat "\\_<:" lisp-mode-symbol-regexp "\\_>") (0 font-lock-builtin-face)) But: lisp-mode-symbol-regexp => "\\(?:\\sw\\|\\s_\\|\\\\.\\)+" So it basically looks like this was added in some form or other, and the test case fontifies correctly for me now, so I'm going to go ahead and guess that this works as it's supposed to now, and I'm closing this bug report. Please reopen if it's still an issue. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 31 13:00:46 2019 Received: (at control) by debbugs.gnu.org; 31 Oct 2019 17:00:46 +0000 Received: from localhost ([127.0.0.1]:54172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDoU-0003BN-2x for submit@debbugs.gnu.org; Thu, 31 Oct 2019 13:00:46 -0400 Received: from quimby.gnus.org ([80.91.231.51]:48380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQDoQ-0003BC-OQ for control@debbugs.gnu.org; Thu, 31 Oct 2019 13:00:43 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQDoO-0002md-1A for control@debbugs.gnu.org; Thu, 31 Oct 2019 18:00:42 +0100 Date: Thu, 31 Oct 2019 18:00:39 +0100 Message-Id: <87bltw7sug.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21449 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: close 21449 quit 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.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 21449 quit From unknown Mon Aug 18 04:42:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 29 Nov 2019 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator