all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face'
@ 2014-08-01  4:23 Drew Adams
  2014-08-06 17:15 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2014-08-01  4:23 UTC (permalink / raw
  To: 18163

Recipe from emacs -Q: Type this into an Emacs-Lisp mode buffer:

(defun foo ()
  (condition-case nil
      (let ((toto (lambda (cand)
		     (foo)) bar)))
    (quit (tutu))))

The text "bar)))" is highlighted erroneously, with face
`font-lock-warning-face'.  It should not be highlighted at all.

If you add more right-parens, or any other text, at the end of the same
line as the warning-highlighted text, it too has that red face.  It
does not seem to matter what text you add.  You can remove all of the
warning-face text except the `b' (or any other char in place of `b'),
and it is still highlighted.  You can remove the SPC before the `b'
and it remains highlighted.  If you remove the whitespace before
"(foo..." on the same line, the highlighting remains.

If you remove the newline before the "(foo..." line then the
highlighting goes away.

The first build where I see this regression is this one:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-04-25 on ODIEONE
Repository revision: 117024 monnier@iro.umontreal.ca-20140425192226-frpjpmgs0r8ad9wc
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''

The last build I have where there is not this regression is this one:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-04-21 on ODIEONE
Repository revision: 117005 dancol@dancol.org-20140421180019-po4wdeg7gqvvlh5d
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''

This is the build I'm sending this report from:

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





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

* bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face'
  2014-08-01  4:23 bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face' Drew Adams
@ 2014-08-06 17:15 ` Stefan Monnier
  2014-08-06 18:04   ` Drew Adams
  2014-08-07  3:47   ` Leo Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-08-06 17:15 UTC (permalink / raw
  To: Drew Adams; +Cc: 18163-done

tags 18163 notabug
thanks

> The text "bar)))" is highlighted erroneously, with face
> `font-lock-warning-face'.

It's no error.  There's even a help-text explaining why it's highlighted
this way (if you hover your mouse above the highlighted text).


        Stefan





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

* bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face'
  2014-08-06 17:15 ` Stefan Monnier
@ 2014-08-06 18:04   ` Drew Adams
  2014-08-07  3:47   ` Leo Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2014-08-06 18:04 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 18163-done

> It's no error.  There's even a help-text explaining why it's highlighted
> this way (if you hover your mouse above the highlighted text).

I see.  Yes, I can see that that can be helpful.

It's unfortunate that the same face is used for this kind of warning
and for things like `error' and `user-error', which are not something
to be warned about.  It is handy to highlight those too (specially),
but they should not use a "warning" face, if that face is really
starting to be used to warn.

IOW using `font-lock-warning-face' to warn uncovers an (effectively
new) bug: its use for non-warnings is inappropriate.  It could
arguably have been considered appropriate (though poorly named) as
long as none of the uses involved warning.  There is no longer any
such justification.





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

* bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face'
  2014-08-06 17:15 ` Stefan Monnier
  2014-08-06 18:04   ` Drew Adams
@ 2014-08-07  3:47   ` Leo Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Liu @ 2014-08-07  3:47 UTC (permalink / raw
  To: 18163

On 2014-08-06 13:15 -0400, Stefan Monnier wrote:
> It's no error.  There's even a help-text explaining why it's highlighted
> this way (if you hover your mouse above the highlighted text).

Maybe the face can be tweaked to improve usability, for example,
underwave/line it.

Leo





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

end of thread, other threads:[~2014-08-07  3:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01  4:23 bug#18163: 24.4.50; REGRESSION, font-lock in `emacs-lisp-mode': spurious `font-lock-warning-face' Drew Adams
2014-08-06 17:15 ` Stefan Monnier
2014-08-06 18:04   ` Drew Adams
2014-08-07  3:47   ` Leo Liu

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.