[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d78181a 46/60: Remove yas--inhibit-overlay-hooks macro.
From: |
João Távora |
Subject: |
[elpa] master d78181a 46/60: Remove yas--inhibit-overlay-hooks macro. |
Date: |
Thu, 21 Jan 2016 22:36:04 +0000 |
branch: master
commit d78181a7f1fefe377cae0a646a7c24d06053a1b6
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Remove yas--inhibit-overlay-hooks macro.
* yasnippet.el (yas--inhibit-overlay-hooks): Remove.
(yas--commit-snippet, yas--make-move-field-protection-overlays):
(yas-expand-snippet, yas--mirror-update-display):
(yas--field-update-display): Replace `yas--inhibit-overlay-hooks' with
its expansion.
---
yasnippet.el | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 9e63968..7c222bb 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3151,12 +3151,6 @@ Also create some protection overlays"
(defvar yas--inhibit-overlay-hooks nil
"Bind this temporarily to non-nil to prevent running
`yas--on-*-modification'.")
-(defmacro yas--inhibit-overlay-hooks (&rest body)
- "Run BODY with `yas--inhibit-overlay-hooks' set to t."
- (declare (indent 0))
- `(let ((yas--inhibit-overlay-hooks t))
- ,@body))
-
(defvar yas-snippet-beg nil "Beginning position of the last snippet
committed.")
(defvar yas-snippet-end nil "End position of the last snippet committed.")
@@ -3176,7 +3170,7 @@ This renders the snippet as ordinary text."
(setq yas-snippet-end (overlay-end control-overlay))
(delete-overlay control-overlay))
- (yas--inhibit-overlay-hooks
+ (let ((yas--inhibit-overlay-hooks t))
(when yas--active-field-overlay
(delete-overlay yas--active-field-overlay))
(when yas--field-protection-overlays
@@ -3436,7 +3430,7 @@ Move the overlays, or create them if they do not exit."
;;
(when (< (buffer-size) end)
(save-excursion
- (yas--inhibit-overlay-hooks
+ (let ((yas--inhibit-overlay-hooks t))
(goto-char (point-max))
(newline))))
;; go on to normal overlay creation/moving
@@ -3552,7 +3546,7 @@ considered when expanding the snippet."
;; them mostly to make the undo information
;;
(setq yas--start-column (current-column))
- (yas--inhibit-overlay-hooks
+ (let ((yas--inhibit-overlay-hooks t))
(setq snippet
(if expand-env
(eval `(let* ,expand-env
@@ -4234,7 +4228,7 @@ When multiple expressions are found, only the last one
counts."
(not (string= reflection (buffer-substring-no-properties
(yas--mirror-start mirror)
(yas--mirror-end mirror)))))
(goto-char (yas--mirror-start mirror))
- (yas--inhibit-overlay-hooks
+ (let ((yas--inhibit-overlay-hooks t))
(insert reflection))
(if (> (yas--mirror-end mirror) (point))
(delete-region (point) (yas--mirror-end mirror))
@@ -4253,7 +4247,7 @@ When multiple expressions are found, only the last one
counts."
(yas--field-end field)))))
(setf (yas--field-modified-p field) t)
(goto-char (yas--field-start field))
- (yas--inhibit-overlay-hooks
+ (let ((yas--inhibit-overlay-hooks t))
(insert transformed)
(if (> (yas--field-end field) (point))
(delete-region (point) (yas--field-end field))
- [elpa] master 35642ac 33/60: Simplify string matching., (continued)
- [elpa] master 35642ac 33/60: Simplify string matching., João Távora, 2016/01/21
- [elpa] master b055f13 34/60: Fix #617; ensure point is visible before x prompt, João Távora, 2016/01/21
- [elpa] master f121645 38/60: Fix #607; avoid Emacs bug #21824, João Távora, 2016/01/21
- [elpa] master 1cf723a 41/60: Ignore trailing spaces in snippet definitions, João Távora, 2016/01/21
- [elpa] master 2100b89 42/60: Closes #632: Use `user-emacs-directory' instead of hardcoded "~/emacs.d", João Távora, 2016/01/21
- [elpa] master beb02e5 39/60: * CONTRIBUTING.md: Add note about changelog only messages., João Távora, 2016/01/21
- [elpa] master fb28ec8 37/60: * README.mdown (Use `yas-minor-mode`): Reword., João Távora, 2016/01/21
- [elpa] master 6c46878 43/60: Fix #587; set `this-command' on fallback., João Távora, 2016/01/21
- [elpa] master 23ee54e 44/60: Use destructive list functions in yas--s-a-p, João Távora, 2016/01/21
- [elpa] master 3aa7cb2 40/60: M-x delete-trailing-whitespace, João Távora, 2016/01/21
- [elpa] master d78181a 46/60: Remove yas--inhibit-overlay-hooks macro.,
João Távora <=
- [elpa] master 17fe790 51/60: Fix #515; only clear field on self-insert, João Távora, 2016/01/21
- [elpa] master 67a45a6 48/60: * README.mdown: Add link to textmate-to-yas.el., João Távora, 2016/01/21
- [elpa] master c80fbf2 49/60: Cleanup yas--on-field-overlay-modification, João Távora, 2016/01/21
- [elpa] master 444c882 47/60: * README.mdown: update melpa URL., João Távora, 2016/01/21
- [elpa] master 61261c9 53/60: Fix #576; don't override yas-prompt-functions, João Távora, 2016/01/21
- [elpa] master a2c5292 55/60: Bless Noam Postavsky as the new official maintainer, João Távora, 2016/01/21
- [elpa] master cd05da6 36/60: Activate extra and major modes first, João Távora, 2016/01/21
- [elpa] master 3cd64b7 45/60: yasnippet.el (yas--called-interactively-p): Remove., João Távora, 2016/01/21
- [elpa] master 140c415 52/60: Respect y-b-l-cond from binding triggered snippets, João Távora, 2016/01/21
- [elpa] master 71f0142 50/60: Improve test simulatulation of self-insert, João Távora, 2016/01/21