branch: master
commit ffc733d4cfe60eccb7fc17debb17ca8265a186ef
Author: Noam Postavsky <[email protected]>
Commit: Noam Postavsky <[email protected]>
; Debug code fixes
* yasnippet-debug.el (yas-debug-live-range): Consider an overlay as
live, not dead even though it has integer bounds.
(yas-debug-with-tracebuf): Add debug declaration.
---
yasnippet-debug.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/yasnippet-debug.el b/yasnippet-debug.el
index abce89c..38d7a3a 100644
--- a/yasnippet-debug.el
+++ b/yasnippet-debug.el
@@ -141,7 +141,9 @@
(decorator-end (overlay-get ov 'after-string))
(beg (yas-debug-ov-fom-start range))
(end (yas-debug-ov-fom-end range)))
- (if (and beg end (not (integerp beg)) (not (integerp end)))
+ (if (and beg end (or (overlayp range)
+ (and (not (integerp beg))
+ (not (integerp end)))))
(propertize (format "from %d to %d" (+ beg) (+ end))
'cursor-sensor-functions
`(,(lambda (_window _oldpos dir)
@@ -155,7 +157,7 @@
"<dead>")))
(defmacro yas-debug-with-tracebuf (outbuf &rest body)
- (declare (indent 1))
+ (declare (indent 1) (debug (sexp body)))
(let ((tracebuf-var (make-symbol "tracebuf")))
`(let ((,tracebuf-var (or ,outbuf (get-buffer-create "*YASnippet
trace*"))))
(unless (eq ,tracebuf-var (current-buffer))