From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#1406: backward-up-list reports scan error incorrectly? Date: Sat, 22 Nov 2008 12:36:45 +0000 Message-ID: <20081122123644.GA3330@muc.de> References: <20081121231944.GB2089@muc.de> <5F3AB054-C158-4518-9C93-6938EB2D123D@xahlee.org> Reply-To: Alan Mackenzie , 1406@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227357051 3955 80.91.229.12 (22 Nov 2008 12:30:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 12:30:51 +0000 (UTC) Cc: 1406@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: xah lee Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 13:31:55 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L3reU-0004Fr-Mc for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 13:31:54 +0100 Original-Received: from localhost ([127.0.0.1]:33907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3rdL-0003X7-Ls for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 07:30:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3rcw-0003Oj-5v for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:30:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3rcu-0003OD-Sz for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:30:17 -0500 Original-Received: from [199.232.76.173] (port=60020 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3rcu-0003O6-Mc for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:30:16 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34027) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3rcu-0003aX-5D for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:30:16 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAMCUAmP025041; Sat, 22 Nov 2008 04:30:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAMCU2Wj024382; Sat, 22 Nov 2008 04:30:02 -0800 X-Loop: don@donarmstrong.com Resent-From: Alan Mackenzie Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 22 Nov 2008 12:30:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1406 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122735664523112 (code B ref -1); Sat, 22 Nov 2008 12:30:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 22 Nov 2008 12:24:05 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAMCO21N023105 for ; Sat, 22 Nov 2008 04:24:03 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3rWr-0000iE-Is for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:24:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3rWp-0000gk-Qn for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:24:00 -0500 Original-Received: from [199.232.76.173] (port=58209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3rWp-0000gY-Im for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:23:59 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:4465 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3rWp-0003Et-3k for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 07:23:59 -0500 Original-Received: (qmail 4001 invoked by uid 3782); 22 Nov 2008 12:23:54 -0000 Original-Received: from acm.muc.de (pD9E532CC.dip.t-dialin.net [217.229.50.204]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 22 Nov 2008 13:23:52 +0100 Original-Received: (qmail 4255 invoked by uid 1000); 22 Nov 2008 12:36:45 -0000 Content-Disposition: inline In-Reply-To: <5F3AB054-C158-4518-9C93-6938EB2D123D@xahlee.org> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 22 Nov 2008 07:30:17 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22583 Archived-At: Hi, Xah! On Fri, Nov 21, 2008 at 03:26:03PM -0800, xah lee wrote: > Hi Alan, > it works if you switch to text mode though. > It doesn't work while in emacs-lisp-mode and fundamental mode. > In any case, normally it works when inside string too. Just not in > this particular case. OK, I think half of the problem here is your prolixity, the other half is my prolixity. :-) Try instead the following example: (defun foo (arg) "foo does nothing." (interactive "P")) Put point inside "P", and do C-M-u `backward-up-list'. You get the error. Now modify the above function by inserting an open paren into the doc string, (defun foo (arg) "foo does nothing. (" (interactive "P")) , and do the same again. It finds that paren. Why? Because backward-up-list assumes its starting point is NOT in a string. It jumps backwards over (what it thinks is) the string "\n(interactive " , and then finds the ?\(. This is exactly what is happening in your somewhat larger example. In text mode, presumably the syntax table doesn't define ?\" as a string quote. In fundamental mode, presumably it does. "(syntax-after (point))" is your friend here. > Xah -- Alan Mackenzie (Nuremberg, Germany).