help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Indenting text bugs.


From: Drew Adams
Subject: RE: Indenting text bugs.
Date: Tue, 2 Mar 2010 16:19:41 -0800

> >> Normally, `M-TAB' (hence `ESC TAB') will complete text 
> >> (e.g. a function name) at point. It is bound by default
> >> to `complete-symbol', `lisp-complete-symbol',
> >> `completion-at-point', or something similar, depending on 
> >> the current mode and your Emacs version.
> >
> > Isn't that a very inconvenient default? Almost every window 
> > manager across platforms intercept that to switch windows...

No, they do not intercept `ESC TAB'.

Some, such as Windows, do, by default, intercept ALT-TAB, which maps to `M-TAB'
by default (that's two "by default"s ;-)).

But you need only do this to make Windows pass `M-TAB' along to Emacs:

;; (setq w32-alt-is-meta  t)
(when (fboundp 'w32-register-hot-key)
  (w32-register-hot-key [M-tab]))

The first line is not really needed - t is the default value.
Variable `w32-alt-is-meta' determines whether ALT maps to Meta.

The other lines tell Windows to pass `M-TAB' to Emacs.
If ALT maps to Meta, you can register [M-tab] as a hot key.
If it does not, you can register [A-tab] as the hot key.

> Yes, some of us think that it is. Note hoever that it is "Meta-Tab",
> not "Alt-Tab".

Yes and no. It is `M-TAB' in its incarnation as ALT-TAB.
It is not `M-TAB' in its incarnation as `ESC TAB'. ;-)

Kidding aside, It's useful for users to know that they can use ESC instead of
ALT to realize Meta key sequences. Oldsters know this, because Emacs Meta
predates Meta as ALT key (AFAIK). In older versions of Emacs, Meta key bindings
are even listed as bindings on the ESC keymap.

And it is useful to know that it is the ALT key that Windows grabs by default
(e.g. ALT-TAB); it is not necessarily the Meta key - as you indicate yourself,
Lennart, in what you say next:

> Personally I use the left window key (instead of Alt) as Emacs' Meta.

In sum:

1. You can use ESC instead of the Alt key, even if Windows grabs ALT-TAB.

2. If you want, you can tell Windows not to grab ALT-TAB but to pass it along to
Emacs.

(3. If you want, Emacs will fix you a delicious bouillabaisse for supper...)





reply via email to

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