diff options
Diffstat (limited to 'lisp/progmodes/which-func.el')
-rw-r--r-- | lisp/progmodes/which-func.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 02a8d72758c..176f599649f 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -141,12 +141,14 @@ Zero means compute the Imenu menu regardless of size." local-map ,which-func-keymap face which-func mouse-face mode-line-highlight - help-echo "mouse-1: go to beginning\n\ -mouse-2: toggle rest visibility\n\ -mouse-3: go to end") + help-echo ,(concat + "Current function\n" + "mouse-1: go to beginning\n" + "mouse-2: toggle rest visibility\n" + "mouse-3: go to end")) "]") "Format for displaying the function in the mode line." - :version "24.2" ; added mouse-face; 24point2 is correct + :version "28.1" :type 'sexp) ;;;###autoload (put 'which-func-format 'risky-local-variable t) @@ -175,7 +177,7 @@ and you want to simplify them for the mode line (defvar which-func-table (make-hash-table :test 'eq :weakness 'key)) (defconst which-func-current - '(:eval (replace-regexp-in-string + '(:eval (string-replace "%" "%%" (or (gethash (selected-window) which-func-table) which-func-unknown)))) @@ -183,7 +185,8 @@ and you want to simplify them for the mode line (defvar-local which-func-mode nil "Non-nil means display current function name in mode line. -This makes a difference only if `which-function-mode' is non-nil.") +This makes a difference only if variable `which-function-mode' is +non-nil.") (add-hook 'after-change-major-mode-hook #'which-func-ff-hook t) |