* Re: Unable to Rebind Tab Key in cperl-mode
[not found] ` <mailman.372.1178559647.32220.help-gnu-emacs@gnu.org>
@ 2007-05-07 22:30 ` wdr1
2007-05-09 15:02 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: wdr1 @ 2007-05-07 22:30 UTC (permalink / raw)
To: help-gnu-emacs
On May 7, 10:33 am, "Drew Adams" <drew.ad...@oracle.com> wrote:
> > Any ideas why none of these work:
>
> > (add-hook 'cperl-mode-hook
> > (function (lambda ()
> > (local-set-key (kbd "<tab>") 'indent-or-
> > complete)
> > (local-set-key [tab] 'indent-or-complete)
> > (local-set-key (kbd "TAB") 'indent-or-complete)
> > )))
>
> > I'm using emacs 21.2.1.
>
> You should provide more information. What do you mean by not work? What
> happens in each case? Have you first tried that key-binding code in a
> cperl-mode buffer, without the code being on a hook? Try to narrow down the
> problem and clarify the problem description.
>
> As a wild guess, you might check that your keyboard actually uses the <tab>
> key. It might, instead, use something like <iso-lefttab>.
Trying it without being on a hook was a good idea. I found this was
the appropriate syntax:
(local-set-key (kbd "TAB") 'indent-or-complete)
Instead of doing it manually each time I edit something in cperl-mode,
I'd like it to be done automatically.
Based on my understanding, I should do something like this, right?
(add-hook 'cperl-mode-hook
(function (lambda ()
(local-set-key (kbd "TAB") 'indent-or-complete)
)))
Yet, when I do describe-key & hit tab, this is what I get:
TAB runs the command cperl-indent-command
which is an interactive compiled Lisp function in `cperl-mode'.
(cperl-indent-command &optional WHOLE-EXP)
Any advice on things to try next?
Thanks,
-Bill
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Unable to Rebind Tab Key in cperl-mode
2007-05-07 22:30 ` Unable to Rebind Tab Key in cperl-mode wdr1
@ 2007-05-09 15:02 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-05-09 15:02 UTC (permalink / raw)
To: help-gnu-emacs
> Based on my understanding, I should do something like this, right?
> (add-hook 'cperl-mode-hook
> (function (lambda ()
> (local-set-key (kbd "TAB") 'indent-or-complete)
> )))
> Yet, when I do describe-key & hit tab, this is what I get:
> TAB runs the command cperl-indent-command
> which is an interactive compiled Lisp function in `cperl-mode'.
> (cperl-indent-command &optional WHOLE-EXP)
> Any advice on things to try next?
Are you sure you're using cperl-mode?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-09 15:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1178517106.678877.221100@p77g2000hsh.googlegroups.com>
[not found] ` <mailman.372.1178559647.32220.help-gnu-emacs@gnu.org>
2007-05-07 22:30 ` Unable to Rebind Tab Key in cperl-mode wdr1
2007-05-09 15:02 ` Stefan Monnier
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.