C-c C-c compiles wrong toplevel form

Bug #676126 reported by Tobias C. Rittweiler
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Slime
New
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.