[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b0e729b 58/63: Optionally add undo list to debug info
From: |
Noam Postavsky |
Subject: |
[elpa] master b0e729b 58/63: Optionally add undo list to debug info |
Date: |
Mon, 17 Jul 2017 22:54:22 -0400 (EDT) |
branch: master
commit b0e729b1decbef605e59dc906897c9c84affbdfe
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Optionally add undo list to debug info
* yasnippet-debug.el (yas-debug-undo): New variable.
(yas-toggle-debug-undo): New command.
(yas-debug-snippets): Print undo list if `yas-debug-undo' is non-nil.
---
yasnippet-debug.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/yasnippet-debug.el b/yasnippet-debug.el
index 65b773f..f198219 100644
--- a/yasnippet-debug.el
+++ b/yasnippet-debug.el
@@ -192,6 +192,12 @@
(defvar yas-debug-target-buffer nil)
(defvar-local yas-debug-target-snippets nil)
+(defvar yas-debug-undo nil)
+
+(defun yas-toggle-debug-undo (value)
+ (interactive (list (not yas-debug-undo)))
+ (setq yas-debug-undo value)
+ (yas--message 3 "debug undo %sabled" (if yas-debug-undo "en" "dis")))
(defadvice yas--snippet-parse-create (before yas-debug-target-snippet
(snippet))
(add-to-list 'yas-debug-target-snippets snippet))
@@ -223,7 +229,11 @@
(unless (memq loc yas-debug-recently-live-indicators)
(delete-overlay (cdr color-ov))
(remhash loc yas-debug-live-indicators)))
- yas-debug-live-indicators)))
+ yas-debug-live-indicators))
+ (when (and yas-debug-undo (listp buffer-undo-list))
+ (printf "Undo list has %s elements:\n" (length buffer-undo-list))
+ (cl-loop for undo-elem in buffer-undo-list
+ do (printf "%S\n" undo-elem))))
(when hook
(setq yas-debug-target-buffer (current-buffer))
(ad-enable-advice 'yas--snippet-parse-create 'before
'yas-debug-target-snippet)
- [elpa] master 0f6d82f 46/63: * .travis.yml: Use Emacs 25.2, (continued)
- [elpa] master 0f6d82f 46/63: * .travis.yml: Use Emacs 25.2, Noam Postavsky, 2017/07/17
- [elpa] master 6102ff5 50/63: Handle undo of snippet 1st line indent properly, Noam Postavsky, 2017/07/17
- [elpa] master ac26024 20/63: Rework error handling, Noam Postavsky, 2017/07/17
- [elpa] master c3a9447 43/63: Fix condition timestamps in key filter functions, Noam Postavsky, 2017/07/17
- [elpa] master 82818e5 48/63: Don't delete snippets more than once., Noam Postavsky, 2017/07/17
- [elpa] master 63f44b4 33/63: Ensure inhibit-modification-hooks is nil while modifying buffer, Noam Postavsky, 2017/07/17
- [elpa] master 0041efe 17/63: Make snippets work in org source blocks, Noam Postavsky, 2017/07/17
- [elpa] master 47f37f7 42/63: Fix ${0:soon-to-be-deleted} with no other fields, Noam Postavsky, 2017/07/17
- [elpa] master e8ed276 52/63: Make sure tests don't rely on running order, Noam Postavsky, 2017/07/17
- [elpa] master 2a3a0cd 61/63: Update CONTRIBUTING.md information, Noam Postavsky, 2017/07/17
- [elpa] master b0e729b 58/63: Optionally add undo list to debug info,
Noam Postavsky <=
- [elpa] master 274406e 55/63: Provide command line interface from yasnippet-debug.el, Noam Postavsky, 2017/07/17
- [elpa] master 6e9b7f9 30/63: Fix running hook variable set as buffer-local, Noam Postavsky, 2017/07/17
- [elpa] master 7f337f4 32/63: Fix nested snippet expansion, Noam Postavsky, 2017/07/17
- [elpa] master 1bf7a4c 47/63: Fix field parsing in modes that use the `syntax-table' property, Noam Postavsky, 2017/07/17
- [elpa] master 8797a31 45/63: * doc/snippet-expansion.org: Complete sentence fragment., Noam Postavsky, 2017/07/17
- [elpa] master c87afe0 26/63: Merge: snippet-local exit hook; error handling improvements, Noam Postavsky, 2017/07/17
- [elpa] master 1043b6c 49/63: Restore syntax-propertize-function before indenting mirrors, Noam Postavsky, 2017/07/17
- [elpa] master 65952e3 53/63: Allow customizing overlay priority, Noam Postavsky, 2017/07/17
- [elpa] master 1a860bd 51/63: Fix undo information recording for multiline snippets, Noam Postavsky, 2017/07/17
- [elpa] master 22eeb1e 36/63: Fix interaction with c auto-fill, Noam Postavsky, 2017/07/17