[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6a3619b 23/42: Fix additional corner case with org source
From: |
Noam Postavsky |
Subject: |
[elpa] master 6a3619b 23/42: Fix additional corner case with org source block integration |
Date: |
Sun, 22 Dec 2019 17:38:00 -0500 (EST) |
branch: master
commit 6a3619b4f2e7c4e591cbfbc60c8bcb05447fe291
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix additional corner case with org source block integration
* yasnippet.el (yas--on-buffer-kill): Check if the org-marker still points
to a buffer.
---
yasnippet.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 656fd2c..dbb9b4d 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3519,17 +3519,21 @@ This renders the snippet as ordinary text."
;; Org mode uses temp buffers for fontification and "native tab",
;; move all the snippets to the original org-mode buffer when it's
;; killed.
- (let ((org-marker nil))
+ (let ((org-marker nil)
+ (org-buffer nil))
(when (and yas-minor-mode
(or (bound-and-true-p org-edit-src-from-org-mode)
(bound-and-true-p org-src--from-org-mode))
(markerp
(setq org-marker
(or (bound-and-true-p org-edit-src-beg-marker)
- (bound-and-true-p org-src--beg-marker)))))
+ (bound-and-true-p org-src--beg-marker))))
+ ;; If the org source buffer is killed before the temp
+ ;; fontification one, org-marker might point nowhere.
+ (setq org-buffer (marker-buffer org-marker)))
(yas--prepare-snippets-for-move
(point-min) (point-max)
- (marker-buffer org-marker) org-marker))))
+ org-buffer org-marker))))
(add-hook 'kill-buffer-hook #'yas--on-buffer-kill)
- [elpa] master bceb65b 16/42: Make backspace/DEL clear field (#957), (continued)
- [elpa] master bceb65b 16/42: Make backspace/DEL clear field (#957), Noam Postavsky, 2019/12/22
- [elpa] master 3c0be40 11/42: Update FAQ, Noam Postavsky, 2019/12/22
- [elpa] master 8b25d62 20/42: * doc/snippet-development.org: Fix typos., Noam Postavsky, 2019/12/22
- [elpa] master 7612bc1 24/42: Don't check this-command in yas-not-string-or-comment-condition, Noam Postavsky, 2019/12/22
- [elpa] master dabc719 21/42: Don't turn on yas-minor-mode in temp buffers, Noam Postavsky, 2019/12/22
- [elpa] master fc33b2f 28/42: Make overlay-modification protection optional, Noam Postavsky, 2019/12/22
- [elpa] master 048d030 22/42: Fix line-relative snapshotting for org src blocks, Noam Postavsky, 2019/12/22
- [elpa] master bae20af 27/42: ; * doc/faq.org: Linkify bug reference., Noam Postavsky, 2019/12/22
- [elpa] master ffc733d 09/42: ; Debug code fixes, Noam Postavsky, 2019/12/22
- [elpa] master 1d96da2 18/42: Don't call before/after change-functions twice, Noam Postavsky, 2019/12/22
- [elpa] master 6a3619b 23/42: Fix additional corner case with org source block integration,
Noam Postavsky <=
- [elpa] master 9cedd59 25/42: Allow disabling snippet keybindings from hook, Noam Postavsky, 2019/12/22
- [elpa] master 55c448b 32/42: Remove redundant arg to yas-expand-snippet, Noam Postavsky, 2019/12/22
- [elpa] master 189f737 26/42: * doc/faq.org: Note that Flyspell problem is (now fixed) Emacs bug., Noam Postavsky, 2019/12/22
- [elpa] master ffce236 30/42: Do auto indentation only in post command hook, Noam Postavsky, 2019/12/22
- [elpa] master 760f77a 12/42: Test for mirroring more than one field, Noam Postavsky, 2019/12/22
- [elpa] master 0f05a75 14/42: Add yas-completing-read, Noam Postavsky, 2019/12/22
- [elpa] master 03aa561 19/42: * doc/snippet-organization.org: Fix typo., Noam Postavsky, 2019/12/22
- [elpa] master 9f51cf2 17/42: Register snippet movement comments for eldoc, Noam Postavsky, 2019/12/22
- [elpa] master 6a738b5 29/42: ; doc/faq.org: Fix example keybinding code., Noam Postavsky, 2019/12/22
- [elpa] master 476bc77 35/42: Fix snippet undo, Noam Postavsky, 2019/12/22