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

257 Commits

Author SHA1 Message Date
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
Jambunathan K
55f197b219 * lisp/minibuffer.el (completion-category-overrides): New completion
category `bookmark'.

Fixes: debbugs:11131
2012-10-26 16:44:38 -04:00
Stefan Monnier
414a8595f0 * lisp/minibuffer.el (minibuffer-force-complete): Fix thinko. 2012-10-25 08:56:13 -04:00
Stefan Monnier
3c92de7031 * lisp/minibuffer.el (minibuffer-force-complete): Use one more marker
for the temporary-overlay-map command.

Fixes: debbugs:12619
2012-10-24 15:40:23 -04:00
Stefan Monnier
5c78877693 * minibuffer.el (completion--flush-all-sorted-completions): Fix typo.
Fixes: debbugs:12619
2012-10-23 23:22:21 -04:00
Stefan Monnier
d92df117f9 * lisp/minibuffer.el (completion--all-sorted-completions-location): New var.
(completion--cache-all-sorted-completions)
(completion--flush-all-sorted-completions): Use it.
(completion-in-region, completion-in-region--postch)
(completion-at-point, completion-help-at-point): Use markers in
completion-in-region--data.

Fixes: debbugs:12619
2012-10-23 23:18:32 -04:00
Stefan Monnier
8e8083185c * lisp/minibuffer.el (minibuffer-force-complete): Make the next completion use
the same completion-field (bug@12221).
2012-10-19 14:59:36 -04:00
Glenn Morris
281c9d2b20 * lisp/minibuffer.el (completion-cycle-threshold): Doc fix 2012-10-17 20:30:04 -07:00
Stefan Monnier
d39109c3e1 * lisp/subr.el (read-passwd-map): New var.
(read-passwd): Use `read-string' again.
* lisp/minibuffer.el (delete-minibuffer-contents): Make it interactive.
2012-10-06 13:29:15 -04:00
Chong Yidong
48de8b1221 Update docs for a bunch of 24.3 changes.
* doc/emacs/killing.texi (Rectangles): Document copy-rectangle-as-kill.

* doc/emacs/search.texi (Special Isearch): Document the lax space search
feature and M-s SPC.
(Regexp Search): Move main search-whitespace-regexp description to
Special Isearch.
(Replace): Document replace-lax-whitespace.

* doc/emacs/basic.texi (Position Info): Document C-u M-=.
(Moving Point): Document move-to-column.

* doc/emacs/display.texi (Useless Whitespace): Add delete-trailing-lines.

* doc/emacs/misc.texi (emacsclient Options): Document the effect of
initial-buffer-choice on client frames.  Document server-auth-dir.
Do not document server-host, which is bad security practice.

* doc/emacs/building.texi (Lisp Libraries): Docstring lookups can trigger
autoloading.  Document help-enable-auto-load.

* doc/emacs/mini.texi (Yes or No Prompts): New node.

* doc/emacs/ack.texi (Acknowledgments): Remove obsolete packages.

* doc/lispref/commands.texi (Click Events): Define "mouse position list".
Remove mention of unimplemented horizontal scroll bars.
(Drag Events, Motion Events): Refer to "mouse position list".
(Accessing Mouse): Document posnp.

* doc/lispref/errors.texi (Standard Errors): Tweak arith-error description.
Tweak markup.  Remove domain-error and friends, which seem to be
unused after the floating-point code revamp.

* doc/lispref/functions.texi (Obsolete Functions): Obsolescence also affects
documentation commands.  Various clarifications.
(Declare Form): New node.

* doc/lispref/loading.texi (Autoload):
* doc/lispref/help.texi (Documentation Basics): The special sequences can
trigger autoloading.

