[slime-devel] propose changes to `slime-marcoexpand-again' with patch

MON KEY monkey at sandpframing.com
Mon May 9 20:14:16 UTC 2011


On Mon, May 9, 2011 at 3:48 PM, MON KEY <monkey at sandpframing.com> wrote:
> Apropos the bug report here:
>  https://bugs.launchpad.net/slime/+bug/777405

Apologies, there is a bug in `slime-initialize-macroexpansion-buffer'
in previous messages forwarded patch.

This:
 (font-lock-fontify-region (point-now) (point))

Should have been:
(font-lock-fontify-region point-now (point))

Following is the modified function in full:

(defun slime-initialize-macroexpansion-buffer (expansion &optional buffer)
  (let ((expansion-buffer
         (or (and buffer (get-buffer-create buffer))
             (slime-create-macroexpansion-buffer))))
    (with-current-buffer expansion-buffer
      (pop-to-buffer (current-buffer))
      (let ((inhibit-read-only t))
        (if (eq (current-buffer) (get-buffer (slime-buffer-name
:macroexpansion)))
            (progn
              ;; Get rid of undo information from previous expansions.
              (setq buffer-undo-list nil)
              (erase-buffer)
              (let ((buffer-undo-list t)) ; Make the initial insertion
not be undoable.
                (insert expansion)
                (font-lock-fontify-buffer)))
          (let ((point-now (point)))
            (save-excursion
              (insert expansion)
              (font-lock-fontify-region point-now (point)))))))))




More information about the slime-devel mailing list