emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: better `up-list' for emacs-lisp, fundamental modes


From: Joe Corneli
Subject: Re: better `up-list' for emacs-lisp, fundamental modes
Date: Tue, 22 Feb 2005 11:10:32 -0600

   > However, `up-list' does not let you move up out of a string:

   That's because you have to know whether you're inside or outside in order to
   know whether a " closes or opens a string.  In contrast a ( or )
   unambiguously identifies whether it closes or opens a paren.

   Knowing whether you're inside a string can require scanning the whole buffer
   from point-min, which can be problematic.  The new function syntax-ppss can
   be used to try and make this efficient, but any such change should be
   postponed to after Emacs-22.1.

While I'd love the added functionality of being able to hop out of a
string in general, the main point of my report has to do with parens,
not strings, like this situation --

(concat "this-is-a-string" "--this-is-too")
             ^    ;=> up-list: Scan error: "Unbalanced parentheses", 656 771

Like I said, this currently *works as expected* in Text mode, i.e.

(concat "this-is-a-string" "--this-is-too")
             ^                             ^
is observed, not an error.  The real high-tech feature for Emacs-22.1
would be to add `up-string-or-list'.  I think `up-list' could be fixed
in Emacs-Lisp mode without any major work, because it already *does*
work properly in Text mode.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]