all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: henrik@enberg.org, stl@isogmbh.de, emacs-devel@gnu.org
Subject: Re: backward-up-list
Date: Fri, 19 Jul 2002 13:52:41 -0400	[thread overview]
Message-ID: <200207191752.g6JHqfY16870@rum.cs.yale.edu> (raw)
In-Reply-To: 200207191654.g6JGsBY26949@aztec.santafe.edu

>     (defun inside-comment-or-string-p ()
>       "Return non-nil if `point' is inside a comment or string."
>       (let ((state (syntax-ppss (point))))
> 	(or (nth 3 state) (nth 4 state))))
> 
> Stefan, do you see any reason this would be wrong?

No particular reason, no.

> (Depending on font lock would not be a general solution.)

Indeed.  It's a convenient hack, but no more.

> If Stefan sees no basic flaw in this, then would one of you like to
> try modifying some of the functions in lisp.el to test this criterion?
> I guess backward-up-list could move backward out of the string
> constant and treat that as one level of list.  Same-level motion
> commands could move to the beginning or end of the string and count
> that as having moved over one sexp.

Of course if backward-up-list can work all within the string
(in which it currently already DTRT), it should still DTRT.
So it should first try "within the string/comment" and only if
that fails, should it move out.
I'm sure there are more special cases to think of,


	Stefan

  reply	other threads:[~2002-07-19 17:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17 13:45 backward-up-list Stephan Stahl
2002-07-17 13:48 ` backward-up-list Stefan Monnier
2002-07-18 14:55 ` backward-up-list Richard Stallman
2002-07-18 18:08   ` backward-up-list Henrik Enberg
2002-07-18 18:56     ` backward-up-list Stefan Monnier
2002-07-19 16:54     ` backward-up-list Richard Stallman
2002-07-19 17:52       ` Stefan Monnier [this message]
2002-07-20  0:35         ` backward-up-list Richard Stallman
2002-08-09  8:00           ` backward-up-list Stefan Monnier
2002-08-09  8:38             ` backward-up-list stl
2002-08-10 17:16             ` backward-up-list Richard Stallman
2002-07-20 22:02       ` backward-up-list Henrik Enberg

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=200207191752.g6JHqfY16870@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    --cc=henrik@enberg.org \
    --cc=stl@isogmbh.de \
    /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.