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

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

bug#24176: Confusing interaction between define-derived-mode and font-lo


From: Clément Pit--Claudel
Subject: bug#24176: Confusing interaction between define-derived-mode and font-lock-add-keywords
Date: Sun, 7 Aug 2016 02:41:30 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi bug-gnu-emacs,

Given the following mode definitions, I was expecting ~/a to have one keyword, 
~/b to have two, and ~/c to have three:

(define-derived-mode ~/a fundamental-mode
  (font-lock-add-keywords nil `(("a" 0 'font-lock-keyword-face))))
(define-derived-mode ~/b ~/a
  (font-lock-add-keywords nil `(("b" 0 'font-lock-builtin-face))))
(define-derived-mode ~/c ~/b
  (font-lock-add-keywords nil `(("c" 0 'font-lock-constant-face))))

This assumption is wrong, as can be easily verified by opening a new buffer, 
inserting "abc", and switching between ~/a, ~/b, ~/c.

What's going on? Is this a font-lock bug, a doc bug, or a user-got-confused 
issue?

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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