From 7dd51bf1c26ff6b830d7cfad78014742afcc2e2a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 21 Apr 2012 18:57:49 +0200 Subject: [PATCH] Don't add modes to which-func-modes if already set to t. * lisp/progmodes/verilog-mode.el (verilog-mode): Check whether which-func-modes is t before adding verilog-mode. Reported by Andy Moreton . * lisp/mh-e/mh-folder.el (top): Check whether which-func-modes is t before adding mh-folder-mode. --- lisp/ChangeLog | 9 +++++++-- lisp/mh-e/ChangeLog | 5 +++++ lisp/mh-e/mh-folder.el | 2 +- lisp/progmodes/verilog-mode.el | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b9ef8dbd02..2ffd9ce77a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ +2012-04-21 Juanma Barranquero + + * progmodes/verilog-mode.el (verilog-mode): Check whether + which-func-modes is t before adding verilog-mode. + Reported by Andy Moreton . + 2012-04-21 Leo Liu - * 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 diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 2c3d0dc3803..f98b4a7490e 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2012-04-21 Juanma Barranquero + + * mh-folder.el (top): Check whether which-func-modes is t before + adding mh-folder-mode. + 2011-11-20 Bill Wohler * Release MH-E version 8.3.1. diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 71ef87385ca..d9e6c74f3f3 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -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. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c8ef8f0324c..0139795dd38 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -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) -- 2.11.4.GIT