[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master af90528 56/60: Fix debugging code for newer Emacsen
From: |
João Távora |
Subject: |
[elpa] master af90528 56/60: Fix debugging code for newer Emacsen |
Date: |
Thu, 21 Jan 2016 22:36:08 +0000 |
branch: master
commit af905283bd0a89671a6b74881461f3ddcf2f35bc
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix debugging code for newer Emacsen
* yasnippet-debug.el (yas-debug-snippet-vars): Check for length of
`buffer-undo-list'. Don't assume all fields have integer
`yas--field-number'.
---
yasnippet-debug.el | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/yasnippet-debug.el b/yasnippet-debug.el
index fe8816c..c5dd06a 100644
--- a/yasnippet-debug.el
+++ b/yasnippet-debug.el
@@ -45,7 +45,7 @@
(yas--snippet-id snippet)
(overlay-start (yas--snippet-control-overlay snippet))
(overlay-end (yas--snippet-control-overlay snippet))))
- (princ (format "\tactive field: %d from %s to %s covering \"%s\"\n"
+ (princ (format "\tactive field: %s from %s to %s covering \"%s\"\n"
(yas--field-number (yas--snippet-active-field snippet))
(marker-position (yas--field-start
(yas--snippet-active-field snippet)))
(marker-position (yas--field-end
(yas--snippet-active-field snippet)))
@@ -55,7 +55,7 @@
(yas--exit-marker (yas--snippet-exit snippet))
(yas--exit-next (yas--snippet-exit snippet)))))
(dolist (field (yas--snippet-fields snippet))
- (princ (format "\tfield: %d from %s to %s covering \"%s\" next: %s%s\n"
+ (princ (format "\tfield: %s from %s to %s covering \"%s\" next: %s%s\n"
(yas--field-number field)
(marker-position (yas--field-start field))
(marker-position (yas--field-end field))
@@ -76,14 +76,15 @@
(point-max)))
(unless (eq buffer-undo-list t)
(princ (format "Undpolist has %s elements. First 10 elements follow:\n"
(length buffer-undo-list)))
- (let ((first-ten (subseq buffer-undo-list 0 19)))
+ (let ((first-ten (subseq buffer-undo-list 0 (min 19
+ (length
buffer-undo-list)))))
(dolist (undo-elem first-ten)
(princ (format "%2s: %s\n" (position undo-elem first-ten)
(truncate-string-to-width (format "%s" undo-elem) 70))))))))
(defun yas--debug-format-fom-concise (fom)
(when fom
(cond ((yas--field-p fom)
- (format "field %d from %d to %d"
+ (format "field %s from %d to %d"
(yas--field-number fom)
(marker-position (yas--field-start fom))
(marker-position (yas--field-end fom))))
- [elpa] master 67a45a6 48/60: * README.mdown: Add link to textmate-to-yas.el., (continued)
- [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
- [elpa] master e6fff09 54/60: Don't choose ido prompting based on Emacs version, João Távora, 2016/01/21
- [elpa] master af90528 56/60: Fix debugging code for newer Emacsen,
João Távora <=
- [elpa] master 100d8d1 57/60: Fix bug reporting examples., João Távora, 2016/01/21
- [elpa] master 46256db 58/60: Fix #648; create ~/.emacs.d/snippets automatically, João Távora, 2016/01/21
- [elpa] master 1a98c38 59/60: Fix silly mistake in previous commit, João Távora, 2016/01/21
- [elpa] master 5817fe1 60/60: Update packages/yasnippet by subtree-merging from its external upstream, João Távora, 2016/01/21