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

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

Void variable error in fontification code


From: Davin Pearson
Subject: Void variable error in fontification code
Date: Thu, 10 Nov 2016 18:29:03 -0800 (PST)
User-agent: G2/1.0

How come with the following lines of elisp code commented out:

;;(setq d-face-m4     'd-face-m4)
;;(setq d-face-m4-dnl 'd-face-m4-dnl)

I get the following error in my *Messages* buffer:

Error during redisplay: (jit-lock-function 9575) signaled (void-variable 
d-face-m4-dnl) [9 times]

Putting back the lines like so:

(setq d-face-m4     'd-face-m4)
(setq d-face-m4-dnl 'd-face-m4-dnl)

gets rid of the error messages.

I have the following lines of elisp code in my .emacs file:

(defun d-font-lock-add-begin (keywords)
  (if (fboundp 'font-lock-add-keywords)
      (font-lock-add-keywords nil keywords nil)
    (setq font-lock-keywords
          (append
           keywords
           font-lock-keywords))))

(d-font-lock-add-begin
  `(
      (,(concat "\\(\\<m4_" "dnl\\)\\(.$\\)") (1 d-face-m4-dnl t) (2 
font-lock-comment-face))
   )
)



reply via email to

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