]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/which-func.el
* progmodes/python.el: Enhancements to navigation commands.
[gnu-emacs] / lisp / progmodes / which-func.el
index 1c3c6a95774523edea67662475cb421655355225..02948b35fe0e84ca4d21bfbffdd9fc44c7cae8e7 100644 (file)
@@ -144,12 +144,13 @@ Zero means compute the Imenu menu regardless of size."
     (:propertize which-func-current
                 local-map ,which-func-keymap
                 face which-func
-                ;;mouse-face highlight ; currently not evaluated :-(
+                mouse-face mode-line-highlight
                 help-echo "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
   :group 'which-func
   :type 'sexp)
 ;;;###autoload (put 'which-func-format 'risky-local-variable t)
@@ -337,6 +338,22 @@ If no function name is found, return nil."
          (funcall which-func-cleanup-function name)
        name))))
 
+\f
+;;; Integration with other packages
+
+(defun which-func-update-ediff-windows ()
+  "Update Which-Function mode display for Ediff windows.
+This function is meant to be called from `ediff-select-hook'."
+  (when (eq major-mode 'ediff-mode)
+    (when ediff-window-A
+      (which-func-update-1 ediff-window-A))
+    (when ediff-window-B
+      (which-func-update-1 ediff-window-B))
+    (when ediff-window-C
+      (which-func-update-1 ediff-window-C))))
+
+(add-hook 'ediff-select-hook 'which-func-update-ediff-windows)
+
 (provide 'which-func)
 
 ;;; which-func.el ends here