1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

285 Commits

Author SHA1 Message Date
Glenn Morris
953e106ac8 Merge from emacs-24; up to 2014-05-29T17:16:00Z!dmantipov@yandex.ru 2014-06-01 17:18:22 -07:00
Stefan Monnier
08c0f6266a * lisp/minibuffer.el (minibuffer-force-complete-and-exit):
Obey minibuffer-default.

Fixes: debbugs:17545
2014-05-31 22:24:23 -04:00
Glenn Morris
4a12fa5c2e Doc updates re completion-in-region-function
* lisp/minibuffer.el (completion-in-region-functions, completion-in-region)
(completion--in-region): Doc fixes.

* doc/lispref/hooks.texi: Update comment.
2014-05-26 18:25:57 -07:00
Glenn Morris
015936fba1 Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org 2014-05-25 19:28:09 -07:00
Stefan Monnier
e4829cb8d7 * lisp/minibuffer.el (completion--sreverse): Remove.
(completion--common-suffix): Use `reverse' instead.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings.
2014-05-23 11:54:44 -04:00
Paul Eggert
f62d0f2a08 Spelling fix. 2014-05-18 22:07:45 -07:00
Glenn Morris
f4da4720df Merge from emacs-24; up to 2014-05-15T16:55:18Z!jan.h.d@swipnet.se 2014-05-14 10:01:29 -07:00
Stephen Berman
34cba8e885 * lisp/minibuffer.el (completion-pcm--merge-try): Merge trailing / with
suffix.

Fixes: debbugs:15419
2014-05-14 12:21:13 -04:00
Glenn Morris
fb3f83f5fd Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org 2014-05-07 20:41:21 -07:00
Stefan Monnier
bf67c3f7ef * lisp/minibuffer.el (completion--try-word-completion): Revert fix for
Bug#15980.

Fixes: debbugs:17375
2014-05-05 19:54:06 -04:00
Stefan Monnier
dccb068865 * lisp/minibuffer.el (completion-table-with-quoting) <completion--unquote>:
Make sure the new point we return is within the new string.

Fixes: debbugs:17239
2014-05-04 21:46:47 -04:00
Paul Eggert
3e9fa60a5c Merge from emacs-24; up to 2014-05-04T21:18:30Z!eggert@cs.ucla.edu 2014-05-04 12:37:56 -07:00
Glenn Morris
d136f18462 Doc fixes
* doc/misc/autotype.texi (Skeleton Language):
* doc/misc/message.texi (Header Commands):
* lisp/allout-widgets.el (allout-widgets-tally)
(allout-decorate-item-guides):
* lisp/menu-bar.el (menu-bar-positive-p):
* lisp/minibuffer.el (completion-pcm-complete-word-inserts-delimiters):
* lisp/cedet/ede.el (ede-project-directories, ede-check-project-directory):
* lisp/cedet/semantic/ia-sb.el (semantic-ia-sb-show-doc):
* lisp/cedet/semantic/tag.el (semantic-tag-in-buffer-p):
* lisp/cedet/semantic/bovine/c.el (semantic-tag-abstract-p):
* lisp/gnus/gnus-registry.el (gnus-registry-install-p): Doc fix.
* lisp/progmodes/gdb-mi.el (gdbmi-same-start, gdbmi-is-number):
* lisp/progmodes/js.el (js--inside-param-list-p)
(js--inside-dojo-class-list-p, js--forward-destructuring-spec):
* lisp/progmodes/prolog.el (region-exists-p):
* lisp/progmodes/verilog-mode.el (verilog-scan-cache-ok-p):
* lisp/textmodes/reftex-parse.el (reftex-using-biblatex-p):
* lisp/url/url-parse.el (url-generic-parse-url):
* src/floatfns.c (Fisnan):
* src/profiler.c (Fprofiler_cpu_running_p):
Doc fixes (replace `iff').

