From: Jack Duthen Date: Sun, 3 Jun 2012 11:10:44 +0000 (+0800) Subject: Improve ediff and which-func integration. X-Git-Tag: emacs-24.2.90~471^2~6^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=757ee65741cc9400314f0a2cc3f83f87c21c79e6;p=emacs.git Improve ediff and which-func integration. * lisp/progmodes/which-func.el (which-func-update-ediff-windows): New function. Use it in ediff-select-hook. Fixes: debbugs:11478 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0efca43be1e..4794fbe2595 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-03 Jack Duthen (tiny change) + + * progmodes/which-func.el (which-func-update-ediff-windows): New + function. Use it in ediff-select-hook (Bug#11478). + 2012-06-03 Chong Yidong * bindings.el: Remove explicit help text from format-mode-line. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 1c3c6a95774..d5c8a1c6792 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -337,6 +337,22 @@ If no function name is found, return nil." (funcall which-func-cleanup-function name) name)))) + +;;; 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