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 | |
| 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
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/which-func.el | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0efca43be1e..4794fbe2595 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-06-03 Jack Duthen <duthen.mac.01@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * progmodes/which-func.el (which-func-update-ediff-windows): New | ||
| 4 | function. Use it in ediff-select-hook (Bug#11478). | ||
| 5 | |||
| 1 | 2012-06-03 Chong Yidong <cyd@gnu.org> | 6 | 2012-06-03 Chong Yidong <cyd@gnu.org> |
| 2 | 7 | ||
| 3 | * bindings.el: Remove explicit help text from format-mode-line. | 8 | * 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." | |||
| 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 |