unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* about set key
@ 2008-01-01 18:11 lof
  2008-01-09  2:38 ` Wang xiangdong
  0 siblings, 1 reply; 2+ messages in thread
From: lof @ 2008-01-01 18:11 UTC (permalink / raw)
  To: help-gnu-emacs

I want to set tab as hippie-expand hot key for text writing
so I write:
(defun my-indent-or-complete ()
  (interactive)
  (if (looking-at "\\>")
      (hippie-expand nil)
    (indent-for-tab-command)
    ))
(global-set-key [(tab)] 'my-indent-or-complete)

but there is a problem
when I want to use a command,
I hit M-x and then I donnot remember the command
before , I hit M-x s<tab> ,so that it can give me some options
but now it start hippie-expand , I cannot get the options
how could I prevent hippie-expand start when I input command?

thank you

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

* Re: about set key
  2008-01-01 18:11 about set key lof
@ 2008-01-09  2:38 ` Wang xiangdong
  0 siblings, 0 replies; 2+ messages in thread
From: Wang xiangdong @ 2008-01-09  2:38 UTC (permalink / raw)
  To: help-gnu-emacs


(global-set-key (kbd "TAB") 'my-indent-or-complete)

TAB and <tab> are different under X.
lof <flyli3415@gmail.com> writes:

> I want to set tab as hippie-expand hot key for text writing
> so I write:
> (defun my-indent-or-complete ()
>   (interactive)
>   (if (looking-at "\\>")
>       (hippie-expand nil)
>     (indent-for-tab-command)
>     ))
> (global-set-key [(tab)] 'my-indent-or-complete)
>
> but there is a problem
> when I want to use a command,
> I hit M-x and then I donnot remember the command
> before , I hit M-x s<tab> ,so that it can give me some options
> but now it start hippie-expand , I cannot get the options
> how could I prevent hippie-expand start when I input command?
>
> thank you

-- 
Every man is the master of his own fortune. 
http://www.google.com
              -- Wang xiangdong

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

end of thread, other threads:[~2008-01-09  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-01 18:11 about set key lof
2008-01-09  2:38 ` Wang xiangdong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).