1

For Ediff's wide display feature I like to use my own ediff-make-wide-display function. Ediff has a variable for this: ediff-make-wide-display-function. However when I write:

(defun my-ediff-make-wide-display ()
   ...)

(setq ediff-make-wide-display-function #'my-ediff-make-wide-display)

my definition doesn't seem to get used when I toggle the display to wide view. I guess the reason is that ediff-make-wide-display-function is defined as a local variable (via ediff-defvar-local), and my setq call sets the variable somewhere else...

So to which buffers is the definition local and how can I set it for all of these buffers?

halloleo
  • 1,215
  • 9
  • 23

1 Answers1

2

I think you've diagnosed the issue correctly, and you can either:

  1. Use ediff-mode-hook to set the buffer-local value.
  2. Use setq-default to set the default value.

Offhand I think #2 seems like the best option.

phils
  • 48,657
  • 3
  • 76
  • 115
  • Using `setq-default` works perfectly. Thanks. - Just out of curiosity, what would I need to use in `ediff-mode-hook`? `setq-local`? – halloleo Nov 30 '21 at 05:36
  • You can do, but because this variable "Automatically becomes permanently buffer-local when set" you could also just use `setq`. (The "permanently" isn't important here, but means it also survives changes to the major mode.) – phils Nov 30 '21 at 08:42
  • Makes sense. Thanks. – halloleo Nov 30 '21 at 12:31