Fixes: debbugs:17309
2014-05-01 19:55:25 -04:00
Daniel Colascione
2395f2b919 Prevent assertion failure when trying to complete the prompt 2014-04-01 13:48:02 -07:00
Bastien Guerry
65cdacb51b Revert 2014-03-04T14:33:56Z!bzg@gnu.org.
Thanks to Leo for reporting this.
2014-03-05 08:04:01 +01:00
Glenn Morris
3106d59bce * minibuffer.el (completion-hilit-commonality): Revert 2014-03-01 short-cut,
which changed the return value.

Fixes: debbugs:16933
2014-03-04 09:01:37 -08:00
Bastien Guerry
c3701c7d94 minibuffer.el (minibuffer-completion-help): Use 0 as thefallback value for `base-size'
* minibuffer.el (minibuffer-completion-help): Use 0 as the
fallback value for `base-size'.  (Bug#16933)
2014-03-04 15:33:56 +01:00
Glenn Morris
b829360f50 Replace some uses of obsolete argument of display-completion-list
* lisp/minibuffer.el (completion-hilit-commonality):
Make `base-size' argument optional.  Short-cut if `prefix-len' is 0.

* lisp/comint.el (comint-dynamic-list-completions): Doc fix.

* lisp/comint.el (comint-dynamic-list-completions):
* lisp/filecache.el (file-cache-minibuffer-complete):
* lisp/tempo.el (tempo-display-completions):
* lisp/eshell/em-hist.el (eshell-list-history):
Replace use of obsolete argument of display-completion-list.

* lisp/tempo.el: Use utf-8 for author name.
2014-02-28 18:31:05 -08:00
Glenn Morris
5e618aba8b Some doc fixes for completion-hilit-commonality and friends
* lisp/minibuffer.el (completions-first-difference)
(completions-common-part, completion-hilit-commonality): Doc fixes.
2014-02-27 21:29:45 -08:00
Glenn Morris
ea7826ba52 Small doc related to new completion functions
* doc/lispref/minibuf.texi (Programmed Completion):
Mention completion-table-with-cache.

* lisp/minibuffer.el (completion-table-dynamic)
(completion-table-with-cache): Doc fixes.

* etc/NEWS: Related markup.  Unrelated copyedit.
2014-02-27 00:01:22 -08:00
Daniel Colascione
675cab2c1b Fix indentation 2014-02-26 13:31:22 -08:00
Nicolas Richard
0e38ae052e lisp/minibuffer.el: Fix bug#16808.
(completion--try-word-completion): Fix error when completing M-x commands.
2014-02-24 16:41:46 +01:00
Lars Ingebrigtsen
dd7aafbbf0 * minibuffer.el (read-file-name): Doc clarification.
Fixes: debbugs:15096
2014-02-07 21:15:31 -08:00
Dmitry Gutov
a333e4d297 Define and use `completion-table-merge'
* lisp/minibuffer.el (completion-table-merge): New function.

* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Use
`completion-table-merge' instead of `completion-table-in-turn'.

Fixes: debbugs:16604
2014-02-06 03:22:38 +02:00
Bastien Guerry
68f0bb9791 Fix bug 15980
* minibuffer.el (completion--try-word-completion): When both a
hyphen and a space are possible candidates for the character
following a word, display both candidates.
2014-01-08 00:36:29 +01:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Chong Yidong
8cd22a0818 Rename set-temporary-overlay-map -> set-transient-map
* lisp/subr.el (set-transient-map): Rename from
set-temporary-overlay-map.  Doc fix.

* lisp/face-remap.el (text-scale-adjust):
* lisp/indent.el (indent-rigidly):
* lisp/kmacro.el (kmacro-call-macro):
* lisp/minibuffer.el (minibuffer-force-complete):
* lisp/repeat.el (repeat):
* lisp/simple.el (universal-argument--mode):
* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
* lisp/progmodes/f90.el (f90-abbrev-start): Callers changed.

