aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-04-19 09:17:40 -0400
committerStefan Monnier2010-04-19 09:17:40 -0400
commit79d74ac527b79242175bca1b39ef12b1693c3523 (patch)
tree6b338b07daff8f91db5e15c5bbb2049054e32143
parente42cd1a757d9279644ea6b2dd33927df1eac99f2 (diff)
downloademacs-79d74ac527b79242175bca1b39ef12b1693c3523.tar.gz
emacs-79d74ac527b79242175bca1b39ef12b1693c3523.zip
(completion-styles): Improve docstrings.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/minibuffer.el38
2 files changed, 33 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f6a1c77b1a4..975194703eb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -102,7 +102,7 @@
102 102
1032010-03-29 Stefan Monnier <monnier@iro.umontreal.ca> 1032010-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
104 104
105 Make tmm-menubar work for the Buffers menu again. 105 Make tmm-menubar work for the Buffers menu again (bug#5726).
106 * tmm.el (tmm-prompt): Also handle keymap entries in the form of 106 * tmm.el (tmm-prompt): Also handle keymap entries in the form of
107 vectors rather than cons cells, as used in menu-bar-update-buffers. 107 vectors rather than cons cells, as used in menu-bar-update-buffers.
108 108
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 43838a32ceb..9c252134692 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -381,18 +381,32 @@ the second failed attempt to complete."
381(defconst completion-styles-alist 381(defconst completion-styles-alist
382 '((emacs21 382 '((emacs21
383 completion-emacs21-try-completion completion-emacs21-all-completions 383 completion-emacs21-try-completion completion-emacs21-all-completions
384 "Simple prefix-based completion.") 384 "Simple prefix-based completion.
385I.e. when completing \"foo_bar\" (where _ is the position of point),
386it will consider all completions candidates matching the glob
387pattern \"foobar*\".")
385 (emacs22 388 (emacs22
386 completion-emacs22-try-completion completion-emacs22-all-completions 389 completion-emacs22-try-completion completion-emacs22-all-completions
387 "Prefix completion that only operates on the text before point.") 390 "Prefix completion that only operates on the text before point.
391I.e. when completing \"foo_bar\" (where _ is the position of point),
392it will consider all completions candidates matching the glob
393pattern \"foo*\" and will add back \"bar\" to the end of it.")
388 (basic 394 (basic
389 completion-basic-try-completion completion-basic-all-completions 395 completion-basic-try-completion completion-basic-all-completions
390 "Completion of the prefix before point and the suffix after point.") 396 "Completion of the prefix before point and the suffix after point.
397I.e. when completing \"foo_bar\" (where _ is the position of point),
398it will consider all completions candidates matching the glob
399pattern \"foo*bar*\".")
391 (partial-completion 400 (partial-completion
392 completion-pcm-try-completion completion-pcm-all-completions 401 completion-pcm-try-completion completion-pcm-all-completions
393 "Completion of multiple words, each one taken as a prefix. 402 "Completion of multiple words, each one taken as a prefix.
394E.g. M-x l-c-h can complete to list-command-history 403I.e. when completing \"l-co_h\" (where _ is the position of point),
395and C-x C-f /u/m/s to /usr/monnier/src.") 404it will consider all completions candidates matching the glob
405pattern \"l*-co*h*\".
406Furthermore, for completions that are done step by step in subfields,
407the method is applied to all the preceding fields that do not yet match.
408E.g. C-x C-f /u/mo/s TAB could complete to /usr/monnier/src.
409Additionally the user can use the char \"*\" as a glob pattern.")
396 (initials 410 (initials
397 completion-initials-try-completion completion-initials-all-completions 411 completion-initials-try-completion completion-initials-all-completions
398 "Completion of acronyms and initialisms. 412 "Completion of acronyms and initialisms.
@@ -407,7 +421,19 @@ ALL-COMPLETIONS is the function that lists the completions (it should
407follow the calling convention of `completion-all-completions'), 421follow the calling convention of `completion-all-completions'),
408and DOC describes the way this style of completion works.") 422and DOC describes the way this style of completion works.")
409 423
410(defcustom completion-styles '(basic partial-completion emacs22) 424(defcustom completion-styles
425 ;; First, use `basic' because prefix completion has been the standard
426 ;; for "ever" and works well in most cases, so using it first
427 ;; ensures that we obey previous behavior in most cases.
428 '(basic
429 ;; Then use `partial-completion' because it has proven to
430 ;; be a very convenient extension.
431 partial-completion
432 ;; Finally use `emacs22' so as to maintain (in many/most cases)
433 ;; the previous behavior that when completing "foobar" with point
434 ;; between "foo" and "bar" the completion try to complete "foo"
435 ;; and simply add "bar" to the end of the result.
436 emacs22)
411 "List of completion styles to use. 437 "List of completion styles to use.
412The available styles are listed in `completion-styles-alist'." 438The available styles are listed in `completion-styles-alist'."
413 :type `(repeat (choice ,@(mapcar (lambda (x) (list 'const (car x))) 439 :type `(repeat (choice ,@(mapcar (lambda (x) (list 'const (car x)))