[slime-devel] removing overlays from the beginning of a buffer

Nick Levine ndl at ravenbrook.com
Thu Aug 27 12:07:03 UTC 2009


If a source buffer starts with an annotated form then
slime-remove-notes won't find it. Easily fixed (but there may be a
better way - I'm not that familiar with the source).

- nick


(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))
            (when (setq o (slime-note-at-point))
              (delete-overlay o))
            (while (setq o (slime-find-next-note))
              (delete-overlay o))))))))




More information about the slime-devel mailing list