Jan Vroonhof writes:
> > + `(if (not (boundp 'backward-delete-function))
> > + (cperl-define-key "\177" ,func)
> > + ;; we do not clobber backspace on standard Emacs, why?
>
> Since standard eamcs is smart enough to map \177 to [backspace] if
> window-mode.
Unless 20.x standard emacsen do things different they map [backspace]
to \177, using function-key-map, which is unfortunately exactly the
wrong thing but needed by historical bagage.
Could not agree less. Works like a charm.
> Why do you do this `if' at run time?
Because otherwise it would be a compile time if and I am in the
habbit of worrying about .elc compatability and therefor I am used to
writing runtime tests only.
In this particular case: compatibility with *what*? If you feel it is
important, please comment it likewise.
> > + (when cperl-backward-delete-function
> > + (make-local-variable 'backward-delete-function)
> > + (setq backward-delete-function cperl-backward-delete-function))
>
> Why should this be local?
Because it is the equivalent of a keybinding and that should only be
done in the cperl buffer. That's why it needs to be done in
(cperl-mode) for each new buffer.
Do not follow you unless backward-delete-function is not
CPerl-specific... Probably it is not, so it is OK.
Ilya