From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: comment-enter-backward: Wrong type argument: number-or-marker-p, nil Date: Fri, 04 Apr 2008 12:19:16 +0200 Message-ID: <87bq4pylaz.fsf@escher.local.home> References: <87d4qqed5q.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207304409 16378 80.91.229.12 (4 Apr 2008 10:20:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2008 10:20:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 04 12:20:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jhj2F-0003DQ-GC for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 12:20:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jhj1c-0000TP-KA for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 06:20:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jhj1I-0000Fm-VV for emacs-devel@gnu.org; Fri, 04 Apr 2008 06:19:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jhj1G-0000ES-Co for emacs-devel@gnu.org; Fri, 04 Apr 2008 06:19:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jhj1F-0000E1-PZ for emacs-devel@gnu.org; Fri, 04 Apr 2008 06:19:37 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jhj1F-0002gg-FI for emacs-devel@gnu.org; Fri, 04 Apr 2008 06:19:37 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jhj18-0002Ci-0w for emacs-devel@gnu.org; Fri, 04 Apr 2008 10:19:30 +0000 Original-Received: from i5387e161.versanet.de ([83.135.225.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Apr 2008 10:19:30 +0000 Original-Received: from Stephen.Berman by i5387e161.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Apr 2008 10:19:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: i5387e161.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94317 Archived-At: On Thu, 03 Apr 2008 18:27:01 -0400 Stefan Monnier wrote: >> 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 Thanks! Steve Berman