aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2016-11-07 19:34:51 +0200
committerEli Zaretskii2016-11-07 19:34:51 +0200
commit4f478ca04be6d9b87b25e0a16a6beef300504fb1 (patch)
tree2b3455b6dacafbe6998c676c2e006d92041e7652
parent7272e5db22ab157389fcaa8a187b78e883c1f4c2 (diff)
downloademacs-4f478ca04be6d9b87b25e0a16a6beef300504fb1.tar.gz
emacs-4f478ca04be6d9b87b25e0a16a6beef300504fb1.zip
Improve documentation of dabbrevs
* lisp/dabbrev.el (dabbrev-expand): Doc fix. (Bug#24890) * doc/emacs/abbrevs.texi (Dynamic Abbrevs): Mention 'dabbrev-check-all-buffers', 'dabbrev-check-other-buffers', and 'dabbrev-ignored-buffer-names' and their purpose. (Bug#24890)
-rw-r--r--doc/emacs/abbrevs.texi17
-rw-r--r--lisp/dabbrev.el5
2 files changed, 15 insertions, 7 deletions
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index a1db34cf0ee..227fe6f7ee2 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -341,7 +341,7 @@ abbrev expansion happens only when you request it explicitly.
341@table @kbd 341@table @kbd
342@item M-/ 342@item M-/
343Expand the word in the buffer before point as a @dfn{dynamic abbrev}, 343Expand the word in the buffer before point as a @dfn{dynamic abbrev},
344by searching in the buffer for words starting with that abbreviation 344by searching for words starting with that abbreviation
345(@code{dabbrev-expand}). 345(@code{dabbrev-expand}).
346 346
347@item C-M-/ 347@item C-M-/
@@ -361,14 +361,19 @@ The variable @code{dabbrev-limit}, if non-@code{nil}, specifies how far
361away in the buffer to search for an expansion. 361away in the buffer to search for an expansion.
362 362
363@vindex dabbrev-check-all-buffers 363@vindex dabbrev-check-all-buffers
364@vindex dabbrev-check-other-buffers
364 After scanning the current buffer, @kbd{M-/} normally searches other 365 After scanning the current buffer, @kbd{M-/} normally searches other
365buffers, unless you have set @code{dabbrev-check-all-buffers} to 366buffers. The variables @code{dabbrev-check-all-buffers} and
366@code{nil}. 367@code{dabbrev-check-other-buffers} can be used to determine which
368other buffers, if any, are searched.
367 369
370@vindex dabbrev-ignored-buffer-names
368@vindex dabbrev-ignored-buffer-regexps 371@vindex dabbrev-ignored-buffer-regexps
369 For finer control over which buffers to scan, customize the variable 372 For finer control over which buffers to scan, customize the
370@code{dabbrev-ignored-buffer-regexps}. Its value is a list of regular 373variables @code{dabbrev-ignored-buffer-names} and
371expressions. If a buffer's name matches any of these regular 374@code{dabbrev-ignored-buffer-regexps}. The value of the former is a
375list of buffer names to skip. The value of the latter is a list of
376regular expressions; if a buffer's name matches any of these regular
372expressions, dynamic abbrev expansion skips that buffer. 377expressions, dynamic abbrev expansion skips that buffer.
373 378
374 A negative argument to @kbd{M-/}, as in @kbd{C-u - M-/}, says to 379 A negative argument to @kbd{M-/}, as in @kbd{C-u - M-/}, says to
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index d9f36b15290..438eda3776d 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -433,7 +433,10 @@ Expands to the most recent, preceding word for which this is a prefix.
433If no suitable preceding word is found, words following point are 433If no suitable preceding word is found, words following point are
434considered. If still no suitable word is found, then look in the 434considered. If still no suitable word is found, then look in the
435buffers accepted by the function pointed out by variable 435buffers accepted by the function pointed out by variable
436`dabbrev-friend-buffer-function'. 436`dabbrev-friend-buffer-function', if `dabbrev-check-other-buffers'
437says so. Then, if `dabbrev-check-all-buffers' is non-nil, look in
438all the other buffers, subject to constraints specified
439by `dabbrev-ignored-buffer-names' and `dabbrev-ignored-regexps'.
437 440
438A positive prefix argument, N, says to take the Nth backward *distinct* 441A positive prefix argument, N, says to take the Nth backward *distinct*
439possibility. A negative argument says search forward. 442possibility. A negative argument says search forward.