mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
* replaced <tab> by TAB and fixed a small bug in $> indendation
This commit is contained in:
parent
a1a4bfc773
commit
63378d00b2
10
yasnippet.el
10
yasnippet.el
@ -93,7 +93,7 @@ representation using `read-kbd-macro'. "
|
||||
:type 'string
|
||||
:group 'yasnippet)
|
||||
|
||||
(defcustom yas/next-field-key "<tab>"
|
||||
(defcustom yas/next-field-key "TAB"
|
||||
"The key to navigate to next field when a snippet is active.
|
||||
|
||||
Value is a string that is converted to the internal Emacs key
|
||||
@ -1705,7 +1705,8 @@ Meant to be called in a narrowed buffer, does various passes"
|
||||
(yas/indent snippet)))
|
||||
|
||||
(defun yas/indent (snippet)
|
||||
;;; XXX: fixed indentation not working
|
||||
;;; XXX: fixed indentation not working
|
||||
(save-excursion
|
||||
(cond ((eq yas/indent-line 'fixed)
|
||||
(let ((fill-prefix (make-string yas/start-column ? )))
|
||||
(indent-region (point-min) (point-max))))
|
||||
@ -1733,11 +1734,12 @@ Meant to be called in a narrowed buffer, does various passes"
|
||||
;;
|
||||
(set-marker (yas/snippet-exit snippet) (point))))))
|
||||
(t
|
||||
nil))
|
||||
nil)))
|
||||
(save-excursion
|
||||
(while (re-search-forward "$>" nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0))
|
||||
(when (not (eq yas/indent-line 'auto))
|
||||
(indent-according-to-mode))))
|
||||
(indent-according-to-mode)))))
|
||||
|
||||
|
||||
(defun yas/escape-string (escaped)
|
||||
|
Loading…
x
Reference in New Issue
Block a user