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.
*xah find output*, what doesC-h k <TAB>report? Also, what doesC-h v major-modereport? – Tyler Aug 22 '19 at 14:55C-h k <TAB>reports that it is bound tosmart-tab.C-h v major-modereportsxah-find-output-mode. – Dirk80 Aug 23 '19 at 12:08C-h k <TAB>should also tell us which mapsmart-tabwas found in, ie.(found in global-map)or(found in xah-find-file-map)? – Tyler Aug 23 '19 at 14:03C-h k <TAB>:<tab> runs the command smart-tab (found in global-map), which is an interactive Lisp function in ‘~/.emacs’.– Dirk80 Aug 23 '19 at 14:31xah-find-file-map, or possibly there is some code in your init file that is unsetting it. Maybe something here will help: https://emacs.stackexchange.com/questions/28429/how-do-i-troubleshoot-emacs-problems – Tyler Aug 23 '19 at 15:53