all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* <tab> differs from TAB, tab-key differs from C-i. What?!
@ 2008-08-22 10:26 cons
  2008-08-22 11:15 ` cons
  0 siblings, 1 reply; 2+ messages in thread
From: cons @ 2008-08-22 10:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hello! I'm very confused about one thing:

Go to *scratch*-buffer and press 'C-h b' (describe-bindings). Under
'Major Mode Bindings' TAB is bound to lisp-indent-line. This mean that
when I press the tab-key or C-i (the same thing), lisp-indent-line is
executed. Fine.

BUT, now try this. Evaluate these 2 expressions in *scratch*:

(defun foo ()
  (interactive)
  (message "Executed foo."))
(global-set-key (kbd "<tab>") 'foo)

Once again, press 'C-h b'. Our new binding of <tab> to foo is found
under 'Global Bindings'. So, we have the old local binding (major
mode) of TAB to lisp-indent-line that shadows a global binding of
<tab> to foo. Now pressing the tab-key or C-i should mean the same
thing (produce ascii code 9), which in turn should execute lisp-indent-
line (since local bindings takes precedence over global bindings),
right?

Wrong. Pressing the tab-key executes foo, and pressing C-i executes
lisp-indent-line. So, TAB seems to mean pressing C-i, which apparently
differs from <tab> which seems to mean pressing the tab-key. Now, this
is becoming a mess.

1) Shouldn't pressing the tab-key and C-i mean the same thing?
2) Shouldn't all emacs' representations of a tab (<tab>, TAB, ?\t,
"\t", ascii code 9, <C-i>, ?\C-i, ?\^i etc etc) mean the same thing?

Best regards,

/Stefan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-22 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-22 10:26 <tab> differs from TAB, tab-key differs from C-i. What?! cons
2008-08-22 11:15 ` cons

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.