From: xah lee <xah@xahlee.org>
To: xah lee <xah@xahlee.org>
Cc: bug-gnu-emacs@gnu.org, 1406@emacsbugs.donarmstrong.com
Subject: bug#1406: backward-up-list reports scan error incorrectly?
Date: Sat, 22 Nov 2008 05:01:10 -0800 [thread overview]
Message-ID: <9331FB10-71C6-4B1B-94B6-B5C9B3667B74@xahlee.org> (raw)
In-Reply-To: <12CBE034-485F-49CE-9EF6-2C33A51AF0C1@xahlee.org>
Sorry never mind.
i was able to duplicate your error. Some of my testing in previous
post went wrong because i was in text-mode.
though, isn't this something easy to fix? I mean, it surely is easy
to determine if cursor is in inside double quotes, therefore it can
simply move out the quote then do backward-up-list?
In any case, thanks.
Xah
∑ http://xahlee.org/
☄
On Nov 22, 2008, at 4:53 AM, xah lee wrote:
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)
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
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
find out.
Xah
∑ http://xahlee.org/
☄
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
--
Alan Mackenzie (Nuremberg, Germany).
☄
☄
next prev parent reply other threads:[~2008-11-22 13:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 21:24 bug#1406: backward-up-list reports scan error incorrectly? xah lee
[not found] ` <handler.1406.B.122730266611840.ack@emacsbugs.donarmstrong.com>
2008-11-21 21:39 ` bug#1406: Acknowledgement (backward-up-list reports scan error incorrectly?) xah lee
2008-11-21 23:19 ` bug#1406: backward-up-list reports scan error incorrectly? Alan Mackenzie
2008-11-21 23:26 ` xah lee
2008-11-22 12:36 ` Alan Mackenzie
2008-11-22 12:53 ` xah lee
2008-11-22 13:01 ` xah lee [this message]
2008-11-22 14:04 ` Alan Mackenzie
2008-11-27 12:19 ` Alan Mackenzie
2008-11-27 15:56 ` xah lee
2008-11-27 22:09 ` Alan Mackenzie
2008-11-27 22:49 ` xah lee
[not found] ` <mailman.1345.1227787599.26697.help-gnu-emacs@gnu.org>
2008-11-27 15:52 ` Xah Lee
2011-07-09 18:04 ` Glenn Morris
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9331FB10-71C6-4B1B-94B6-B5C9B3667B74@xahlee.org \
--to=xah@xahlee.org \
--cc=1406@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.