Fix font-lock-add-keywords (Closes bug 184)
authorSteve Youngs <steve@sxemacs.org>
Thu, 15 Sep 2016 01:24:41 +0000 (11:24 +1000)
committerSteve Youngs <steve@sxemacs.org>
Thu, 15 Sep 2016 01:24:41 +0000 (11:24 +1000)
* lisp/font-lock.el (font-lock-add-keywords): When compiled, the
keywords are the cdr of font-lock-keywords, not the cadr.
From: Jonathan Martin <jjm@keelhaul.me.uk>

Signed-off-by: Steve Youngs <steve@sxemacs.org>
lisp/font-lock.el

index 734689f..9118a8f 100644 (file)
@@ -988,7 +988,7 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
         (let ((was-compiled (eq (car font-lock-keywords) t)))
           ;; Bring back the user-level (uncompiled) keywords.
           (if was-compiled
-              (setq font-lock-keywords (cadr font-lock-keywords)))
+              (setq font-lock-keywords (cdr font-lock-keywords)))
           ;; Now modify or replace them.
           (if (eq how 'set)
               (setq font-lock-keywords keywords)