C-c C-c compiles wrong toplevel form

Reported by Tobias C. Rittweiler on 2010-11-16
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Slime
Undecided
Unassigned

Bug Description

(defvar *foo*) (declaim (type string *foo*))
(defvar *bar*) (declaim (type string *bar*))

C-c C-c with point in the first DECLAIM, the (DEFVAR *BAR*) will
be flashed.

I guess it's the famous Emacs beginning-of-defun insufficieny,
but I wanted to log this nontheless.

Daniel Uber (djuber) wrote :

Is this related to behavior I've noticed recently with docstrings and indentation affecting C-c C-c in slime buffers.

(defun foo (x)
"foo does great things"
(print x))

versus

(defun foo (x)
  "foo is an x frobulator"
  (print x))

In the first case C-c C-c at the closing paren seems to grab the region below the docstring only, which is an invalid form, while the second format works as expected. In any case, allowing tab to indent the enclosed form restores emacs sanity.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers