unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
@ 2013-03-30 21:20 Drew Adams
  2013-03-31  5:36 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2013-03-30 21:20 UTC (permalink / raw)
  To: 14099


emacs -Q
 
Type this in an Emacs Lisp buffer:
 
(abort-recursive-edit)
 
Emacs now highlights `abort' here, which is bad.
 
`abort' is not even an Emacs Lisp function/macro/special form, AFAICT.
 
And I don't find it in cl*.el either.
I don't find "abort " anywhere in the Emacs Lisp source files.
 
grep -nH -e def.*\ abort *.el */*.el */*/*.el doesn't find it either.
Likewise, grep -nH -e abort *.el */*.el */*/*.el.
 
 
 

In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2013-03-23 on VBOX
Bzr revision: 112115 eliz@gnu.org-20130323093300-rjs0dgskxm9u0ya4
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/emacs/libs/libXpm-3.5.10/include -IC:/emacs/libs/libXpm-3.5.10/src
 -IC:/emacs/libs/libpng-dev_1.4.3-1_win32/include
 -IC:/emacs/libs/zlib-dev_1.2.5-2_win32/include
 -IC:/emacs/libs/giflib-4.1.4-1-lib/include
 -IC:/emacs/libs/jpeg-6b-4-lib/include
 -IC:/emacs/libs/tiff-3.8.2-1-lib/include
 -IC:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -IC:/emacs/libs/gnutls-3.1.10-w32/include
 -IC:/emacs/libs/libiconv-1.14-2-mingw32-dev/include'
 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-30 21:20 bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode Drew Adams
@ 2013-03-31  5:36 ` Eli Zaretskii
  2013-03-31 14:29   ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2013-03-31  5:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: 14099

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Sat, 30 Mar 2013 14:20:14 -0700
> 
> 
> emacs -Q
>  
> Type this in an Emacs Lisp buffer:
>  
> (abort-recursive-edit)
>  
> Emacs now highlights `abort' here, which is bad.

I can't reproduce this, but maybe I didn't do everything needed for
reproduction.  What exactly do you mean by "in an Emacs Lisp buffer"?
How did you create such a buffer, starting from "emacs -Q"?

What I did was to create a buffer and manually put it under
emacs-lisp-mode.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-31  5:36 ` Eli Zaretskii
@ 2013-03-31 14:29   ` Drew Adams
  2013-03-31 19:13     ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2013-03-31 14:29 UTC (permalink / raw)
  To: 'Eli Zaretskii'; +Cc: 14099

> > emacs -Q
> > Type this in an Emacs Lisp buffer:
> > (abort-recursive-edit)
> > Emacs now highlights `abort' here, which is bad.
> 
> I can't reproduce this, but maybe I didn't do everything needed for
> reproduction.  What exactly do you mean by "in an Emacs Lisp buffer"?
> How did you create such a buffer, starting from "emacs -Q"?
> 
> What I did was to create a buffer and manually put it under
> emacs-lisp-mode.

The regression was apparently fixed.  It is easy to repro it in the build I
reported on, from 2013-03-23.  But it no longer repros in a build from 3-28.

As for reproducing in 3-23, just put that sexp in *scratch* (Lisp interaction
mode) or any buffer that is `emacs-lisp-mode'.

So you can close this bug (or I will), unless you want to investigate further
for some reason.  I don't know what other changes were made when the regression
was introduced.  This is a pretty basic mistake, so maybe the changes are worth
looking at.

Also, as I mentioned, I found no `abort' function etc. in Emacs, and even with
the latest build (abort) still highlights in red.  What was fixed is that
(abort-recursive-edit) no longer has the `abort' part in red.  But what is this
`abort' function, and why is it highlighted with `font-lock-warning-face'?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-31 14:29   ` Drew Adams
@ 2013-03-31 19:13     ` Drew Adams
  2013-03-31 20:00       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2013-03-31 19:13 UTC (permalink / raw)
  To: 'Eli Zaretskii'; +Cc: 14099

OK, I see that someone closed it.  That's fine.

I would still like to know why `abort' is highlighted.  I can find no Emacs
`abort' anywhere in the Emacs source code.  Can you?

What's the reason for this (potential) highlighting?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-31 19:13     ` Drew Adams
@ 2013-03-31 20:00       ` Eli Zaretskii
  2013-03-31 21:01         ` Drew Adams
  2013-04-03 17:50         ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-03-31 20:00 UTC (permalink / raw)
  To: Drew Adams; +Cc: 14099

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <14099@debbugs.gnu.org>
> Date: Sun, 31 Mar 2013 12:13:43 -0700
> 
> OK, I see that someone closed it.  That's fine.
> 
> I would still like to know why `abort' is highlighted.  I can find no Emacs
> `abort' anywhere in the Emacs source code.  Can you?

It's because of this snippet from font-lock.el:

  (defconst lisp-font-lock-keywords-2
    (append lisp-font-lock-keywords-1
     (eval-when-compile
     ...
	 ;; Erroneous structures.
	 ("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\_>" 1 font-lock-warning-face)

Not sure what this is supposed to catch.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-31 20:00       ` Eli Zaretskii
@ 2013-03-31 21:01         ` Drew Adams
  2013-04-03 17:50         ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2013-03-31 21:01 UTC (permalink / raw)
  To: 'Eli Zaretskii'; +Cc: 14099

> Not sure what this is supposed to catch.

Yes, that was my question - I cannot find `abort' anywhere in the source code.

Why it should be highlighted this way is not clear to me.  But this has
apparently been the case since at least Emacs 20.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode
  2013-03-31 20:00       ` Eli Zaretskii
  2013-03-31 21:01         ` Drew Adams
@ 2013-04-03 17:50         ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2013-04-03 17:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 14099

> 	 ("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\_>" 1 font-lock-warning-face)

> Not sure what this is supposed to catch.

IIUC this is because those font-lock keywords are/were used not just for
Elisp but for lisp-mode as well.  We should split those (and move them
to lisp-mode.el).


        Stefan





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-03 17:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-30 21:20 bug#14099: 24.3.50; regression: bad font locking for `abort' in Lisp mode Drew Adams
2013-03-31  5:36 ` Eli Zaretskii
2013-03-31 14:29   ` Drew Adams
2013-03-31 19:13     ` Drew Adams
2013-03-31 20:00       ` Eli Zaretskii
2013-03-31 21:01         ` Drew Adams
2013-04-03 17:50         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).