From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Stephen Berman <Stephen.Berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: comment-enter-backward: Wrong type argument: number-or-marker-p, nil
Date: Thu, 03 Apr 2008 18:27:01 -0400 [thread overview]
Message-ID: <jwvprt61so2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d4qqed5q.fsf@escher.local.home> (Stephen Berman's message of "Thu, 21 Feb 2008 12:56:17 +0100")
> 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
next prev parent reply other threads:[~2008-04-03 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 11:56 comment-enter-backward: Wrong type argument: number-or-marker-p, nil Stephen Berman
2008-04-03 22:27 ` Stefan Monnier [this message]
2008-04-04 10:19 ` Stephen Berman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvprt61so2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Stephen.Berman@gmx.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).