bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tcl-indent-for-comment broken in Emacs 21


From: Stefan Monnier
Subject: Re: tcl-indent-for-comment broken in Emacs 21
Date: 20 Nov 2001 21:09:42 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

>>>>> "Geert" == Geert Kloosterman <geertk@ai.rug.nl> writes:
> Emacs 21 seems to have a new tcl mode: tcl.el instead of tcl-mode.el.
> I didn't see this mentioned in the NEWS file...

Indeed, it seems to be missing.

> Here's the real problem: When I use tcl-indent-for-comment (M-;) on an
> empty line I get the following error message:

>     Wrong type argument: number-or-marker-p, nil

> I expected it to insert "#" or ";#" at `comment-column'.  
> I tested this with '-q --no-site-file'.

Thanks for report.  I've appended the fix.
I've committed the fix on the RC branch but not on the trunk because
the code on the trunk already fixed it by eliminating this code.


        Stefan


--- tcl.el.~1.64.~      Wed Aug 22 11:05:00 2001
+++ tcl.el      Tue Nov 20 21:02:42 2001
@@ -1877,7 +1877,7 @@
                (backward-char))))))
   ;; Point is just after the "#" starting a comment.  Move it as
   ;; appropriate.
-  (let* ((indent (funcall comment-indent-function))
+  (let* ((indent (or (funcall comment-indent-function) comment-column))
         (begpos (progn
                   (backward-char)
                   (point))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]