GNU bug report logs - #21619
25.0.50; Wrong curly quotes in the docstring for font-lock-add-keywords

Previous Next

Package: emacs;

Reported by: bruce.connor.am <at> gmail.com

Date: Mon, 5 Oct 2015 14:26:01 UTC

Severity: minor

Found in version 25.0.50

Done: Artur Malabarba <bruce.connor.am <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21619 in the body.
You can then email your comments to 21619 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21619; Package emacs. (Mon, 05 Oct 2015 14:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to bruce.connor.am <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 05 Oct 2015 14:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 Wrong curly quotes in the docstring for font-lock-add-keywords
Date: Mon, 5 Oct 2015 15:24:25 +0100
The docstring for this function (when displayed in a help buffer) has
the following code-snippet, which clearly has the wrong type of
quotes.

(font-lock-add-keywords ’c-mode
  ’(("\\<\\(FIXME\\):" 1 ’font-lock-warning-face prepend)
    ("\\<\\(and\\|or\\|not\\)\\>" . ’font-lock-keyword-face)))

Instead of fixing this by manually escaping them, how about we change
the algorithm to only convert `...' quotes if the ... is a single
symbol?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21619; Package emacs. (Mon, 05 Oct 2015 16:36:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#21619: 25.0.50;	Wrong curly quotes in the
 docstring for font-lock-add-keywords
Date: Mon, 5 Oct 2015 16:28:41 +0000 (UTC)
Artur Malabarba <bruce.connor.am <at> gmail.com> writes:

> 
> The docstring for this function (when displayed in a help buffer) has
> the following code-snippet, which clearly has the wrong type of
> quotes.
> 
> (font-lock-add-keywords ’c-mode
>   ’(("\\<\\(FIXME\\):" 1 ’font-lock-warning-face prepend)
>     ("\\<\\(and\\|or\\|not\\)\\>" . ’font-lock-keyword-face)))
> 
> Instead of fixing this by manually escaping them, how about we change
> the algorithm to only convert `...' quotes if the ... is a single
> symbol?
> 
> 


Looks like it got fixed in this commit:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?
id=47e9556c70a7009d7c750fd7bf10a0e6cf41cdce

 
- (sql-add-product-keywords 'ms
-  '((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
+ (sql-add-product-keywords \\='ms
+  \\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))

But while grepping for "’\([a-z(]+" in the emacs repo base dir, I found 
just this one case that yet needs to be fixed:

Line 1013 of htmlfontify.info

     ’((class color grayscale) (type tty)) would match any of:
            '((class color))
            '((class grayscale))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21619; Package emacs. (Tue, 06 Oct 2015 09:16:01 GMT) Full text and rfc822 format available.

Message #11 received at 21619 <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: 21619 <at> debbugs.gnu.org
Subject: Re: bug#21619: 25.0.50;
 Wrong curly quotes in the docstring for font-lock-add-keywords
Date: Tue, 6 Oct 2015 10:15:36 +0100
2015-10-05 17:28 GMT+01:00 Kaushal Modi <kaushal.modi <at> gmail.com>:
> Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
>
>>
>> The docstring for this function (when displayed in a help buffer) has
>> the following code-snippet, which clearly has the wrong type of
>> quotes.
>>
>> (font-lock-add-keywords ’c-mode
>>   ’(("\\<\\(FIXME\\):" 1 ’font-lock-warning-face prepend)
>>     ("\\<\\(and\\|or\\|not\\)\\>" . ’font-lock-keyword-face)))
>>
>> Instead of fixing this by manually escaping them, how about we change
>> the algorithm to only convert `...' quotes if the ... is a single
>> symbol?
>>
>>
>
>
> Looks like it got fixed in this commit:
>
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?
> id=47e9556c70a7009d7c750fd7bf10a0e6cf41cdce
>
>
> - (sql-add-product-keywords 'ms
> -  '((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
> + (sql-add-product-keywords \\='ms
> +  \\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))

I'm confused. That link appears to be a merge commit, and the snippet
you quote doesn't apply to the snippet I had quotedl.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21619; Package emacs. (Tue, 06 Oct 2015 10:21:01 GMT) Full text and rfc822 format available.

Message #14 received at 21619 <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: Bruce Connor <bruce.connor.am <at> gmail.com>
Cc: 21619 <at> debbugs.gnu.org
Subject: Re: bug#21619: 25.0.50;
 Wrong curly quotes in the docstring for font-lock-add-keywords
Date: Tue, 6 Oct 2015 06:20:09 -0400
[Message part 1 (text/plain, inline)]
I copied the wrong snippet.. But in general I saw many instances of quote
fixes in doc strings in that merge commit.

Also I do not see curvy quotes in the Help buffer that opens when I do C-h
f font-lock-add-keywords. I am on emacs built on that big merge commit
yesterday.
On Oct 6, 2015 5:15 AM, "Artur Malabarba" <bruce.connor.am <at> gmail.com> wrote:

> 2015-10-05 17:28 GMT+01:00 Kaushal Modi <kaushal.modi <at> gmail.com>:
> > Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
> >
> >>
> >> The docstring for this function (when displayed in a help buffer) has
> >> the following code-snippet, which clearly has the wrong type of
> >> quotes.
> >>
> >> (font-lock-add-keywords ’c-mode
> >>   ’(("\\<\\(FIXME\\):" 1 ’font-lock-warning-face prepend)
> >>     ("\\<\\(and\\|or\\|not\\)\\>" . ’font-lock-keyword-face)))
> >>
> >> Instead of fixing this by manually escaping them, how about we change
> >> the algorithm to only convert `...' quotes if the ... is a single
> >> symbol?
> >>
> >>
> >
> >
> > Looks like it got fixed in this commit:
> >
> > http://git.savannah.gnu.org/cgit/emacs.git/commit/?
> > id=47e9556c70a7009d7c750fd7bf10a0e6cf41cdce
> >
> >
> > - (sql-add-product-keywords 'ms
> > -  '((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
> > + (sql-add-product-keywords \\='ms
> > +  \\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
>
> I'm confused. That link appears to be a merge commit, and the snippet
> you quote doesn't apply to the snippet I had quotedl.
>
[Message part 2 (text/html, inline)]

Reply sent to bruce.connor.am <at> gmail.com:
You have taken responsibility. (Tue, 06 Oct 2015 10:42:02 GMT) Full text and rfc822 format available.

Notification sent to bruce.connor.am <at> gmail.com:
bug acknowledged by developer. (Tue, 06 Oct 2015 10:42:03 GMT) Full text and rfc822 format available.

Message #19 received at 21619-done <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: 21619-done <at> debbugs.gnu.org
Subject: Re: bug#21619: 25.0.50;
 Wrong curly quotes in the docstring for font-lock-add-keywords
Date: Tue, 6 Oct 2015 11:41:26 +0100
Indeed. I built again today and don't see it anymore. Thanks for the pointer.

2015-10-06 11:20 GMT+01:00 Kaushal Modi <kaushal.modi <at> gmail.com>:
> I copied the wrong snippet.. But in general I saw many instances of quote
> fixes in doc strings in that merge commit.
>
> Also I do not see curvy quotes in the Help buffer that opens when I do C-h f
> font-lock-add-keywords. I am on emacs built on that big merge commit
> yesterday.
>
> On Oct 6, 2015 5:15 AM, "Artur Malabarba" <bruce.connor.am <at> gmail.com> wrote:
>>
>> 2015-10-05 17:28 GMT+01:00 Kaushal Modi <kaushal.modi <at> gmail.com>:
>> > Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
>> >
>> >>
>> >> The docstring for this function (when displayed in a help buffer) has
>> >> the following code-snippet, which clearly has the wrong type of
>> >> quotes.
>> >>
>> >> (font-lock-add-keywords ’c-mode
>> >>   ’(("\\<\\(FIXME\\):" 1 ’font-lock-warning-face prepend)
>> >>     ("\\<\\(and\\|or\\|not\\)\\>" . ’font-lock-keyword-face)))
>> >>
>> >> Instead of fixing this by manually escaping them, how about we change
>> >> the algorithm to only convert `...' quotes if the ... is a single
>> >> symbol?
>> >>
>> >>
>> >
>> >
>> > Looks like it got fixed in this commit:
>> >
>> > http://git.savannah.gnu.org/cgit/emacs.git/commit/?
>> > id=47e9556c70a7009d7c750fd7bf10a0e6cf41cdce
>> >
>> >
>> > - (sql-add-product-keywords 'ms
>> > -  '((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
>> > + (sql-add-product-keywords \\='ms
>> > +  \\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
>>
>> I'm confused. That link appears to be a merge commit, and the snippet
>> you quote doesn't apply to the snippet I had quotedl.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Nov 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.