GNU bug report logs - #7974
lisp-do-defun on defuns with trailing comments

Previous Next

Package: emacs;

Reported by: Ken Olum <kdo <at> cosmos.phy.tufts.edu>

Date: Thu, 3 Feb 2011 16:44:02 UTC

Severity: normal

Tags: easy, fixed

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7974 in the body.
You can then email your comments to 7974 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7974; Package emacs. (Thu, 03 Feb 2011 16:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Olum <kdo <at> cosmos.phy.tufts.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 03 Feb 2011 16:44:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
To: bug-gnu-emacs <at> gnu.org
Cc: kdo <at> cosmos.phy.tufts.edu
Subject: lisp-do-defun on defuns with trailing comments
Date: Thu, 03 Feb 2011 11:39:11 -0500
If you say lisp-compile-defun on a defun which has a comment on the
line with the final closing parenthesis, then your defun does not get
compiled, because emacs sends lisp a form with some close parens added
at the end of the comment, and naturally lisp does not read them.

One cure for this would be to remove the line

(skip-chars-backward " \t\n\r\f") ;  Makes allegro happy

from lisp-do-defun.  Then emacs would keep the new line
that terminates the comment at the end of the defun and put the
close parens after that.

                                        Ken




Added tag(s) easy. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Mon, 12 Jun 2017 00:18:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7974; Package emacs. (Thu, 03 Oct 2019 16:09:02 GMT) Full text and rfc822 format available.

Message #10 received at 7974 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ken Olum <kdo <at> cosmos.phy.tufts.edu>
Cc: 7974 <at> debbugs.gnu.org
Subject: Re: bug#7974: lisp-do-defun on defuns with trailing comments
Date: Thu, 03 Oct 2019 18:08:14 +0200
Ken Olum <kdo <at> cosmos.phy.tufts.edu> writes:

> If you say lisp-compile-defun on a defun which has a comment on the
> line with the final closing parenthesis, then your defun does not get
> compiled, because emacs sends lisp a form with some close parens added
> at the end of the comment, and naturally lisp does not read them.
>
> One cure for this would be to remove the line
>
> (skip-chars-backward " \t\n\r\f") ;  Makes allegro happy
>
> from lisp-do-defun.  Then emacs would keep the new line
> that terminates the comment at the end of the defun and put the
> close parens after that.

But I guess that fix is there for a reason (that Allegro doesn't like
trailing white space), so I've fixed this in Emacs 27 in a different
manner that keeps the trailing comments out of the region altogether.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 03 Oct 2019 16:09:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 7974 <at> debbugs.gnu.org and Ken Olum <kdo <at> cosmos.phy.tufts.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 03 Oct 2019 16:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 01 Nov 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.