diff options
| author | Stefan Monnier | 2010-04-19 09:17:40 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-04-19 09:17:40 -0400 |
| commit | 79d74ac527b79242175bca1b39ef12b1693c3523 (patch) | |
| tree | 6b338b07daff8f91db5e15c5bbb2049054e32143 | |
| parent | e42cd1a757d9279644ea6b2dd33927df1eac99f2 (diff) | |
| download | emacs-79d74ac527b79242175bca1b39ef12b1693c3523.tar.gz emacs-79d74ac527b79242175bca1b39ef12b1693c3523.zip | |
(completion-styles): Improve docstrings.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 38 |
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 | ||
| 103 | 2010-03-29 Stefan Monnier <monnier@iro.umontreal.ca> | 103 | 2010-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. |
| 385 | I.e. when completing \"foo_bar\" (where _ is the position of point), | ||
| 386 | it will consider all completions candidates matching the glob | ||
| 387 | pattern \"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. |
| 391 | I.e. when completing \"foo_bar\" (where _ is the position of point), | ||
| 392 | it will consider all completions candidates matching the glob | ||
| 393 | pattern \"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. |
| 397 | I.e. when completing \"foo_bar\" (where _ is the position of point), | ||
| 398 | it will consider all completions candidates matching the glob | ||
| 399 | pattern \"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. |
| 394 | E.g. M-x l-c-h can complete to list-command-history | 403 | I.e. when completing \"l-co_h\" (where _ is the position of point), |
| 395 | and C-x C-f /u/m/s to /usr/monnier/src.") | 404 | it will consider all completions candidates matching the glob |
| 405 | pattern \"l*-co*h*\". | ||
| 406 | Furthermore, for completions that are done step by step in subfields, | ||
| 407 | the method is applied to all the preceding fields that do not yet match. | ||
| 408 | E.g. C-x C-f /u/mo/s TAB could complete to /usr/monnier/src. | ||
| 409 | Additionally 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 | |||
| 407 | follow the calling convention of `completion-all-completions'), | 421 | follow the calling convention of `completion-all-completions'), |
| 408 | and DOC describes the way this style of completion works.") | 422 | and 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. |
| 412 | The available styles are listed in `completion-styles-alist'." | 438 | The 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))) |