GNU bug report logs - #6463
"prepend" font-locking not working when an sh-mode buffer is opened for the first time

Previous Next

Package: emacs;

Reported by: Ken Hori <fplemma <at> gmail.com>

Date: Sat, 19 Jun 2010 04:54:01 UTC

Severity: normal

Tags: moreinfo

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Glenn Morris <rgm <at> gnu.org>
To: Ken Hori <fplemma <at> gmail.com>
Cc: 6463 <at> debbugs.gnu.org
Subject: Re: bug#6463: "prepend" font-locking not working when an sh-mode
	buffer is opened for the first time
Date: Sat, 19 Jun 2010 02:11:53 -0400
Ken Hori wrote:

> "prepend" font-lock keyword entries for sh-mode don't render as they
> are intended when I open an sh-mode buffer for the first time.
>
> If I close the buffer and open it again, everything works fine.
>
> Example:
> ("##+ \\(.+\\)$" 1 some-face prepend)
> won't render correctly.

Please provide a _complete_ example starting from emacs -Q, and state
what version of Emacs you are using.

The following works for me in 22.3, 23.1, 23.2, emacs-23 branch, and trunk:

cat 1.el:

(font-lock-add-keywords 'sh-mode
                        '(("##+ \\(.+\\)$" 1 'underline prepend)))

cat foo.sh:

# single
## double


emacs -Q -l ./1.el ./foo.sh 

"double" is underlined and red.





This bug report was last modified 14 years and 328 days ago.

Previous Next


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