From: Takafumi Arakaki Date: Mon, 22 Oct 2012 13:29:28 +0000 (-0400) Subject: * lisp/progmodes/which-func.el (which-func-current): The hash-table may have X-Git-Tag: emacs-24.2.90~211^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f020becaf99b8797ae48a2df34693bb6c015391;p=emacs.git * lisp/progmodes/which-func.el (which-func-current): The hash-table may have an explicit nil. Fixes: debbugs:12338 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b680eadc08..e208b06189e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-22 Takafumi Arakaki (tiny change) + + * progmodes/which-func.el (which-func-current): The hash-table may have + an explicit nil (bug#12338). + 2012-10-22 Stefan Monnier * electric.el (electric-pair-delete-selection-self-insert-function): diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 4819149bdf6..c2ce12b6ad4 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -182,7 +182,8 @@ and you want to simplify them for the mode line (defconst which-func-current '(:eval (replace-regexp-in-string "%" "%%" - (gethash (selected-window) which-func-table which-func-unknown)))) + (or (gethash (selected-window) which-func-table) + which-func-unknown)))) ;;;###autoload (put 'which-func-current 'risky-local-variable t) (defvar which-func-mode nil