After some exploration, this seems to be the more correct default.
Corrected test that checks for correct binding in org-mode, pass in emacs23 and emacs24
(ert-deftest test-yas-tab-binding ()
(with-temp-buffer
(yas-minor-mode -1)
- (should (not (eq (key-binding (yas--read-keybinding yas-trigger-key)) 'yas-expand)))
+ (should (not (eq (key-binding (yas--read-keybinding "<tab>")) 'yas-expand)))
(yas-minor-mode 1)
- (should (eq (key-binding (yas--read-keybinding yas-trigger-key)) 'yas-expand))
+ (should (eq (key-binding (yas--read-keybinding "<tab>")) 'yas-expand))
(yas-expand-snippet "$1 $2 $3")
(dolist (k (if (listp yas-next-field-key)
yas-next-field-key
(with-temp-buffer
(org-mode)
(yas-minor-mode 1)
- (should (eq (key-binding (yas--read-keybinding yas-trigger-key)) 'yas-expand))))
+ (should (eq (key-binding (yas--read-keybinding "<tab>")) 'yas-expand))))
;;; Helpers
;;;
:type 'boolean
:group 'yasnippet)
-(defcustom yas-trigger-key "TAB"
- "The key bound to `yas-expand' when function `yas-minor-mode' is active.
+(defcustom yas-trigger-key "<tab>"
+ "The key bound to `yas-expand' when `yas-minor-mode' is active.
Value is a string that is converted to the internal Emacs key
representation using `read-kbd-macro'."