[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1b8f5b7 29/36: Don't use major-mode syntax-propertize-func
From: |
Noam Postavsky |
Subject: |
[elpa] master 1b8f5b7 29/36: Don't use major-mode syntax-propertize-function |
Date: |
Sat, 11 Jun 2016 19:21:11 +0000 (UTC) |
branch: master
commit 1b8f5b7a72c13d1daadc8af2ca6a27403830146d
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Don't use major-mode syntax-propertize-function
during snippet creation. The snippet creation manipulates the
syntax-table which can lead to conflicts (see also
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23443).
* yasnippet.el (yas-expand-snippet): Let-bind syntax-propertize-function
to nil and then call syntax-ppss-flush-cache afterwards.
---
yasnippet.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index ca19d24..4514f1b 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3566,14 +3566,21 @@ considered when expanding the snippet."
;; them mostly to make the undo information
;;
(setq yas--start-column (current-column))
- (let ((yas--inhibit-overlay-hooks t))
+ (let ((yas--inhibit-overlay-hooks t)
+ ;; Avoid major-mode's syntax propertizing function,
+ ;; since we mess with the syntax-table and also
+ ;; insert things that are not valid in the
+ ;; major-mode language syntax anyway.
+ (syntax-propertize-function nil))
(setq snippet
(if expand-env
(eval `(let* ,expand-env
(insert content)
(yas--snippet-create start (point))))
(insert content)
- (yas--snippet-create start (point))))))
+ (yas--snippet-create start (point)))))
+ ;; Invalidate any syntax-propertizing done while
`syntax-propertize-function' was nil
+ (syntax-ppss-flush-cache start))
;; stacked-expansion: This checks for stacked expansion, save the
;; `yas--previous-active-field' and advance its boundary.
- [elpa] master 78fe979 22/36: Support htmlize.el in Rakefile doc target, (continued)
- [elpa] master 78fe979 22/36: Support htmlize.el in Rakefile doc target, Noam Postavsky, 2016/06/11
- [elpa] master 7f03a23 07/36: Change Emacs installation method for Travis CI, Noam Postavsky, 2016/06/11
- [elpa] master 0d79e69 30/36: Extra measures to prevent premature yas-minor-mode, Noam Postavsky, 2016/06/11
- [elpa] master 497867c 32/36: Rename yas-backport-obsolete-alias, Noam Postavsky, 2016/06/11
- [elpa] master e23a053 34/36: Avoid bug in insert-file-contents with REPLACE=t, Noam Postavsky, 2016/06/11
- [elpa] master 567ada0 06/36: Decide field clearing based on command's effect, Noam Postavsky, 2016/06/11
- [elpa] master bdfab67 24/36: Make yasnippet less chatty, Noam Postavsky, 2016/06/11
- [elpa] master bbfa1f0 31/36: Add yas-backport-obsolete-alias option, Noam Postavsky, 2016/06/11
- [elpa] master bfe14f1 10/36: Test and fix problem with mirror+autofill, Noam Postavsky, 2016/06/11
- [elpa] master df229b9 23/36: Fix some doc formatting, Noam Postavsky, 2016/06/11
- [elpa] master 1b8f5b7 29/36: Don't use major-mode syntax-propertize-function,
Noam Postavsky <=
- [elpa] master 47dbe93 33/36: Fix broken links in README.mdown, Noam Postavsky, 2016/06/11
- [elpa] master dc3e4ca 35/36: Release 0.10.0, Noam Postavsky, 2016/06/11
- [elpa] master ccc9adc 16/36: Add register option for yas-wrap-around-region, Noam Postavsky, 2016/06/11
- [elpa] master eca2f99 15/36: Indent multi-line output from mirrors, Noam Postavsky, 2016/06/11
- [elpa] master 438f5db 36/36: packages/yasnippet: pull from external (0.10.0), Noam Postavsky, 2016/06/11