auto-complete defines three keymaps that might be relevant here:
ac-mode-map: This map is active when
auto-complete-mode is enabled.
ac-set-trigger-key adds the binding for the trigger key to this map.
ac-completing-map: This map is active during completion. By default,
TAB is bound to
ac-expand in this map.
ac-menu-map: This map is active while the popup showing possible completions is displayed (in addition to
ac-completing-map), but only if
ac-use-menu-map is set to a non-
If you want to make sure
TAB won't do anything that's even remotely related to completion, you should probably "unset" the bindings in all of these maps (using the same technique you demonstrate for
yas-minor-mode-map in your question).
Here is a minimal configuration that keeps
TAB from doing completion:
(define-key ac-mode-map (kbd "TAB") nil)
(define-key ac-completing-map (kbd "TAB") nil)
(define-key ac-completing-map [tab] nil)
You can try it out by starting Emacs via
emacs -Q, copying the code into the
*scratch* buffer and running M-x