1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

296 Commits

Author SHA1 Message Date
Stefan Monnier
8ba31f366f * keymap.c (Vminibuffer_local_filename_must_match_map):
Rename from Vminibuffer_local_must_match_filename_map.
(syms_of_keymap):
* minibuf.c (Fcompleting_read): Adjust accordingly.
* commands.h: Rename declaration as well.
* minibuffer.el (minibuffer-local-must-match-filename-map):
Declare obsolete alias for the old name.
2008-06-05 05:44:12 +00:00
Juanma Barranquero
d9aa6b3358 (completion-table-dynamic): Doc fix. 2008-05-30 19:50:26 +00:00
Stefan Monnier
d4e88786de (completion-pcm-all-completions): Add the base-size. 2008-05-29 20:46:35 +00:00
Stefan Monnier
f838180339 * minibuffer.el (completion-boundaries): Change calling convention, so
`string' has the same semantics as in try-completion and all-completions.
(completion-table-with-context, completion--embedded-envvar-table)
(completion--file-name-table, completion-pcm--find-all-completions):
Adjust code accordingly.
* vc-bzr.el (vc-bzr-annotate-time): Reduce memory allocation.
(vc-bzr-revision-completion-table): Handle `boundaries' argument.
2008-05-23 01:58:15 +00:00
Stefan Monnier
c63028e1b4 (completion-pcm--find-all-completions): Don't add pseudo-completions. 2008-05-22 04:26:41 +00:00
Stefan Monnier
14c24780c3 (completion-all-sorted-completions): New var.
(completion--flush-all-sorted-completions)
(completion-all-sorted-completions): New functions.
(minibuffer-force-complete): New command.
2008-05-21 20:52:44 +00:00
Stefan Monnier
a38313e106 (completion-boundaries): New function.
(completion--some): Delay errors.
(complete-with-action, completion-table-with-context): Handle `boundaries'.
(completion--try-word-completion): Avoid partial-completion
when the user hasn't entered anything yet.
(minibuffer-local-map, minibuffer-local-filename-completion-map)
(minibuffer-local-must-match-map, minibuffer-local-completion-map)
(minibuffer-local-must-match-filename-map, minibuffer-local-ns-map):
Setup default keybindings.
(completion--embedded-envvar-re): New var.
(completion--embedded-envvar-table): Use it.  Handle `boundaries' case.
(completion--file-name-table): Handle `boundaries' case.
(completion-pcm--pattern->regex): Avoid pathological backtracking.
(completion-pcm--all-completions): Add a `prefix' arg.
(completion-pcm--find-all-completions): New function.
(completion-pcm-all-completions, completion-pcm-try-completion): Use it.
2008-05-20 17:03:30 +00:00
Juanma Barranquero
cf43708e71 (completion-table-with-predicate): Don't use `iff' in docstring. 2008-05-08 03:37:39 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Andreas Schwab
5270bf519b (completion--insert-strings): Don't delete past
bol.
2008-05-04 09:30:57 +00:00
Stefan Monnier
e5b5b82d4e (completion--insert-strings): Use string-width rather than length. 2008-05-02 17:32:51 +00:00
Stefan Monnier
457d37ba22 (completion-hilit-commonality): Revert last change:
the leftover code was actually useful.
2008-05-02 17:02:52 +00:00
Stefan Monnier
b00942d090 (completion-pcm-try-completion): Typo. 2008-04-30 04:48:27 +00:00
Stefan Monnier
81ff94589d (completion--do-completion): Move point even if the completion makes no change.
(completion-pcm-try-completion): Fix computation of new point.
2008-04-30 03:41:39 +00:00
Stefan Monnier
7372b09caf (completion-hilit-commonality): Remove leftover code.
(completion-pcm--pattern->regex): Let `group' be a list of symbols.
(completion-pcm--hilit-commonality): New function.
(completion-pcm-all-completions): Use it.
2008-04-29 06:00:21 +00:00
Stefan Monnier
6138158d86 * minibuffer.el (completion-common-substring): Mark obsolete.
(completions-first-difference, completions-common-part): Move from simple.el.
(completion-hilit-commonality): New fun.
(display-completion-list, completion-emacs21-all-completions)
(completion-emacs22-all-completions): Use it.
* simple.el (completions-first-difference, completions-common-part):
Move to minibuffer.el.
(choose-completion-string): Use field functions and minibufferp.
(completion-setup-function): Don't set completions faces.
2008-04-29 05:36:55 +00:00
Stefan Monnier
602f074a51 (completion-pcm--all-completions): Don't pass nil to all-completions. 2008-04-28 13:57:20 +00:00
Juanma Barranquero
26c548b0a4 (completion-pcm-word-delimiters): Add :group.
(completion-pcm--all-completions): Doc fix.
(completion-styles-alist, completion-all-completions): Fix typos in docstrings.
2008-04-26 12:58:13 +00:00
Stefan Monnier
3420078700 (completion-table-with-context): Fix `pred' for the
various kinds of completion tables.
(completion-emacs22-try-completion): Place cursor after the /, as was
done in Emacs-22's minibuffer-complete-word.
Fix bug reported by David Hansen <david.hansen@gmx.net>.
(completion-emacs22-try-completion): Merge all mergable text rather than /.
(completion-pcm--delim-wild-regex): New var.
(completion-pcm-word-delimiters): New custom.
(completion-pcm--prepare-delim-re, completion-pcm--pattern-trivial-p)
(completion-pcm--string->pattern, completion-pcm--pattern->regex)
(completion-pcm--all-completions, completion-pcm-all-completions)
(completion-pcm--merge-completions, completion-pcm--pattern->string)
(completion-pcm-try-completion): New functions.
(completion-styles-alist): Add them.
(completion-styles): Add it to the default.
2008-04-26 01:47:11 +00:00
Glenn Morris
4e3870f5a3 (x-file-dialog): Declare as function. 2008-04-24 05:46:17 +00:00
Stefan Monnier
19c04f3966 (completion-try-completion): Add `point' argument. Change return value.
(completion-all-completions): Add `point' argument.
(minibuffer-completion-help): Pass the new `point' argument.
(completion--do-completion): Pass the whole field to try-completion.
(completion--try-word-completion): Rewrite, making fewer assumptions.
(completion-emacs21-try-completion, completion-emacs21-all-completions)
(completion-emacs22-try-completion, completion-emacs22-all-completions)
(completion-basic-try-completion, completion-basic-all-completions): New funs.
(completion-styles-alist): Use them.
2008-04-23 21:01:31 +00:00
Stefan Monnier
e8a5fe3ed8 (read-file-name): Don't let-bind default-directory.
Only abbreviate default-filename if it's a file.
2008-04-23 18:37:50 +00:00
Stefan Monnier
dbd50d4b77 * lisp/minibuffer.el (read-file-name-function, read-file-name-predicate)
(read-file-name-completion-ignore-case, insert-default-directory):
New vars, moved from fileio.c.
(read-file-name): New fun, moved from fileio.c.
* lisp/cus-start.el: Remove insert-default-directory and
read-file-name-completion-ignore-case.
* src/fileio.c (Vread_file_name_function, Vread_file_name_predicate)
(read_file_name_completion_ignore_case, insert_default_directory)
(Qdefault_directory): Move to minibuffer.el.
(Fread_file_name): Call the new `read-file-name' instead.
2008-04-23 18:19:57 +00:00
Juri Linkov
8b04c0ae76 (internal-complete-buffer-except): New function. 2008-04-22 19:47:13 +00:00
Juanma Barranquero
b0a5a021e3 (minibuffer-complete-and-exit): Fix last change. 2008-04-22 10:20:05 +00:00
Stefan Monnier
f50e56f0e1 (completion--file-name-table): Accept both the old dir' or the new pred' arg. 2008-04-21 21:16:13 +00:00
Stefan Monnier
3911966be9 (completion-try-completion): Change magic symbol
property name.  Rename from minibuffer-try-completion.
(completion-all-completions): Rename from minibuffer-all-completions.
Remove hide-spaces argument.
(completion--do-completion): Rename from minibuffer--do-completion.
(minibuffer-complete-and-exit): Call just try-completion rather than
completion-try-completion to fix up the case.
(completion--try-word-completion): Try to add space or hyphen before
making `string' a prefix of `completion'.
(completion--insert-strings): Rename from minibuffer--insert-strings.
2008-04-21 19:02:54 +00:00
Juanma Barranquero
b95c760067 (completion-table-dynamic): Fix typo, and reflow docstring.
(completion-setup-hook, display-completion-list, completion--file-name-table):
Fix typos in docstrings.
2008-04-21 00:17:56 +00:00
Stefan Monnier
af48580eee (completion-table-with-predicate): Typo. 2008-04-19 03:34:02 +00:00
Stefan Monnier
25c0d99966 * minibuffer.el (completion-table-with-context): Add support for `pred'.
(completion-table-with-terminator): Don't use complete-with-action
since we have to distinguish all three cases anyway.
(completion-table-with-predicate): New function.
(dynamic-completion-table): Add obsolete alias.
* minibuf.texi (Programmed Completion):
Replace dynamic-completion-table with the new completion-table-dynamic.
2008-04-19 03:23:15 +00:00
Stefan Monnier
d28cfdc285 (completion-table-with-terminator): Fix last fix. 2008-04-18 12:46:14 +00:00
Miles Bader
dc6ee347e3 Add arch tagline 2008-04-18 02:46:47 +00:00
Stefan Monnier
b531ac7813 (completion-table-with-terminator): Fix paren typo. 2008-04-17 14:45:27 +00:00
Stefan Monnier
bd5c2732aa (minibuffer-message): Make sure we can put-text-property. 2008-04-14 22:04:38 +00:00
Stefan Monnier
888932153b (completion-table-with-terminator): Those completions
are never valid w.r.t test-completion.
(completion--file-name-table): Check completion-all-completions-with-base-size.
2008-04-14 15:10:36 +00:00
Stefan Monnier
bf87d5fcf4 (minibuffer-message): Put cursor at the right place. 2008-04-14 03:39:31 +00:00
Stefan Monnier
2ed430f471 (minibuffer-try-completion, minibuffer-all-completions): Fix last change. 2008-04-14 03:30:47 +00:00
Stefan Monnier
e2947429e7 * minibuffer.el (completion-all-completion-with-base-size): New var.
(completion--some): New function.
(completion-table-with-context, completion--file-name-table):
Return the base-size if requested.
(completion-table-in-turn): Generalize to multiple arguments.
(complete-in-turn): Compatibility alias.
(completion-styles-alist): New var.
(completion-styles): New customization.
(minibuffer-try-completion, minibuffer-all-completions):
New functions.
(minibuffer--do-completion, minibuffer-complete-and-exit)
(minibuffer-try-word-completion): Use them.
(display-completion-list, minibuffer-completion-help): Use them.
Handle all-completions's new base-size info to set completion-base-size.
* info.el (Info-read-node-name-1): Use completion-table-with-context,
completion-table-with-terminator and complete-with-action.
Remove the now obsolete completion-base-size-function property.
* simple.el (completion-list-mode-map): Move init into declaration.
(completion-list-mode): Use define-derived-mode.
(completion-setup-function): Use any completion-base-size that may
have been set before.  Remove handling of completion-base-size-function.
* loadup.el: Move abbrev.el up earlier.
2008-04-13 22:12:02 +00:00
Juanma Barranquero
017c22fe4b (completion--embedded-envvar-table, read-file-name-internal):
Fix typos in 2008-04-11 change.
2008-04-13 01:49:17 +00:00
Johan Bockgård
69e018a7bd (lazy-completion-table): Fix debug spec. 2008-04-11 23:42:25 +00:00
Stefan Monnier
21622c6d10 * minibuffer.el (complete-with-action, lazy-completion-table):
Move from subr.el.
(apply-partially, completion-table-dynamic)
(completion-table-with-context, completion-table-with-terminator)
(completion-table-in-turn): New funs.
(completion--make-envvar-table, completion--embedded-envvar-table): New funs.
(read-file-name-internal): Use them.
(completion-setup-hook): Move from simple.el.
* subr.el (complete-with-action, lazy-completion-table):
* simple.el (completion-setup-hook): Move to minibuffer.el.
2008-04-11 22:28:02 +00:00
Stefan Monnier
34b67b0f6b * minibuffer.el (minibuffer--double-dollars, read-file-name-internal):
New functions.
* fileio.c (read_file_name_cleanup, Fread_file_name_internal):
Move functions to minibuffer.el.
(syms_of_fileio): Don't declare them.
2008-04-10 03:12:49 +00:00
Stefan Monnier
d2925a49b4 (minibuffer--do-completion): Don't forget to propagate
the arg to recursive calls.
2008-04-10 00:48:10 +00:00
Juanma Barranquero
e1bb0fe5aa (completion-auto-help): Fix typo. 2008-04-09 21:18:25 +00:00
Stefan Monnier
ba5ff07b2a * minibuffer.el (minibuffer): Move group from cus-edit.el.
(completion-auto-help): Move from C code.
(minibuffer--maybe-completion-help): Remove.
(minibuffer--bitset): New function.
(minibuffer--do-completion): Rename from minibuffer-do-completion.
Renumber a bit.  Really complete on string *before* point.
Add argument used for word-completion.
Join trailing / in completion with following text, as done in
minibuffer-complete-word.
Handle new value `lazy' for completion-auto-help.
(minibuffer-try-word-completion): New function extracted from
minibuffer-complete-word.
(minibuffer-complete-word): Use minibuffer--do-completion.
(minibuffer--insert-strings): Rename from
minibuffer-complete-insert-strings.
(exit-minibuffer): Fix typo.
* cus-edit.el (minibuffer): Move group to minibuffer.el.
* cus-start.el: Remove completion-auto-help.
* minibuf.c (Vcompletion_auto_help): Move to minibuffer.el.
(syms_of_minibuf): Remove its initialization.
2008-04-09 19:33:56 +00:00
Stefan Monnier
32bae13cf7 * lisp/minibuffer.el: New file.
* src/minibuf.c (last_exact_completion): Remove variable.
(Fdelete_minibuffer_contents, do_completion, Fminibuffer_complete)
(complete_and_exit_1, complete_and_exit_2)
(Fminibuffer_complete_and_exit, Fminibuffer_complete_word)
(Fdisplay_completion_list, display_completion_list_1)
(Fminibuffer_completion_help, Fself_insert_and_exit)
(Fexit_minibuffer, Fminibuffer_message): Move functions to minibuffer.el.
(syms_of_minibuf): Remove corresponding initializations.
2008-04-09 03:34:19 +00:00