bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6463: "prepend" font-locking not working when an sh-mode buffer is o


From: Glenn Morris
Subject: 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
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]