You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;; Use the Emacs standard indentation binding. This may upset c-mode;; which does not follow this at the moment, but I see no better;; choice.
(define-key map [tab] 'indent-for-tab-command)
I can see that the original code correctly used TAB (\t) instead of <tab> ([tab]) and it was later changed (commit 3699aca); but I strongly suspect that change was made for purely aesthetic purposes, as it's a bug.
Terminals don't send <tab> events; they only deal with TAB. This is why Emacs (a) translates <tab> to TAB, and then (b) uses TAB consistently for binding keys (and certainly the referenced c-mode-map binds TAB and not <tab>). This convention ensures that GUI and terminal Emacs always do the same thing.
With the current code, C-h k TAB tells us:
<tab> runs the command indent-for-tab-command in GUI frames
TAB runs the command c-indent-line-or-region in terminal frames
The text was updated successfully, but these errors were encountered:
I'm confused by the reply, but the correct fix for php-mode.el is what I've shown in my initial post, and if you want to sort it in your own config you could do this:
That last line should be:
I can see that the original code correctly used
TAB
(\t
) instead of<tab>
([tab]
) and it was later changed (commit 3699aca); but I strongly suspect that change was made for purely aesthetic purposes, as it's a bug.Terminals don't send
<tab>
events; they only deal withTAB
. This is why Emacs (a) translates<tab>
toTAB
, and then (b) usesTAB
consistently for binding keys (and certainly the referencedc-mode-map
bindsTAB
and not<tab>
). This convention ensures that GUI and terminal Emacs always do the same thing.With the current code,
C-h k TAB
tells us:<tab> runs the command indent-for-tab-command
in GUI framesTAB runs the command c-indent-line-or-region
in terminal framesThe text was updated successfully, but these errors were encountered: