>>>> "DH" == Dan Holmsand
<dan(a)innehallsbolaget.com> writes:
DH> Martin Buchholz <martin(a)xemacs.org> writes:
> >>>>> "DanH" == Dan Holmsand
<dan(a)innehallsbolaget.com> writes:
>
DanH> I don't know if it's a bug or a feature - but this is all
because
DanH> XEmacs works differently from fsfmacs. Fortran-mode etc all define
DanH> "\e\C-h" in a local keymap, which on XEmacs overrides both M-backspace
DanH> and C-M-h. On fsfmacs it only overrides C-M-h (the intended
DanH> behaviour).
>
> But FSF Emacs redefines Meta+Backspace if you do
>
> (global-set-key "\e\C-?" 'backward-char)
DH> On my machine, it just redefines M-DEL.
Well, yes, but if you execute the keystroke pressing the keys labelled
Meta + BackSpace
it invokes the binding backward-char.
> so XEmacs is consistent at the _syntactic_ level. It merely
disagrees
> on the name of the key labelled "BackSpace" (on my computer).
>
DanH> That means that you have to re-assign backward-kill-word explicitly
to
DanH> M-BS if you also define C-M-h.
>
> I vote for someone working with the package maintainers to modify the
> key bindings for psgml-mode.
>
> They can probably be (compatibly!) changed to
>
> (define-key sgml-mode-map [(meta control h)] 'sgml-mark-current-element)
DH> Yes, you're right (I did some testing). Three examples:
DH> 3.
DH> (progn
DH> (setq foo-map (make-keymap))
DH> (define-key foo-map "\e\C-h" 'foo)
DH> (use-local-map foo-map))
DH> gives Local Bindings:
DH> M-backspace foo
DH> M-C-h foo
DH> in xemacs, but
DH> ESC C-h foo
DH> in fsf emacs.
DH> In my opinion, this is pretty counter-intuitive (i.e. a bug) in
DH> xemacs.
But Emacs would do the same if it also mapped C-h to Backspace instead
of DEL.
E.g.
(progn
(setq foo-map (make-keymap))
(define-key foo-map "\e\C-i" 'foo)
(use-local-map foo-map))
Makes both keystrokes Meta+Control+i and Meta+Tab invoke foo in Emacs.
Perhaps you are arguing that C-h should not be mapped to Backspace.
I might even agree with that.
But that will open several old cans of worms.
Martin