changeset 101922:8074f7b69818

Avoid messing up font-lock-global-modes.
author Glenn Morris <rgm@gnu.org>
date Tue, 10 Feb 2009 05:23:35 +0000
parents 7d0e7b6a2cbf
children 50624469b15a
files lisp/ChangeLog lisp/speedbar.el
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Feb 10 03:58:49 2009 +0000
+++ b/lisp/ChangeLog	Tue Feb 10 05:23:35 2009 +0000
@@ -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.
 
--- a/lisp/speedbar.el	Tue Feb 10 03:58:49 2009 +0000
+++ b/lisp/speedbar.el	Tue Feb 10 05:23:35 2009 +0000
@@ -4122,11 +4122,14 @@
 	    (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.
 
 
 ;;; Obsolete variables and functions