emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108467: Improve ediff and which-


From: Stefan Monnier
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108467: Improve ediff and which-func integration.
Date: Sun, 03 Jun 2012 11:31:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> --- a/lisp/progmodes/which-func.el    2012-06-02 10:56:09 +0000
> +++ b/lisp/progmodes/which-func.el    2012-06-03 11:10:44 +0000
> @@ -337,6 +337,22 @@
>         (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

Why put this in which-func.el rather than in ediff?
Also, is there a particular reason to use (eq major-mode 'ediff-mode)
instead of (derived-mode-p 'ediff-mode)?


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]