diff options
| author | Jack Duthen | 2012-06-03 19:10:44 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-06-03 19:10:44 +0800 |
| commit | 757ee65741cc9400314f0a2cc3f83f87c21c79e6 (patch) | |
| tree | 448caf7b8d784b48218430336040233b7dd0395a /lisp/progmodes | |
| parent | cbe46e5fae3879facf5db395afd73ca2600f8a41 (diff) | |
| download | emacs-757ee65741cc9400314f0a2cc3f83f87c21c79e6.tar.gz emacs-757ee65741cc9400314f0a2cc3f83f87c21c79e6.zip | |
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
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/which-func.el | 16 |
1 files changed, 16 insertions, 0 deletions
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." | |||
| 337 | (funcall which-func-cleanup-function name) | 337 | (funcall which-func-cleanup-function name) |
| 338 | name)))) | 338 | name)))) |
| 339 | 339 | ||
| 340 | |||
| 341 | ;;; Integration with other packages | ||
| 342 | |||
| 343 | (defun which-func-update-ediff-windows () | ||
| 344 | "Update Which-Function mode display for Ediff windows. | ||
| 345 | This function is meant to be called from `ediff-select-hook'." | ||
| 346 | (when (eq major-mode 'ediff-mode) | ||
| 347 | (when ediff-window-A | ||
| 348 | (which-func-update-1 ediff-window-A)) | ||
| 349 | (when ediff-window-B | ||
| 350 | (which-func-update-1 ediff-window-B)) | ||
| 351 | (when ediff-window-C | ||
| 352 | (which-func-update-1 ediff-window-C)))) | ||
| 353 | |||
| 354 | (add-hook 'ediff-select-hook 'which-func-update-ediff-windows) | ||
| 355 | |||
| 340 | (provide 'which-func) | 356 | (provide 'which-func) |
| 341 | 357 | ||
| 342 | ;;; which-func.el ends here | 358 | ;;; which-func.el ends here |