Fix: default value for yas-trigger-key is not "<tab>" not "TAB"

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
This commit is contained in:
Joao Tavora 2012-08-07 12:06:53 +01:00
parent b4ccb6e956
commit 38093c1a9e
2 changed files with 5 additions and 5 deletions

View File

@ -422,9 +422,9 @@ TODO: be meaner"
(ert-deftest test-yas-tab-binding () (ert-deftest test-yas-tab-binding ()
(with-temp-buffer (with-temp-buffer
(yas-minor-mode -1) (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) (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") (yas-expand-snippet "$1 $2 $3")
(dolist (k (if (listp yas-next-field-key) (dolist (k (if (listp yas-next-field-key)
yas-next-field-key yas-next-field-key
@ -439,7 +439,7 @@ TODO: be meaner"
(with-temp-buffer (with-temp-buffer
(org-mode) (org-mode)
(yas-minor-mode 1) (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 ;;; Helpers
;;; ;;;

View File

@ -236,8 +236,8 @@ Naturally this is only valid when `yas-indent-line' is `auto'"
:type 'boolean :type 'boolean
:group 'yasnippet) :group 'yasnippet)
(defcustom yas-trigger-key "TAB" (defcustom yas-trigger-key "<tab>"
"The key bound to `yas-expand' when function `yas-minor-mode' is active. "The key bound to `yas-expand' when `yas-minor-mode' is active.
Value is a string that is converted to the internal Emacs key Value is a string that is converted to the internal Emacs key
representation using `read-kbd-macro'." representation using `read-kbd-macro'."