[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Mon Aug 31 17:08:09 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv26524
Modified Files:
ChangeLog slime.el
Log Message:
Keep note overlays in a global variable.
That's simpler and cheaper than scanning all buffers.
* slime.el (slime-note-overlays): New variable.
(slime-make-note-overlay, slime-remove-old-overlays): Use it.
--- /project/slime/cvsroot/slime/ChangeLog 2009/08/27 20:19:26 1.1845
+++ /project/slime/cvsroot/slime/ChangeLog 2009/08/31 17:08:09 1.1846
@@ -1,3 +1,11 @@
+2009-08-31 Helmut Eller <heller at common-lisp.net>
+
+ Keep note overlays in a global variable.
+ That's simpler and cheaper than scanning all buffers.
+
+ * slime.el (slime-note-overlays): New variable.
+ (slime-make-note-overlay, slime-remove-old-overlays): Use it.
+
2009-08-27 Stas Boukarev <stassats at gmail.com>
* slime.el (slime-remove-old-overlays): delete notes at the very beginning
--- /project/slime/cvsroot/slime/slime.el 2009/08/27 21:57:48 1.1217
+++ /project/slime/cvsroot/slime/slime.el 2009/08/31 17:08:09 1.1218
@@ -2809,19 +2809,13 @@
(slime-remove-old-overlays)
(mapc #'slime-overlay-note (slime-merge-notes-for-display notes))))))
+(defvar slime-note-overlays '()
+ "List of overlays created by `slime-make-note-overlay'")
+
(defun slime-remove-old-overlays ()
- "Delete the existing Slime overlays in the current buffer."
- (dolist (buffer (slime-filter-buffers (lambda () slime-mode)))
- (with-current-buffer buffer
- (save-excursion
- (save-restriction
- (widen) ; remove overlays within the whole buffer.
- (goto-char (point-min))
- (let ((o (slime-note-at-point)))
- (when o
- (delete-overlay o))
- (while (setq o (slime-find-next-note))
- (delete-overlay o))))))))
+ "Delete the existing note overlays."
+ (mapc #'delete-overlay slime-note-overlays)
+ (setq slime-note-overlays '()))
(defun slime-filter-buffers (predicate)
"Return a list of where PREDICATE returns true.
@@ -3124,6 +3118,7 @@
(defun slime-make-note-overlay (note start end)
(let ((overlay (make-overlay start end)))
(overlay-put overlay 'slime-note note)
+ (push overlay slime-note-overlays)
overlay))
(defun slime-create-note-overlay (note start end severity message)
More information about the slime-cvs
mailing list