mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
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:
parent
b4ccb6e956
commit
38093c1a9e
@ -422,9 +422,9 @@ TODO: be meaner"
|
||||
(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
|
||||
@ -439,7 +439,7 @@ TODO: be meaner"
|
||||
(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
|
||||
;;;
|
||||
|
@ -236,8 +236,8 @@ Naturally this is only valid when `yas-indent-line' is `auto'"
|
||||
: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'."
|
||||
|
Loading…
x
Reference in New Issue
Block a user