diff options
| author | Glenn Morris | 2012-02-08 21:40:41 -0500 |
|---|---|---|
| committer | Glenn Morris | 2012-02-08 21:40:41 -0500 |
| commit | a075a2c5a6e2a9807fdfb3f146d8578da70ea9ef (patch) | |
| tree | 13c30d41532f7589324b693bab96fd2a9df282f7 | |
| parent | 1ef1990cbe59bb07e6dd46b609bb6cd7768acbda (diff) | |
| download | emacs-a075a2c5a6e2a9807fdfb3f146d8578da70ea9ef.tar.gz emacs-a075a2c5a6e2a9807fdfb3f146d8578da70ea9ef.zip | |
Doc fixes for electric.el
* lisp/electric.el (electric-indent-mode, electric-pair-mode)
(electric-layout-rules, electric-layout-mode): Doc fixes.
(electric-pair-pairs, electric-pair-skip-self): Add :version tags.
* etc/NEWS: Related edits.
| -rw-r--r-- | etc/NEWS | 11 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/electric.el | 21 |
3 files changed, 29 insertions, 9 deletions
| @@ -947,8 +947,15 @@ They are superseded by shift-select-mode, enabled by default since 23.1. | |||
| 947 | ** Occur Edit mode applies edits made in *Occur* buffers to the | 947 | ** Occur Edit mode applies edits made in *Occur* buffers to the |
| 948 | original buffers. It is bound to "e" in Occur mode. | 948 | original buffers. It is bound to "e" in Occur mode. |
| 949 | 949 | ||
| 950 | ** New global minor modes electric-pair-mode, electric-indent-mode, | 950 | ** New global minor mode electric-pair-mode. |
| 951 | and electric-layout-mode. | 951 | When enabled, typing an open parenthesis automatically inserts the |
| 952 | matching closing one. | ||
| 953 | |||
| 954 | ** New global minor mode electric-indent-mode. | ||
| 955 | When enabled, typing certain characters triggers reindentation. | ||
| 956 | |||
| 957 | ** New global minor mode electric-layout-mode. | ||
| 958 | When enabled, typing certain characters automatically inserts newlines. | ||
| 952 | 959 | ||
| 953 | ** tabulated-list.el provides a generic major mode for tabulated data, | 960 | ** tabulated-list.el provides a generic major mode for tabulated data, |
| 954 | from which other modes can be derived. | 961 | from which other modes can be derived. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06f55e23e24..0e9cf1ebd70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-02-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * electric.el (electric-indent-mode, electric-pair-mode) | ||
| 4 | (electric-layout-rules, electric-layout-mode): Doc fixes. | ||
| 5 | (electric-pair-pairs, electric-pair-skip-self): Add :version tags. | ||
| 6 | |||
| 1 | 2012-02-08 Martin Rudalics <rudalics@gmx.at> | 7 | 2012-02-08 Martin Rudalics <rudalics@gmx.at> |
| 2 | 8 | ||
| 3 | * server.el (server-unselect-display): Don't inadvertently kill | 9 | * server.el (server-unselect-display): Don't inadvertently kill |
diff --git a/lisp/electric.el b/lisp/electric.el index 4ca27550f96..50c9010a74e 100644 --- a/lisp/electric.el +++ b/lisp/electric.el | |||
| @@ -260,9 +260,9 @@ With a prefix argument ARG, enable Electric Indent mode if ARG is | |||
| 260 | positive, and disable it otherwise. If called from Lisp, enable | 260 | positive, and disable it otherwise. If called from Lisp, enable |
| 261 | the mode if ARG is omitted or nil. | 261 | the mode if ARG is omitted or nil. |
| 262 | 262 | ||
| 263 | Electric Indent mode is a global minor mode. When enabled, | 263 | This is a global minor mode. When enabled, it reindents whenever |
| 264 | reindentation is triggered whenever you insert a character listed | 264 | the hook `electric-indent-functions' returns non-nil, or you |
| 265 | in `electric-indent-chars'." | 265 | insert a character from `electric-indent-chars'." |
| 266 | :global t | 266 | :global t |
| 267 | :group 'electricity | 267 | :group 'electricity |
| 268 | (if (not electric-indent-mode) | 268 | (if (not electric-indent-mode) |
| @@ -288,6 +288,8 @@ in `electric-indent-chars'." | |||
| 288 | (defcustom electric-pair-pairs | 288 | (defcustom electric-pair-pairs |
| 289 | '((?\" . ?\")) | 289 | '((?\" . ?\")) |
| 290 | "Alist of pairs that should be used regardless of major mode." | 290 | "Alist of pairs that should be used regardless of major mode." |
| 291 | :group 'electricity | ||
| 292 | :version "24.1" | ||
| 291 | :type '(repeat (cons character character))) | 293 | :type '(repeat (cons character character))) |
| 292 | 294 | ||
| 293 | (defcustom electric-pair-skip-self t | 295 | (defcustom electric-pair-skip-self t |
| @@ -296,6 +298,8 @@ When inserting a closing paren character right before the same character, | |||
| 296 | just skip that character instead, so that hitting ( followed by ) results | 298 | just skip that character instead, so that hitting ( followed by ) results |
| 297 | in \"()\" rather than \"())\". | 299 | in \"()\" rather than \"())\". |
| 298 | This can be convenient for people who find it easier to hit ) than C-f." | 300 | This can be convenient for people who find it easier to hit ) than C-f." |
| 301 | :group 'electricity | ||
| 302 | :version "24.1" | ||
| 299 | :type 'boolean) | 303 | :type 'boolean) |
| 300 | 304 | ||
| 301 | (defun electric-pair-post-self-insert-function () | 305 | (defun electric-pair-post-self-insert-function () |
| @@ -360,7 +364,9 @@ the mode if ARG is omitted or nil. | |||
| 360 | 364 | ||
| 361 | Electric Pair mode is a global minor mode. When enabled, typing | 365 | Electric Pair mode is a global minor mode. When enabled, typing |
| 362 | an open parenthesis automatically inserts the corresponding | 366 | an open parenthesis automatically inserts the corresponding |
| 363 | closing parenthesis. \(Likewise for brackets, etc.)" | 367 | closing parenthesis. \(Likewise for brackets, etc.) |
| 368 | |||
| 369 | See options `electric-pair-pairs' and `electric-pair-skip-self'." | ||
| 364 | :global t | 370 | :global t |
| 365 | :group 'electricity | 371 | :group 'electricity |
| 366 | (if electric-pair-mode | 372 | (if electric-pair-mode |
| @@ -375,8 +381,8 @@ closing parenthesis. \(Likewise for brackets, etc.)" | |||
| 375 | "List of rules saying where to automatically insert newlines. | 381 | "List of rules saying where to automatically insert newlines. |
| 376 | Each rule has the form (CHAR . WHERE) where CHAR is the char | 382 | Each rule has the form (CHAR . WHERE) where CHAR is the char |
| 377 | that was just inserted and WHERE specifies where to insert newlines | 383 | that was just inserted and WHERE specifies where to insert newlines |
| 378 | and can be: nil, `before', `after', `around', or a function that returns | 384 | and can be: nil, `before', `after', `around', or a function of no |
| 379 | one of those symbols.") | 385 | arguments that returns one of those symbols.") |
| 380 | 386 | ||
| 381 | (defun electric-layout-post-self-insert-function () | 387 | (defun electric-layout-post-self-insert-function () |
| 382 | (let* ((rule (cdr (assq last-command-event electric-layout-rules))) | 388 | (let* ((rule (cdr (assq last-command-event electric-layout-rules))) |
| @@ -407,7 +413,8 @@ one of those symbols.") | |||
| 407 | "Automatically insert newlines around some chars. | 413 | "Automatically insert newlines around some chars. |
| 408 | With a prefix argument ARG, enable Electric Layout mode if ARG is | 414 | With a prefix argument ARG, enable Electric Layout mode if ARG is |
| 409 | positive, and disable it otherwise. If called from Lisp, enable | 415 | positive, and disable it otherwise. If called from Lisp, enable |
| 410 | the mode if ARG is omitted or nil." | 416 | the mode if ARG is omitted or nil. |
| 417 | The variable `electric-layout-rules' says when and how to insert newlines." | ||
| 411 | :global t | 418 | :global t |
| 412 | :group 'electricity | 419 | :group 'electricity |
| 413 | (if electric-layout-mode | 420 | (if electric-layout-mode |