* lisp/org/org.el (orgstruct-make-binding): Call set-transient-map
instead of old name set-temporary-overlay-map.

* doc/lispref/keymaps.texi (Controlling Active Maps): Renamed
set-temporary-overlay-map to set-transient map.  Doc fixes.
(Searching Keymaps): The transient keymap takes precedence.
2013-12-23 11:59:10 +08:00
Dmitry Gutov
16588fadd0 Add caching variant of `completion-table-dynamic'
* lisp/minibuffer.el (completion-table-with-cache): New function.

* lisp/progmodes/octave.el (inferior-octave-completion-table): Turn
back into function, use `completion-table-with-cache'.  Update all
references.

Fixes: debbugs:11906
2013-12-06 02:48:52 +02:00
Jorgen Schaefer
c484f86681 Scroll correct window when showing completion options.
* minibuffer.el (completion--in-region-1): Scroll the correct
window. (Bug#13898)
2013-11-24 15:08:02 +01:00
Jorgen Schaefer
6cad7ba3b9 * lisp/minibuffer.el (completion--replace): Be careful that `end' might be
a marker.
2013-10-03 22:12:16 -04:00
Leo Liu
3958758036 * minibuffer.el (completion-all-sorted-completions): Make args
optional as they are.
2013-09-26 08:46:29 +08:00
Stefan Monnier
504a03813b * lisp/icomplete.el (icomplete-in-buffer): New var.
(icomplete-pre-command-hook, icomplete-post-command-hook): Remove those
vars and replace them with functions.
(icomplete-minibuffer-setup): Adjust accordingly.
(icomplete--completion-table, icomplete--completion-predicate)
(icomplete--field-string, icomplete--field-beg, icomplete--field-end):
New functions.
(icomplete-forward-completions, icomplete-backward-completions)
(icomplete-simple-completing-p, icomplete-exhibit)
(icomplete-completions): Use them.
(icomplete--in-region-buffer): New var.
(icomplete--in-region-setup): New function.
(icomplete-mode): Use it.
2013-09-16 15:09:24 -04:00
Stefan Monnier
67982e2b74 * lisp/minibuffer.el: Make minibuffer-complete call completion-in-region
rather than other way around.
(completion--some, completion-pcm--find-all-completions):
Don't delay signals when debugging.
(minibuffer-completion-contents): Beware fields within the
minibuffer contents.
(completion-all-sorted-completions): Use defvar-local.
(completion--do-completion, completion--cache-all-sorted-completions)
(completion-all-sorted-completions, minibuffer-force-complete):
Add args `beg' and `end'.
(completion--in-region-1): New fun, extracted from minibuffer-complete.
(minibuffer-complete): Use completion-in-region.
(completion-complete-and-exit): New fun, extracted from
minibuffer-complete-and-exit.
(minibuffer-complete-and-exit): Use it.
(completion--complete-and-exit): Rename from
minibuffer--complete-and-exit.
(completion-in-region--single-word): New function, extracted from
minibuffer-complete-word.
(minibuffer-complete-word): Use it.
(display-completion-list): Make `common-substring' argument obsolete.
(completion--in-region): Call completion--in-region-1 instead of
minibuffer-complete.
(completion-help-at-point): Pass boundaries to
minibuffer-completion-help as args rather than via an overlay.
(completion-pcm--string->pattern): Use `any-delim'.
(completion-pcm--optimize-pattern): New function.
(completion-pcm--pattern->regex): Handle `any-delim'.
* lisp/icomplete.el (icomplete-forward-completions)
(icomplete-backward-completions, icomplete-completions):
Adjust calls to completion-all-sorted-completions and
completion--cache-all-sorted-completions.
(icomplete-with-completion-tables): Default to t.
* lisp/emacs-lisp/crm.el (crm--current-element): Rename from
crm--select-current-element.  Don't put an overlay but return the
boundaries instead.
(crm--completion-command): Take two new args to bind to the boundaries.
(crm-completion-help): Adjust accordingly.
(crm-complete): Use completion-in-region.
(crm-complete-word): Use completion-in-region--single-word.
(crm-complete-and-exit): Use completion-complete-and-exit.
2013-09-06 18:46:44 -04:00
Stephen Berman
158bc55c6e * lisp/minibuffer.el (completion--twq-all): Try and preserve each
completion's case choice.

Fixes: debbugs:14907
2013-07-30 16:42:15 -04:00
Glenn Morris
02d844b536 * minibuffer.el (read-file-name-completion-ignore-case):
Move before completion--in-region, for eager macro expansion.

Somehow, this avoids an eager macro expansion failure present during
bootstrap since ~ 2013-04-17.
2013-05-29 20:18:06 -07:00
Glenn Morris
ed8be7ff74 Misc custom group fixes
* cus-start.el (show-trailing-whitespace): Move to editing basics.
* faces.el (trailing-whitespace): Don't use whitespace-faces group.
* obsolete/old-whitespace.el (whitespace-faces): Remove group.
(whitespace-highlight): Move to whitespace group.

* comint.el (comint-source):
* pcmpl-linux.el (pcmpl-linux):
* shell.el (shell-faces):
* eshell/esh-opt.el (eshell-opt):
* international/ccl.el (ccl): Remove empty custom groups.

* completion.el (dynamic-completion-mode):
* jit-lock.el (jit-lock-debug-mode):
* minibuffer.el (completion-in-region-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* emulation/tpu-edt.el (tpu-edt-mode):
* progmodes/subword.el (global-subword-mode, global-superword-mode):
* progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
* term/vt100.el (vt100-wide-mode): Specify explicit :group.

* term/xterm.el (xterm): Change parent group to terminals.

* master.el (master): Remove empty custom group.
(master-mode): Remove unused :group argument.
* textmodes/refill.el (refill): Remove empty custom group.
(refill-mode): Remove unused :group argument.

* textmodes/rst.el (rst-compile-toolsets): Use rst-compile group.

* cedet/semantic/symref/list.el (semantic-symref-auto-expand-results)
(semantic-symref-results-mode-hook)
(semantic-symref-results-summary-function): Fix :group.

* erc/erc-list.el (erc-list):
* erc/erc-menu.el (erc-menu):
* erc/erc-ring.el (erc-ring): Define custom groups, for define-erc-module.

* gnus/shr-color.el (shr-color-visible-luminance-min)
(shr-color-visible-distance-min): Use shr-color group.

* url/url-news.el (url-news): Remove empty custom group.
2013-05-15 19:55:41 -04:00
Stefan Monnier
1d829c64d2 * lisp/minibuffer.el (minibuffer-completion-contents): Fix obsolescence info
to avoid misleading the user.
2013-04-23 08:27:06 -04:00
Stefan Monnier
d36ed1c8e7 * lisp/subr.el (with-wrapper-hook): Declare obsolete.
* lisp/simple.el (filter-buffer-substring-function): New hook.
(filter-buffer-substring): Use it.
(filter-buffer-substring-functions): Mark obsolete.
* lisp/minibuffer.el (completion-in-region-function): New hook.
(completion-in-region): Use it.
(completion-in-region-functions): Mark obsolete.
* lisp/mail/mailabbrev.el (mail-abbrevs-setup): Use abbrev-expand-function.
* lisp/abbrev.el (abbrev-expand-function): New hook.
(expand-abbrev): Use it.
(abbrev-expand-functions): Mark obsolete.
* lisp/emacs-lisp/nadvice.el (advice--where-alist): Add :filter-args
and :filter-return.
* lisp/org/org-agenda.el (org-agenda-mode):
* lisp/org/org-indent.el (org-indent-mode): Use the `local' arg of
add-hook/remove-hook.
2013-04-17 20:12:33 -04:00
Stefan Monnier
dd8791e96f * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Provide specialized
completion tables when completing error conditions and
`declare' arguments.
(lisp-complete-symbol, field-complete): Mark as obsolete.
(check-parens): Unmatched parens are user errors.
* lisp/minibuffer.el (minibuffer-completion-contents): Mark as obsolete.
2013-04-17 16:52:02 -04:00
Juanma Barranquero
51646b62bd Silence byte-compiler warnings.
lisp/minibuffer.el (completion--twq-all):
lisp/term/ns-win.el (ns-initialize-window-system):
lisp/term/w32-win.el (w32-initialize-window-system): Mark unused argument.
2013-04-16 04:41:37 +02:00
Stefan Monnier
21e8fe2f85 * lisp/minibuffer.el (minibuffer-complete): Don't just scroll
a *Completions* that's been iconified.
(minibuffer-force-complete): Make sure repetitions do cycle when going
through completion-in-region -> minibuffer-complete.
2013-04-15 15:55:41 -04:00
Stefan Monnier
b1da29572e * lisp/minibuffer.el (completion-pcm--merge-completions): Make sure prefixes
and suffixes don't overlap.

Fixes: debbugs:14061
2013-03-27 10:41:06 -04:00
Dmitry Gutov
c7a409b6f9 Keep pre-existing highlighting in completion candidates.
* lisp/minibuffer.el (completions-first-difference): State that the
face is "added" in the docstring.
(completions-common-part): Same.  And don't inherit from default.
(completion-hilit-commonality): Prepend 'completions-common-part
and 'completion-first-difference faces to the 'face property,
instead of replacing the value(s).
(completion--insert-strings): Same with 'completions-annotations face.
(completion-hilit-commonality): Use 'face instead of
'font-lock-face, because it gets priority if the completion
strings already have 'face set.

Fixes: debbugs:13250
2013-03-05 11:38:16 +04:00
Chong Yidong
123ecb68a0 Bind view-echo-area-messages in minibuffer-inactive-mode-map.
* help.el (view-echo-area-messages): Use display-buffer.

* minibuffer.el (minibuffer-inactive-mode-map): Bind mouse-1 to
view-echo-area-messages.

Fixes: debbugs:13340
2013-02-09 13:52:20 +08:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Jambunathan K
cc37e70f66 * lisp/icomplete.el: Change separator; add ido-style commands.
(icomplete-show-key-bindings): Remove custom var.
(icomplete-get-keys): Remove function.
(icomplete-forward-completions, icomplete-backward-completions):
New commands.
(icomplete-minibuffer-map): New var.
(icomplete-minibuffer-setup): Use it.
(icomplete-exhibit): Don't delay if the list of completions is known.
(icomplete-separator): New custom.
(icomplete-completions): Use it.
* lisp/minibuffer.el (completion-all-sorted-completions): Delete duplicates.
(minibuffer-force-complete-and-exit): New command.
(minibuffer--complete-and-exit): New function extracted from
minibuffer-complete-and-exit.
(minibuffer-complete-and-exit): Use it.
2012-11-29 16:32:24 -05:00
Stefan Monnier
3b11e6ac60 * lisp/env.el (env--substitute-vars-regexp): New const.
(substitute-env-vars): Use it.  Add `only-defined' arg.
* lisp/net/tramp.el (tramp-replace-environment-variables): Use it.
2012-11-08 10:10:08 -05:00
Stefan Monnier
b938340493 * lisp/minibuffer.el (completion--twq-all): Disable too-strict assertions.
Fixes: debbugs:11714
2012-10-28 15:07:52 -04:00
Stefan Monnier
86957a0cd3 * lisp/minibuffer.el (completion--sifn-requote): Rewrite to handle things
like Tramp's "/foo:~bar//baz" -> "/scpc:foo:/baz" mapping.

Fixes: debbugs:11714
2012-10-28 14:48:17 -04:00