]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/which-func.el (which-func-update): Bind `non-essential`
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 18 Dec 2020 14:16:29 +0000 (09:16 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 18 Dec 2020 14:16:29 +0000 (09:16 -0500)
lisp/progmodes/which-func.el

index a524bbaa2231fe696fe9b4b1e1a19f539e0f9817..562a357a8cb3ae3aa13aed5b96660d1674abe012 100644 (file)
@@ -186,7 +186,7 @@ and you want to simplify them for the mode line
   "Non-nil means display current function name in mode line.
 This makes a difference only if `which-function-mode' is non-nil.")
 
-(add-hook 'after-change-major-mode-hook 'which-func-ff-hook t)
+(add-hook 'after-change-major-mode-hook #'which-func-ff-hook t)
 
 (defun which-func-try-to-enable ()
   (unless (or (not which-function-mode)
@@ -216,7 +216,8 @@ It creates the Imenu index for the buffer, if necessary."
 (defun which-func-update ()
   ;; "Update the Which-Function mode display for all windows."
   ;; (walk-windows 'which-func-update-1 nil 'visible))
-  (which-func-update-1 (selected-window)))
+  (let ((non-essential t))
+    (which-func-update-1 (selected-window))))
 
 (defun which-func-update-1 (window)
   "Update the Which Function mode display for window WINDOW."
@@ -356,7 +357,7 @@ This function is meant to be called from `ediff-select-hook'."
     (when ediff-window-C
       (which-func-update-1 ediff-window-C))))
 
-(add-hook 'ediff-select-hook 'which-func-update-ediff-windows)
+(add-hook 'ediff-select-hook #'which-func-update-ediff-windows)
 
 (provide 'which-func)