Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
Added an exceptions list for major modes that don't play well.
Browse files Browse the repository at this point in the history
Seems like this behavior could live in the major mode's hook, but
define-globalized-minor-mode prevents that from working.
  • Loading branch information
psanford authored and genehack committed Dec 12, 2010
1 parent 1816e1d commit 909a27d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion smart-tab.el
Expand Up @@ -69,6 +69,11 @@ smart-tab-using-hippie-expand"
:value-type (function :tag "Completion function to use in this mode"))
:group 'smart-tab)

(defcustom smart-tab-disabled-major-modes '(term-mode)
"List of major modes that should not use smart-tab"
:type 'sexp
:group 'smart-tab)

;;;###autoload
(defun smart-tab (prefix)
"Try to 'do the smart thing' when tab is pressed.
Expand Down Expand Up @@ -136,7 +141,8 @@ Null prefix argument turns off the mode."
;; Don't start `smart-tab-mode' when in the minibuffer or a read-only
;; buffer.
(when (or (minibufferp)
buffer-read-only)
buffer-read-only
(member major-mode smart-tab-disabled-major-modes))
(smart-tab-mode-off)))))

;;;###autoload
Expand Down

0 comments on commit 909a27d

Please sign in to comment.