]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid messing up font-lock-global-modes.
authorGlenn Morris <rgm@gnu.org>
Tue, 10 Feb 2009 05:23:35 +0000 (05:23 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 10 Feb 2009 05:23:35 +0000 (05:23 +0000)
lisp/ChangeLog
lisp/speedbar.el

index fb59a1283c4c030ab03a707b87475ec1dc0c1381..f5addc9374a1992ae30c4579b3708d820de6de22 100644 (file)
@@ -1,5 +1,7 @@
 2009-02-10  Glenn Morris  <rgm@gnu.org>
 
+       * speedbar.el: Avoid messing up font-lock-global-modes.
+
        * mail/mail-utils.el (mail-use-rfc822): Remove * from defcustom doc.
        (mail-file-babyl-p): Use with-temp-buffer.
 
index ac10f53aa41f7ea109bf6cee884410d78f448103..ca2c102b35b973432bc6391d705d1ced0b38807d 100644 (file)
@@ -4122,11 +4122,14 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
            (def-edebug-spec speedbar-with-writable def-body)))
 
 ;; Fix a font lock problem for some versions of Emacs
-(if (boundp 'font-lock-global-modes)
-    (if (listp font-lock-global-modes)
-       (add-to-list 'font-lock-global-modes '(not speedbar-mode))
-      )
-  )
+(and (boundp 'font-lock-global-modes)
+     font-lock-global-modes
+     (if (eq font-lock-global-modes t)
+        (setq font-lock-global-modes '(not speedbar-mode))
+       (if (eq (car font-lock-global-modes) 'not)
+          (add-to-list 'font-lock-global-modes 'speedbar-mode t))))
+;; If f-l-g-m is a non-empty list that doesn't begin with not, there
+;; is nothing we can do.
 
 \f
 ;;; Obsolete variables and functions