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

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

Re: [Bug] in newcomment.el


From: Andreas Röhler
Subject: Re: [Bug] in newcomment.el
Date: Tue, 18 Jun 2013 19:31:45 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

Am 18.06.2013 19:08, schrieb Thorsten Jolitz:

Hi List,

newcomment.el uses (line 477)

,------------------------------------
| (if (looking-at comment-start-skip)
`------------------------------------

in function

,--------------------------------------------------------
| (defun comment-search-forward (limit &optional noerror)
`--------------------------------------------------------

what gives an error if `comment-start-skip' is nil, as in sql-mode.

E.g. this small file (sql-test.sql) in a buffer in sql-mode

,----------------------
| -- * data load
| -- ** data for table1
| drop table1;
`----------------------

with point at (point-min), causes an error when this command is applied:

,----------------------------------
| M-: (comment-search-forward 15 t)
`----------------------------------

,----------------------------------------------------------------
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   looking-at(nil)
|   comment-search-forward(15 t)
|   eval((comment-search-forward 15 t) nil)
|   eval-expression((comment-search-forward 15 t) nil)
|   call-interactively(eval-expression nil nil)
`----------------------------------------------------------------

because 'C-h v comment-start-skip' gives

,-------------------------------------------------------------
| comment-start-skip is a variable defined in `newcomment.el'.
| Its value is nil
`-------------------------------------------------------------


Looking forward for a bug-report too. `comment-start' should do a better job at 
this place.

Andreas



reply via email to

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