* doc/lispref/macros.texi (Defining Macros): Move description of `declare' to
Declare Form node.

* doc/lispref/numbers.texi (Integer Basics): Copyedits.
(Float Basics): Consider IEEE floating point always available.
(Random Numbers): Document actual limits.
(Arithmetic Operations): Clarify division by zero.  Don't mention
the machine-independence of negative division since it does not
happen in practice.

* doc/lispref/os.texi (Idle Timers): Minor clarifications.
(User Identification): Add system-users and system-groups.

* doc/lispref/strings.texi (String Basics): Copyedits.

* lisp/minibuffer.el (minibuffer-local-filename-syntax): Doc fix.

* lisp/server.el (server-host): Document the security implications.
(server-auth-key): Doc fix.

* lisp/startup.el (initial-buffer-choice): Doc fix.

* src/fns.c (Frandom): Doc fix.
2012-09-30 17:18:38 +08:00
Bastien Guerry
9011078f9d Fix 2012-09-11T14:06:33Z!bastien1@free.fr. 2012-09-11 19:43:21 +02:00
Bastien Guerry
96d0357142 * minibuffer.el (completion-table-subvert): Fix docstring. (bug#12347) 2012-09-11 16:06:33 +02:00
Stefan Monnier
3d10e1343d * lisp/minibuffer.el (completion-at-point-functions): Complete docstring.
Fixes: debbugs:12254
2012-09-01 00:28:24 -04:00
Chong Yidong
4abcdac823 More doc fixes.
* lisp/minibuffer.el (read-file-name): Doc fix.

* character.c (Fcharacterp): Doc fix (Bug#12076).

* data.c (Findirect_variable): Doc fix (Bug#11040).

* editfns.c (Fsave_current_buffer): Doc fix (Bug#11542).

Fixes: debbugs:11542 debbugs:11040 debbugs:12076 debbugs:10881
2012-08-15 01:10:38 +08:00
Stefan Monnier
f58e0fd503 Reduce use of (require 'cl).
* admin/bzrmerge.el: Use cl-lib.
* leim/quail/hangul.el: Don't require CL.
* leim/quail/ipa.el: Use cl-lib.
* vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
* vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
* register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
* msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
* international/quail.el, info-xref.el, imenu.el, image-mode.el:
* font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
* battery.el, avoid.el, abbrev.el: Use cl-lib.
* vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
* vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
* jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
* emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
* calculator.el, autorevert.el, apropos.el: Don't require CL.
* emacs-bytecomp.el (byte-recompile-directory, display-call-tree)
(byte-compile-unfold-bcf, byte-compile-check-variable):
* emacs-byte-opt.el (byte-compile-trueconstp)
(byte-compile-nilconstp):
* emacs-autoload.el (make-autoload): Use pcase.
* face-remap.el (text-scale-adjust): Simplify pcase patterns.
2012-07-10 07:51:54 -04:00
Glenn Morris
c8d3a25c09 Merge from emacs-24; up to 2012-04-30T11:57:47Z!sdl.web@gmail.com 2012-06-28 23:28:37 -07:00
Stefan Monnier
ec55c5e0b0 * minibuffer.el (minibuffer-confirm-exit-commands): Add completion-at-point.
Fixes: debbugs:11725
2012-06-23 00:48:55 -04:00
Stefan Monnier
e33c6771f6 * lisp/minibuffer.el (completion--twq-try): Try to fail more gracefully when
the requote function doesn't work properly.

Fixes: debbugs:11714
2012-06-22 23:48:18 -04:00
Michael Albinus
6b11952a33 * minibuffer.el (read-file-name-default): Revert the patch from 2012-06-17. 2012-06-18 22:39:52 +02:00
Michael Albinus
298551496f * minibuffer.el (read-file-name-default): Bind non-essential' to t'.
* net/tramp.el (tramp-file-name-handler): Catch 'non-essential.

* net/ange-ftp.el (ange-ftp-gwp-start, ange-ftp-start-process):
* net/tramp-sh.el (tramp-maybe-open-connection):
Throw if `non-essential' is non-nil.
2012-06-17 20:54:39 +02:00
Stefan Monnier
1a72a195d0 * lisp/minibuffer.el (completion--sifn-requote): Fix last change.
(minibuffer-local-must-match-filename-map):
Move define-obsolete-variable-alias before its var.
2012-05-15 21:57:20 -04:00
Stefan Monnier
036dfb8b56 * lisp/minibuffer.el (completion--sifn-requote): Handle sifn's truncation
behavior.
(completion--string-equal-p): New function.
(completion--twq-all): Use it to get better assertion failure data.
2012-05-15 14:07:36 -04:00
Stefan Monnier
dbacb4bd91 * lisp/minibuffer.el (completion--twq-all): Again, allow case differences. 2012-05-11 13:11:03 -04:00
Stefan Monnier
f7ae671912 * minibuffer.el (completion--twq-all): Beware completion-ignore-case. 2012-05-03 15:54:07 -04:00
Stefan Monnier
6eac8dc9ac * lisp/minibuffer.el (completion-table-with-quoting): Fix compatibility
all-completions code to not return a number in the last cdr.
2012-04-30 20:21:23 -04:00
Stefan Monnier
0d42eb3e96 * lisp/vc/vc-mtn.el:
* lisp/vc/vc-hg.el:
* lisp/vc/vc-git.el:
* lisp/vc/vc-dir.el:
* lisp/vc/vc-cvs.el:
* lisp/vc/vc-bzr.el:
* lisp/vc/vc-arch.el:
* lisp/vc/vc.el: Replace lexical-let by lexical-binding.
* lisp/minibuffer.el (lazy-completion-table): Avoid ((λ ...) ...).
* lisp/emacs-lisp/cl-macs.el (lexical-let): Fix use in lexical-binding.
* lisp/emacs-lisp/cconv.el (cconv-analyse-form): Warn use of ((λ ...) ...).
2012-04-25 23:18:47 -04:00
Stefan Monnier
cc356a5d47 Remove unnecessary use of minibuffer-completing-file-name.
* lisp/ffap.el: Remove old code for obsolete package.
(ffap-complete-as-file-p): Remove.
* lisp/mh-e/mh-utils.el (minibuffer-completing-file-name): Don't declare.
2012-04-25 14:57:09 -04:00
Stefan Monnier
79c4eeb450 * lisp/minibuffer.el: Use completion-table-with-quoting for read-file-name.
(minibuffer--double-dollars): Preserve properties.
(completion--sifn-requote): New function.
(completion--file-name-table): Rewrite using it and c-t-with-quoting.
2012-04-25 14:42:15 -04:00
Stefan Monnier
ef24141c36 * lisp/minibuffer.el: Add support for completion of quoted/escaped data.
(completion-table-with-quoting, completion-table-subvert): New funs.
(completion--twq-try, completion--twq-all): New functions.
(completion--nth-completion): New function.
(completion-try-completion, completion-all-completions): Use it.
2012-04-25 14:40:42 -04:00