From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: comment-enter-backward: Wrong type argument: number-or-marker-p, nil Date: Thu, 03 Apr 2008 18:27:01 -0400 Message-ID: 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 1207261722 31923 80.91.229.12 (3 Apr 2008 22:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2008 22:28:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 04 00:29:14 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 1JhXvd-0008JR-Kf for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 00:29:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhXv1-00072O-4t for ged-emacs-devel@m.gmane.org; Thu, 03 Apr 2008 18:28:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhXuf-0006uT-Ue for emacs-devel@gnu.org; Thu, 03 Apr 2008 18:28:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhXue-0006tC-2i for emacs-devel@gnu.org; Thu, 03 Apr 2008 18:28:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhXud-0006t4-NF for emacs-devel@gnu.org; Thu, 03 Apr 2008 18:28:03 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JhXud-0003Qw-DF for emacs-devel@gnu.org; Thu, 03 Apr 2008 18:28:03 -0400 Original-Received: from ceviche.home (vpn-132-204-232-61.acd.umontreal.ca [132.204.232.61]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m33MS1OM012058 for ; Thu, 3 Apr 2008 18:28:02 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id A47CCB40FA; Thu, 3 Apr 2008 18:27:01 -0400 (EDT) In-Reply-To: <87d4qqed5q.fsf@escher.local.home> (Stephen Berman's message of "Thu, 21 Feb 2008 12:56:17 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 0 Rules triggered X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:94292 Archived-At: > 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