Subject: bug#11944: 24.1.50; newcomment needs comment-normalize-vars in more functions

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 17 Aug 2019 14:50:03 -0700

Reuben Thomas <[email-masked]> writes:

> When adding a word to a per-buffer dictionary in an AuCTeX buffer, I get
> an error caused by the fact that AuCTeX sets comment-padding to 1, then
> calls comment-padright, which assumes comment-padding is a string.
>
> A similar bug report is here:
>
> http://lists.gnu.org/archive/html/bug-auctex/2011-12/msg00000.html
>
> Making comment-padright call comment-normalize-vars fixes this problem;
> presumably at least comment-padleft and perhaps other functions need the
> same treatment.
>
> (As far as I can see, setting comment-padding to an integer is still
> allowed, as per its docstring.)

(I'm going through old bug reports that have unfortunately gotten no
responses yet.)

The doc in newcomment.el specifies that any command that calls the
newcomment functions should call `comment-normalize-vars' first, so I
don't think this is a bug in newcomment.el.  (All the commands in that
file do this.)

So this sounds like a bug in AuCTeX.  Are you still seeing this bug, and
if so, do you have a backtrace that'll show where AuCTeX is bugging out?
The referenced URL is just somebody calling `commend-padright' directly,
which isn't allowed.

(I'll add that to the doc string of that function.)

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