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

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

How can I set a different key binding to minibuffer?


From: Wang Yin
Subject: How can I set a different key binding to minibuffer?
Date: 09 May 2003 09:12:05 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hi,

I'm trying to bind a function named my-indent-or-complete to TAB.


(defun my-indent-or-complete ()
  "hippie-expand, if we are at word boundary, indent otherwise"
  (interactive)
  (if (looking-at "\\>")
      (hippie-expand nil)
    (indent-for-tab-command)
    ))

(global-set-key [(tab)] 'my-indent-or-complete)

(setq hippie-expand-try-functions-list 
      '(try-expand-dabbrev-visible
        try-expand-dabbrev
        try-expand-dabbrev-all-buffers
        try-expand-dabbrev-from-kill
        try-complete-file-name-partially
        try-complete-file-name
        try-expand-all-abbrevs
        try-expand-list
        try-expand-line
        try-complete-lisp-symbol-partially
        try-complete-lisp-symbol))

But when I partially typed a M-x commands in my minibuffer, I want to
TAB to complete it. But TAB is hippie-expand'ing! I want no expand in
my minibuffer. How can I do that?

Can I have a different key binding in the minibuffer? How do I set it?
Or can I have a different local variable
hippie-expand-try-functions-list in my minibuffer?

Thanks.

-- 
Wang Yin
DA Lab, Tsinghua University,
100084
Beijing China


reply via email to

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