aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2008-11-26 10:27:42 +0000
committerAlan Mackenzie2008-11-26 10:27:42 +0000
commit3fbb05ffe611d6c376413ff0bf544a08bfcdb829 (patch)
tree7eefaf53cbb08ee42aef5f1f4dfd9e2ec642be97
parenta5f7bbcc3fcdcbee9e7cfc1f7f8f95fcec0a20d8 (diff)
downloademacs-3fbb05ffe611d6c376413ff0bf544a08bfcdb829.tar.gz
emacs-3fbb05ffe611d6c376413ff0bf544a08bfcdb829.zip
(Moving by Parens): Clarify that parens inside strings and comments are
ignored, and that the commands assume the starting point isn't in a string or comment.
-rw-r--r--doc/emacs/programs.texi16
-rw-r--r--lisp/ChangeLog8
2 files changed, 19 insertions, 5 deletions
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index c48d564b589..f42434a3cb7 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -765,14 +765,21 @@ single expression in C mode, because of the parentheses.
765@cindex matching parenthesis and braces, moving to 765@cindex matching parenthesis and braces, moving to
766@cindex braces, moving across 766@cindex braces, moving across
767@cindex list commands 767@cindex list commands
768
768 The Emacs commands for handling parenthetical groupings see nothing 769 The Emacs commands for handling parenthetical groupings see nothing
769except parentheses (or whatever characters must balance in the 770except parentheses (or whatever characters must balance in the
770language you are working with), and the escape characters that might 771language you are working with). They ignore strings and comments
771be used to quote those. They are mainly intended for editing 772(including any parentheses within them) and ignore parentheses quoted
773by an escape character. They are mainly intended for editing
772programs, but can be useful for editing any text that has parentheses. 774programs, but can be useful for editing any text that has parentheses.
773They are sometimes called ``list'' commands because in Lisp these 775They are sometimes called ``list'' commands because in Lisp these
774groupings are lists. 776groupings are lists.
775 777
778These commands assume that the starting point is not inside a string
779or a comment. Sometimes you can invoke them usefully from one of
780these places (for example, when you have a parenthesised clause in a
781comment) but this is unreliable.
782
776@table @kbd 783@table @kbd
777@item C-M-n 784@item C-M-n
778Move forward over a parenthetical group (@code{forward-list}). 785Move forward over a parenthetical group (@code{forward-list}).
@@ -789,9 +796,8 @@ Move down in parenthesis structure (@code{down-list}).
789@findex forward-list 796@findex forward-list
790@findex backward-list 797@findex backward-list
791 The ``list'' commands @kbd{C-M-n} (@code{forward-list}) and 798 The ``list'' commands @kbd{C-M-n} (@code{forward-list}) and
792@kbd{C-M-p} (@code{backward-list}) move over one (or @var{n}) 799@kbd{C-M-p} (@code{backward-list}) move forward or backward over one
793parenthetical groupings, skipping blithely over any amount of text 800(or @var{n}) parenthetical groupings.
794that doesn't include meaningful parentheses (symbols, strings, etc.).
795 801
796@kindex C-M-u 802@kindex C-M-u
797@findex backward-up-list 803@findex backward-up-list
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3e91fc98918..f5772568c98 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12008-11-25 Alan Mackenzie <acm@muc.de>
2
3 * emacs-lisp/lisp.el (forward-sexp, backward-sexp, mark-sexp)
4 (forward-list, backward-list, down-list, backward-up-list)
5 (up-list, kill-sexp, backward-kill-sexp, kill-backward-up-list)
6 (insert-pair, insert-parentheses): State that the command assumes
7 that point is not in a string or comment.
8
12008-11-26 Michael Albinus <michael.albinus@gmx.de> 92008-11-26 Michael Albinus <michael.albinus@gmx.de>
2 10
3 * net/dbus.el (dbus-string-to-byte-array) 11 * net/dbus.el (dbus-string-to-byte-array)