diff options
| author | Alan Mackenzie | 2008-11-26 10:27:42 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2008-11-26 10:27:42 +0000 |
| commit | 3fbb05ffe611d6c376413ff0bf544a08bfcdb829 (patch) | |
| tree | 7eefaf53cbb08ee42aef5f1f4dfd9e2ec642be97 | |
| parent | a5f7bbcc3fcdcbee9e7cfc1f7f8f95fcec0a20d8 (diff) | |
| download | emacs-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.texi | 16 | ||||
| -rw-r--r-- | lisp/ChangeLog | 8 |
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 |
| 769 | except parentheses (or whatever characters must balance in the | 770 | except parentheses (or whatever characters must balance in the |
| 770 | language you are working with), and the escape characters that might | 771 | language you are working with). They ignore strings and comments |
| 771 | be used to quote those. They are mainly intended for editing | 772 | (including any parentheses within them) and ignore parentheses quoted |
| 773 | by an escape character. They are mainly intended for editing | ||
| 772 | programs, but can be useful for editing any text that has parentheses. | 774 | programs, but can be useful for editing any text that has parentheses. |
| 773 | They are sometimes called ``list'' commands because in Lisp these | 775 | They are sometimes called ``list'' commands because in Lisp these |
| 774 | groupings are lists. | 776 | groupings are lists. |
| 775 | 777 | ||
| 778 | These commands assume that the starting point is not inside a string | ||
| 779 | or a comment. Sometimes you can invoke them usefully from one of | ||
| 780 | these places (for example, when you have a parenthesised clause in a | ||
| 781 | comment) but this is unreliable. | ||
| 782 | |||
| 776 | @table @kbd | 783 | @table @kbd |
| 777 | @item C-M-n | 784 | @item C-M-n |
| 778 | Move forward over a parenthetical group (@code{forward-list}). | 785 | Move 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 |
| 793 | parenthetical groupings, skipping blithely over any amount of text | 800 | (or @var{n}) parenthetical groupings. |
| 794 | that 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 @@ | |||
| 1 | 2008-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 | |||
| 1 | 2008-11-26 Michael Albinus <michael.albinus@gmx.de> | 9 | 2008-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) |