emacs-devel
[Top][All Lists]
Advanced

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

Re: comment-enter-backward: Wrong type argument: number-or-marker-p, nil


From: Stefan Monnier
Subject: Re: comment-enter-backward: Wrong type argument: number-or-marker-p, nil
Date: Thu, 03 Apr 2008 18:27:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> 1. emacs -Q
> 2. C-x C-f test.c
> 3. Type this with no following newline: // test
> 4. C-SPC C-SPC C-a M-;
> => The line gets uncomments but Emacs throws an error
> "comment-enter-backward: Wrong type argument: number-or-marker-p, nil"

> Note that if the line typed at step 3 is this: /* test */ (also with no
> following newline), then after step 4 there is no error.

> AFAICT, the reason is as follows.  Since there is no comment-end,
> re-search-forward in comment-enter-backward returns nil, so the second
> clause of the cond gets evaluated.  But since in the first clause, point
> moved to point-min, (car (syntax-after (- (point) 1))) evaluates to nil,
> which is a wrong type argument for logand.  So point should be restored:

Thank you, I've installed it,
And sorry about the delay,


        Stefan




reply via email to

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