diff options
| author | Eli Zaretskii | 2017-01-13 11:12:27 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-01-13 11:12:27 +0200 |
| commit | 42eae54207beb340ef2732c3d66e2e120a1c29f4 (patch) | |
| tree | 08e39b38e5d0de2508ebb7c2ce11063ac0f17574 /doc | |
| parent | b0ade0df21d4cde8537c29f81eb10bdcf1cdfbfc (diff) | |
| download | emacs-42eae54207beb340ef2732c3d66e2e120a1c29f4.tar.gz emacs-42eae54207beb340ef2732c3d66e2e120a1c29f4.zip | |
Improve documentation of dabbrevs
* doc/emacs/abbrevs.texi (Dynamic Abbrevs): Add a cross reference
to "Dabbrev Customization".
(Dabbrev Customization): More details about the default value of
dabbrev-abbrev-char-regexp and use cases when it might not be good
enough. (Bug#25432)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/abbrevs.texi | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index 8cb7a4838e9..117d07e2814 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi | |||
| @@ -388,6 +388,9 @@ words that follow the expansion in its original context. Simply type | |||
| 388 | @kbd{@key{SPC} M-/} for each additional word you want to copy. The | 388 | @kbd{@key{SPC} M-/} for each additional word you want to copy. The |
| 389 | spacing and punctuation between words is copied along with the words. | 389 | spacing and punctuation between words is copied along with the words. |
| 390 | 390 | ||
| 391 | You can control the way @kbd{M-/} determines the word to expand and | ||
| 392 | how to expand it, see @ref{Dabbrev Customization}. | ||
| 393 | |||
| 391 | The command @kbd{C-M-/} (@code{dabbrev-completion}) performs | 394 | The command @kbd{C-M-/} (@code{dabbrev-completion}) performs |
| 392 | completion of a dynamic abbrev. Instead of trying the possible | 395 | completion of a dynamic abbrev. Instead of trying the possible |
| 393 | expansions one by one, it finds all of them, then inserts the text | 396 | expansions one by one, it finds all of them, then inserts the text |
| @@ -437,12 +440,17 @@ copies the expansion verbatim including its case pattern. | |||
| 437 | 440 | ||
| 438 | @vindex dabbrev-abbrev-char-regexp | 441 | @vindex dabbrev-abbrev-char-regexp |
| 439 | The variable @code{dabbrev-abbrev-char-regexp}, if non-@code{nil}, | 442 | The variable @code{dabbrev-abbrev-char-regexp}, if non-@code{nil}, |
| 440 | controls which characters are considered part of a word, for dynamic expansion | 443 | controls which characters are considered part of a word, for dynamic |
| 441 | purposes. The regular expression must match just one character, never | 444 | expansion purposes. The regular expression must match just one |
| 442 | two or more. The same regular expression also determines which | 445 | character, never two or more. The same regular expression also |
| 443 | characters are part of an expansion. The (default) value @code{nil} | 446 | determines which characters are part of an expansion. The (default) |
| 444 | has a special meaning: dynamic abbrevs are made of word characters, | 447 | value @code{nil} has a special meaning: dynamic abbrevs (i.e.@: the |
| 445 | but expansions are made of word and symbol characters. | 448 | word at point) are made of word characters, but their expansions are |
| 449 | looked for as sequences of word and symbol characters. This is | ||
| 450 | generally appropriate for expanding symbols in a program source and | ||
| 451 | also for human-readable text in many languages, but may not be what | ||
| 452 | you want in a text buffer that includes unusual punctuation characters; | ||
| 453 | in that case, the value @code{"\\sw"} might produce better results. | ||
| 446 | 454 | ||
| 447 | @vindex dabbrev-abbrev-skip-leading-regexp | 455 | @vindex dabbrev-abbrev-skip-leading-regexp |
| 448 | In shell scripts and makefiles, a variable name is sometimes prefixed | 456 | In shell scripts and makefiles, a variable name is sometimes prefixed |