Subject: bug#7974: lisp-do-defun on defuns with trailing comments

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 03 Oct 2019 18:08:14 +0200

Ken Olum <[email-masked]> 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