Some users need to customize Ediff in rather sophisticated ways, which
requires different defaults for different kinds of files (e.g., SGML,
etc.). Ediff supports this kind of customization in several ways. First,
most customization variables are buffer-local. Those that aren't are
usually accessible from within Ediff Control Panel, so one can make them
local to the panel by calling make-local-variable from within
ediff-startup-hook.
Second, the function ediff-setup accepts an optional sixth
argument which has the form ((var-name-1 . val-1)
(var-name-2 . val-2) ...). The function
ediff-setup sets the variables in the list to the respective
values, locally in the Ediff control buffer. This is an easy way to
throw in custom variables (which usually should be buffer-local) that
can then be tested in various hooks.
Make sure the variable ediff-job-name and ediff-word-mode are set
properly in this case, as some things in Ediff depend on this.
Finally, if you want custom-tailored help messages, you can set the
variables ediff-brief-help-message-function and
ediff-long-help-message-function
to functions that return help strings.
When customizing Ediff, some other variables are useful, although they are
not user-definable. They are local to the Ediff control buffer, so this
buffer must be current when you access these variables. The control buffer
is accessible via the variable ediff-control-buffer, which is also
local to that buffer. It is usually used for checking if the current buffer
is also the control buffer.
Other variables of interest are:
ediff-buffer-Aediff-buffer-Bediff-buffer-Cnil.
ediff-window-Anil or it may be a dead window.
ediff-window-Bediff-window-Cediff-control-framenil only if Ediff uses the multiframe display, i.e., when
the control buffer is in its own frame.