From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xah lee Newsgroups: gmane.emacs.bugs Subject: bug#1406: backward-up-list reports scan error incorrectly? Date: Sat, 22 Nov 2008 04:53:57 -0800 Message-ID: <12CBE034-485F-49CE-9EF6-2C33A51AF0C1@xahlee.org> References: <20081121231944.GB2089@muc.de> <5F3AB054-C158-4518-9C93-6938EB2D123D@xahlee.org> <20081122123644.GA3330@muc.de> Reply-To: xah lee , 1406@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1227360125 11544 80.91.229.12 (22 Nov 2008 13:22:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 13:22:05 +0000 (UTC) Cc: 1406@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 14:23:06 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 1L3sRy-0000ws-LG for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 14:23:03 +0100 Original-Received: from localhost ([127.0.0.1]:45257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3sQp-0000Y5-C7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 08:21:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3sFb-000354-21 for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3sFZ-00034M-Tk for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:13 -0500 Original-Received: from [199.232.76.173] (port=50241 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3sFZ-00033y-9n for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:13 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44746) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3sFY-0005uk-PQ for bug-gnu-emacs@gnu.org; Sat, 22 Nov 2008 08:10:13 -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 mAMDAACG003114; Sat, 22 Nov 2008 05:10:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAMD049H031814; Sat, 22 Nov 2008 05:00:04 -0800 X-Loop: don@donarmstrong.com Resent-From: xah lee Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 22 Nov 2008 13:00:04 +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 1406-submit@emacsbugs.donarmstrong.com id=B1406.122735841530431 (code B ref 1406); Sat, 22 Nov 2008 13:00:04 +0000 Original-Received: (at 1406) by emacsbugs.donarmstrong.com; 22 Nov 2008 12:53:35 +0000 Original-Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAMCrWch030422 for <1406@emacsbugs.donarmstrong.com>; Sat, 22 Nov 2008 04:53:33 -0800 Original-Received: from [192.168.1.5] (c-24-6-185-159.hsd1.ca.comcast.net [24.6.185.159]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1L3rzK0BjG-0001AH; Sat, 22 Nov 2008 07:53:30 -0500 In-Reply-To: <20081122123644.GA3330@muc.de> X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX1+OM1JZsi1s3E9iZqlfjl062158Ji/7ioj8uMn hB50uFxqiBm7DhesI8kDnWNuy3Ytp65GC+UIis03d2oB0pWLow 9W5GV+NHmwabIcHl1yLPg== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 22 Nov 2008 08:10:13 -0500 X-Mailman-Approved-At: Sat, 22 Nov 2008 08:21:13 -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:22584 Archived-At: hi Alan, > (defun foo (arg) > "foo does nothing." > (interactive "P")) > > Put point inside "P", and do C-M-u `backward-up-list'. You get the > error. i couldn't duplicate this. It seems to work for me. am using GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) =20 of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp i tried aquamacs. I can duplicate it with -Q, but not with -q. Now i try carbon emacs again with -q, and i _can_ duplicate it. ... umm... not sure what is the problem now... since i'm pretty sure =20 i don't have any customization for emacs-lisp-mode ... am kinda tired now. Maybe i'll do some more testing to see what i =20 find out. Xah =E2=88=91 http://xahlee.org/ =E2=98=84 On Nov 22, 2008, at 4:36 AM, Alan Mackenzie wrote: 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 --=20 Alan Mackenzie (Nuremberg, Germany). =E2=98=84