]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't add modes to which-func-modes if already set to t.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 21 Apr 2012 16:57:49 +0000 (18:57 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 21 Apr 2012 16:57:49 +0000 (18:57 +0200)
* lisp/progmodes/verilog-mode.el (verilog-mode): Check whether
  which-func-modes is t before adding verilog-mode.
  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

* lisp/mh-e/mh-folder.el (top): Check whether which-func-modes
  is t before adding mh-folder-mode.

lisp/ChangeLog
lisp/mh-e/ChangeLog
lisp/mh-e/mh-folder.el
lisp/progmodes/verilog-mode.el

index 1b9ef8dbd02184d25c35148cd6d5db0f42349c9d..2ffd9ce77a8f08bda6c9050f9ae0bdd5df126382 100644 (file)
@@ -1,7 +1,12 @@
+2012-04-21  Juanma Barranquero  <lekktu@gmail.com>
+
+       * progmodes/verilog-mode.el (verilog-mode): Check whether
+       which-func-modes is t before adding verilog-mode.
+       Reported by Andy Moreton <andrewjmoreton@gmail.com>.
+
 2012-04-21  Leo Liu  <sdl.web@gmail.com>
 
-       * net/rcirc.el (rcirc): Avoid error when process-contact returns
-       t.
+       * net/rcirc.el (rcirc): Avoid error when process-contact returns t.
 
 2012-04-21  Michael Vehrs  <Michael.Burschik@gmx.de>
 
index 2c3d0dc3803d9e80f2f4f99b4a66c6031634eb39..f98b4a7490ee11a9c81ba2c8050cf50f4fbff7a1 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-21  Juanma Barranquero  <lekktu@gmail.com>
+
+       * mh-folder.el (top): Check whether which-func-modes is t before
+       adding mh-folder-mode.
+
 2011-11-20  Bill Wohler  <wohler@newt.com>
 
        * Release MH-E version 8.3.1.
index 71ef87385ca5d83dcd9209242a62c82a78e162ae..d9e6c74f3f392907e4099ddbf5ee0c098ef1f0dd 100644 (file)
@@ -520,7 +520,7 @@ font-lock is done highlighting.")
 
 ;; Register mh-folder-mode as supporting which-function-mode...
 (mh-require 'which-func nil t)
-(when (boundp 'which-func-modes)
+(when (and (boundp 'which-func-modes) (listp which-func-modes))
   (add-to-list 'which-func-modes 'mh-folder-mode))
 
 ;; Shush compiler.
index c8ef8f0324c9309f283690727f4a80658a285da5..0139795dd38223fe79cc93877215d3978477c6f7 100644 (file)
@@ -3592,7 +3592,7 @@ Key bindings specific to `verilog-mode-map' are:
   (set (make-local-variable 'imenu-generic-expression)
        verilog-imenu-generic-expression)
   ;; Tell which-func-modes that imenu knows about verilog
-  (when (boundp 'which-func-modes)
+  (when (and (boundp 'which-func-modes) (listp which-func-modes))
     (add-to-list 'which-func-modes 'verilog-mode))
   ;; hideshow support
   (when (boundp 'hs-special-modes-alist)