mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
* Corrected a typo in line 766
This commit is contained in:
parent
35fa76296e
commit
6b1dce61d9
19
yasnippet.el
19
yasnippet.el
@ -763,7 +763,7 @@ This function implements the rules described in
|
|||||||
(let ((requirement (yas/require-template-specific-condition-p)))
|
(let ((requirement (yas/require-template-specific-condition-p)))
|
||||||
(if (eq requirement 'always)
|
(if (eq requirement 'always)
|
||||||
templates
|
templates
|
||||||
p (remove-if-not #'(lambda (pair)
|
(remove-if-not #'(lambda (pair)
|
||||||
(yas/template-can-expand-p (yas/template-condition (cdr pair)) requirement))
|
(yas/template-can-expand-p (yas/template-condition (cdr pair)) requirement))
|
||||||
templates))))
|
templates))))
|
||||||
|
|
||||||
@ -2234,7 +2234,7 @@ Also create some protection overlays"
|
|||||||
(yas/check-commit-snippet))
|
(yas/check-commit-snippet))
|
||||||
(yas/snippets-at-point)))
|
(yas/snippets-at-point)))
|
||||||
|
|
||||||
|
|
||||||
;;; Apropos markers-to-points:
|
;;; Apropos markers-to-points:
|
||||||
;;;
|
;;;
|
||||||
;;; This was found useful for performance reasons, so that an
|
;;; This was found useful for performance reasons, so that an
|
||||||
@ -2472,7 +2472,7 @@ progress."
|
|||||||
(yas/field-start field))))
|
(yas/field-start field))))
|
||||||
(yas/skip-and-clear field))
|
(yas/skip-and-clear field))
|
||||||
(setf (yas/field-modified-p field) t))))))
|
(setf (yas/field-modified-p field) t))))))
|
||||||
|
|
||||||
;;; Apropos protection overlays:
|
;;; Apropos protection overlays:
|
||||||
;;;
|
;;;
|
||||||
;;; These exist for nasty users who will try to delete parts of the
|
;;; These exist for nasty users who will try to delete parts of the
|
||||||
@ -2542,6 +2542,7 @@ The error should be ignored in `debug-ignored-errors'"
|
|||||||
|
|
||||||
(add-to-list 'debug-ignored-errors "^Exit the snippet first!$")
|
(add-to-list 'debug-ignored-errors "^Exit the snippet first!$")
|
||||||
|
|
||||||
|
|
||||||
;;; Apropos stacked expansion:
|
;;; Apropos stacked expansion:
|
||||||
;;;
|
;;;
|
||||||
;;; the parent snippet does not run its fields modification hooks
|
;;; the parent snippet does not run its fields modification hooks
|
||||||
@ -2719,7 +2720,7 @@ Returns the newly created snippet."
|
|||||||
snippet))
|
snippet))
|
||||||
|
|
||||||
|
|
||||||
;;; apropos adjacencies: Once the $-constructs bits like "$n" and
|
;;; Apropos adjacencies: Once the $-constructs bits like "$n" and
|
||||||
;;; "${:n" are deleted in the recently expanded snippet, we might
|
;;; "${:n" are deleted in the recently expanded snippet, we might
|
||||||
;;; actually have many fields, mirrors (and the snippet exit) in the
|
;;; actually have many fields, mirrors (and the snippet exit) in the
|
||||||
;;; very same position in the buffer. Therefore we need to single-link
|
;;; very same position in the buffer. Therefore we need to single-link
|
||||||
@ -2814,10 +2815,10 @@ If it does, also call `yas/advance-end-maybe' on FOM."
|
|||||||
(set-marker (yas/fom-start fom) newstart)
|
(set-marker (yas/fom-start fom) newstart)
|
||||||
(yas/advance-end-maybe fom newstart)))
|
(yas/advance-end-maybe fom newstart)))
|
||||||
|
|
||||||
|
|
||||||
(defvar yas/dollar-regions nil
|
(defvar yas/dollar-regions nil
|
||||||
"When expanding the snippet the \"parse-create\" functions add
|
"When expanding the snippet the \"parse-create\" functions add
|
||||||
cons cells to this var")
|
cons cells to this var")
|
||||||
|
|
||||||
(defun yas/snippet-parse-create (snippet)
|
(defun yas/snippet-parse-create (snippet)
|
||||||
"Parse a recently inserted snippet template, creating all
|
"Parse a recently inserted snippet template, creating all
|
||||||
necessary fields, mirrors and exit points.
|
necessary fields, mirrors and exit points.
|
||||||
@ -2834,8 +2835,8 @@ Meant to be called in a narrowed buffer, does various passes"
|
|||||||
;;
|
;;
|
||||||
(goto-char parse-start)
|
(goto-char parse-start)
|
||||||
(yas/replace-backquotes)
|
(yas/replace-backquotes)
|
||||||
;; protect escapes again since previous stepds might have
|
;; protect escapes again since previous steps might have generated
|
||||||
;; generated more characters needing escapinge
|
;; more characters needing escaping
|
||||||
;;
|
;;
|
||||||
(goto-char parse-start)
|
(goto-char parse-start)
|
||||||
(yas/protect-escapes)
|
(yas/protect-escapes)
|
||||||
@ -2904,6 +2905,9 @@ Meant to be called in a narrowed buffer, does various passes"
|
|||||||
;; This would also happen if we had used overlays with
|
;; This would also happen if we had used overlays with
|
||||||
;; the `front-advance' property set to nil.
|
;; the `front-advance' property set to nil.
|
||||||
;;
|
;;
|
||||||
|
;; This is why I have these `trouble-markers', which
|
||||||
|
;; are restored after indentation happens.
|
||||||
|
;;
|
||||||
(while (and (zerop (if indent-first-line-p
|
(while (and (zerop (if indent-first-line-p
|
||||||
(prog1
|
(prog1
|
||||||
(forward-line 0)
|
(forward-line 0)
|
||||||
@ -3170,6 +3174,7 @@ When multiple expressions are found, only the last one counts."
|
|||||||
(yas/advance-start-maybe (yas/field-next field) (point)))
|
(yas/advance-start-maybe (yas/field-next field) (point)))
|
||||||
t))))
|
t))))
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Pre- and post-command hooks
|
;; Pre- and post-command hooks
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user