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

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

Problem with key binding


From: Mark A. Nicolosi
Subject: Problem with key binding
Date: Sun, 23 Jan 2005 20:55:14 GMT
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Hi,

I found a function on the Emacs wiki that auto-completes a symbol (using dabbrev) if the point is middle or end of a line otherwise it indents that line.

The function works fine when I run it manually, however I can't get it work when binding it to <TAB>. Here's what I'm using:

(defun my-c-mode-hook ()
  ;; <SNIP>
  (local-set-key (kbd "\t") 'indent-or-complete)
  ;; <SNIP>
  )
(add-hook 'c-mode-hook 'my-c-mode-hook)

I know the my-c-mode-hook function is running, because other stuff in there is working. This part is really strange: If run local-set-key press tab and then enter ident-or-complete it works. What the heck?

TIA

--
Mark A. Nicolosi

reply via email to

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