In my .emacs
file I have bound the tab-key to a function called smart-tab
.
(global-set-key [(tab)] 'smart-tab)
(defun smart-tab ()
"This smart tab is minibuffer compliant: it acts as usual in
the minibuffer. Else, if mark is active, indents region. Else if
point is at the end of a symbol, expands it. Else indents the
current line."
(interactive)
(if (minibufferp)
(minibuffer-complete)
(if mark-active
(indent-region (region-beginning)
(region-end))
(if (looking-at "\\_>") ;; \_> end of symbol
(dabbrev-expand nil)
(indent-for-tab-command)))))
I'm using the module xah-find
. So I also load it in my .emacs
file.
(require 'xah-find)
When I'm now using e.g. the function xah-find-text
all the results are printed in a temporary buffer *xah-find output*
which is in the major mode ∑xah-find
.
This major mode binds the tab-key to xah-find-next-match
. But in my case the tab-key is still bound to my function smart-tab
instead.
I would like to overwrite the global set tab-key in this major mode, so that in the major mode ∑xah-find
the tab-key is bound to xah-find-next-match
instead to smart-tab
.