1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00
Commit Graph

113 Commits

Author SHA1 Message Date
Michael Albinus
5f2b693f18 Fix Bug#5840.
* ido.el (ido-file-name-all-completions-1):
* minibuffer.el (minibuffer-completion-help):
* net/tramp.el (tramp-completion-mode-p): Use `non-essential'.
2010-04-15 00:05:14 +02:00
Stefan Monnier
e867cb5d30 Merge from `emacs-23'. 2010-03-24 14:02:56 -04:00
Stefan Monnier
002787475f Add a new completion style `substring'.
* minibuffer.el (completion-basic--pattern): New function.
(completion-basic-try-completion, completion-basic-all-completions): Use it.
(completion-substring--all-completions)
(completion-substring-try-completion)
(completion-substring-all-completions): New functions.
(completion-styles-alist): New style `substring'.
2010-03-22 20:59:49 -04:00
Juanma Barranquero
c8de140b34 Fix typos in docstrings.
* image-dired.el (image-dired-display-thumbs): Fix typo in docstring.
  (image-dired-read-comment): Doc fix.

* json.el (json-object-type, json-array-type, json-key-type, json-false)
  (json-null, json-read-number):
* minibuffer.el (completion-in-region-functions):
* calendar/cal-tex.el (cal-tex-daily-end, cal-tex-number-weeks)
  (cal-tex-cursor-week):
* emacs-lisp/trace.el (trace-function):
* eshell/em-basic.el (eshell/printnl):
* eshell/em-dirs.el (eshell-last-dir-ring, eshell-parse-drive-letter)
  (eshell-read-last-dir-ring, eshell-write-last-dir-ring):
* obsolete/levents.el (allocate-event, event-key, event-object)
  (event-point, event-process, event-timestamp, event-to-character)
  (event-window, event-x, event-x-pixel, event-y, event-y-pixel):
* textmodes/reftex-vars.el (reftex-index-macros-builtin)
  (reftex-section-levels, reftex-auto-recenter-toc, reftex-toc-mode-hook)
  (reftex-cite-punctuation, reftex-search-unrecursed-path-first)
  (reftex-highlight-selection): Fix typos in docstrings.
2010-03-22 17:50:29 +01:00
Juanma Barranquero
d120008778 * lisp/minibuffer.el (completion-in-region-functions): Fix docstring typos. 2010-03-19 14:22:15 +01:00
Stefan Monnier
c53b9c3b0a Fix in-buffer completion when after-change-functions modify the buffer.
* minibuffer.el (completion--replace): New function.
(completion--do-completion): Use it and use relative movement.
2010-02-27 16:21:43 -05:00
Stefan Monnier
51b23c4486 Make `initials' completion work for /hh -> /home/horn again (bug#5524).
* minibuffer.el (completion-initials-expand): Only check the presence
of delims *within* the boundaries, since otherwise the / delim is
always found for files.
2010-02-04 23:21:11 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Stefan Monnier
1d4adede54 (minibuffer-local-must-match-filename-map): Re-instate the varalias that was
accidentally removed by the 2009-11-19 change (bug#5186).
2009-12-12 05:23:54 +00:00
Stefan Monnier
51ef56c47f * minibuffer.el (completion-at-point-functions): New var.
(completion-at-point): New command.
* indent.el (indent-for-tab-command): Handle the new `complete' behavior.
* progmodes/python.el (python-mode-map): Use completion-at-point.
(python-completion-at-point): Rename from python-partial-symbol and
adjust for use in completion-at-point-functions.
(python-mode): Setup completion-at-point for Python completion.
* emacs-lisp/lisp.el (lisp-completion-at-point): New function
extracted from lisp-complete-symbol.
(lisp-complete-symbol): Use it.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use define-derived-mode,
setup completion-at-point for Elisp completion.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Use completion-at-point.
* ielm.el (ielm-map): Use completion-at-point.
(inferior-emacs-lisp-mode): Setup completion-at-point for Elisp completion.
* progmodes/sym-comp.el: Move to...
* obsolete/sym-comp.el: Move from progmodes.
2009-12-07 20:06:26 +00:00
Stefan Monnier
365b9a6296 (minibuffer-complete-and-exit): Don't replace the
minibuffer's content with itself.
Fold the confirm-after-completion case into the `confirm' case.
(completion-pcm-word-delimiters): Add : and / to the delimiters.
2009-12-06 01:25:41 +00:00
Stefan Monnier
3e38b2bd42 (completion-in-region): Improve docstring. 2009-12-06 00:58:40 +00:00
Stefan Monnier
25b5462738 (completion-pcm--merge-try): Also consider placing point after a star, if
that's the only place where modifications can make progress.
2009-12-05 01:22:54 +00:00
Juri Linkov
7d371eac64 Provide additional default values (file name at point or at the
current Dired line) via M-n for file reading minibuffers.  (Bug#5010)

* minibuffer.el (read-file-name-defaults): New function.
(read-file-name): Reset `minibuffer-default' to nil when
it duplicates initial input `insdef'.
Bind `minibuffer-default-add-function' to lambda that
calls `read-file-name-defaults' in `minibuffer-selected-window'.
(minibuffer-insert-file-name-at-point): New command.

* files.el (file-name-at-point-functions): New defcustom.
(find-file-default): Remove defvar.
(find-file-read-args): Don't use `find-file-default'.
Move `minibuffer-with-setup-hook' that sets `minibuffer-default'
to `read-file-name'.
(find-file-literally): Use `read-file-name' with
`confirm-nonexistent-file-or-buffer'.

* ffap.el (ffap-guess-file-name-at-point): New autoloaded function.

* dired.el (dired-read-dir-and-switches):
Move `minibuffer-with-setup-hook' that sets `minibuffer-default'
to `read-file-name'.
(dired-file-name-at-point): New function.
(dired-mode): Add hook `dired-file-name-at-point' to
`file-name-at-point-functions'.
2009-11-25 17:11:29 +00:00
Stefan Monnier
d2c9fc4231 * window.el (display-buffer-mark-dedicated): New var.
(display-buffer): Obey it.
* minibuffer.el (minibuffer-completion-help): Use it.
2009-11-19 22:05:40 +00:00
Juri Linkov
3a9f97fa98 (completions-format): New defcustom.
(completion--insert-strings): Implement vertical format.
2009-11-19 17:38:37 +00:00
Stefan Monnier
a185548b1c * abbrev.el (abbrev-with-wrapper-hook): (re)move...
* simple.el (with-wrapper-hook): ...to here.  Add argument `args'.
* minibuffer.el (completion-in-region-functions): New hook.
(completion-in-region): New function.
* emacs-lisp/lisp.el (lisp-complete-symbol):
* pcomplete.el (pcomplete-std-complete): Use it.
2009-11-19 03:12:51 +00:00
Stefan Monnier
4d93a9e061 (minibuffer-completion-help): Use minibuffer-hide-completions. 2009-11-12 23:10:01 +00:00
Dan Nicolaescu
2f7f4beee9 * progmodes/grep.el (grep-regexp-alist):
* international/mule-cmds.el (iso-2022-control-alist):
* emacs-lisp/timer.el (timer-duration-words):
* subr.el (version-separator, version-regexp-alist):
* minibuffer.el (completion-styles-alist):
* faces.el (face-attribute-name-alist, list-faces-sample-text):
Change defvars to defconsts.
2009-11-11 06:36:41 +00:00
Juri Linkov
032c33996a (read-file-name): Support a list of default values
in `default-filename'.  Use the first file name where only one
element is required.  Doc fix.
2009-11-10 00:54:45 +00:00
Chong Yidong
8368c14e17 * minibuffer.el (read-file-name): Don't use file dialogs for
remote directories (Bug#99).
2009-11-02 02:06:36 +00:00
Stefan Monnier
4fcc3d324a (all-completions): Declare the 4th arg obsolete. 2009-10-26 03:39:15 +00:00
Stefan Monnier
c6432f1e13 (completion--embedded-envvar-table): Fix last change.
Ignore `pred' now that we receive one.  Handle test-completion specially.
2009-10-24 00:46:17 +00:00
Stefan Monnier
a452eee82d (completion-table-with-terminator): Allow to specify the terminator-regexp. 2009-10-22 16:14:49 +00:00
Stefan Monnier
528c56e2d1 * minibuffer.el (completion-table-with-terminator): Properly implement
boundaries, in case `terminator' appears in the suffix.
(completion--embedded-envvar-table): Don't return boundaries if
there's no valid completion.  Simplify.
(completion-file-name-table): New completion table extracted from
completion--file-name-table.
(completion--file-name-table): Use it.
(read-file-name-predicate): Declare obsolete.
(read-file-name): Use the pred arg i.s.o read-file-name-predicate.
* vc-bzr.el (vc-bzr-revision-completion-table): Use the new
completion-file-name-table, and use the `pred' argument.
* files.el (locate-file-completion-table): Use the `pred' arg rather
than read-file-name-predicate.
(abbreviate-file-name): Use \` rather than ^ for BOS.
2009-10-21 20:03:57 +00:00
Chong Yidong
7346a407f4 * minibuffer.el (read-file-name): Check for repeat before putting
a default argument in file-name-history (Bug#4657).

* emacs-lisp/lisp-mode.el (preceding-sexp): Recognize hash table
read syntax (Bug#4737).

* textmodes/sgml-mode.el (sgml-delete-tag): Use
sgml-looking-back-at.
2009-10-18 22:25:36 +00:00
Stefan Monnier
d5e637154f Replace completion-base-size by completion-base-position to fix bugs
such as (bug#4699).
* simple.el (completion-base-position): New var.
(completion-base-size): Mark as obsolete.
(choose-completion): Make it work for mouse events as well.
Pass the new base-position to choose-completion-string.
(choose-completion-guess-base-position): New function, extracted from
choose-completion-delete-max-match.
(choose-completion-delete-max-match): Use it.  Make obsolete.
(choose-completion-string): Use the new base-position info.
(completion-root-regexp): Delete.
(completion-setup-function): Preserve completion-base-position.
Eliminate obsolete base-size manipulation.
* minibuffer.el (display-completion-list): Don't mess with base-size.
(minibuffer-completion-help): Set completion-base-position instead.
* mouse.el (mouse-choose-completion): Redefine as a mere alias to
choose-completion.
* textmodes/bibtex.el (bibtex-complete):
* emacs-lisp/crm.el (crm--choose-completion-string):
Adjust to new calling convention.
* complete.el (partial-completion-mode): Use minibufferp to avoid
bumping into incompatible change to choose-completion-string-functions.
* ido.el (ido-choose-completion-string): Make its calling convention
more permissive.
* comint.el (comint-dynamic-list-input-ring-select): Remove obsolete
base-size manipulation.
(comint-dynamic-list-input-ring): Use dotimes and push.
* iswitchb.el (iswitchb-completion-help): Remove dead-code call to
fundamental-mode.  Use `or'.
2009-10-15 01:50:17 +00:00
Stefan Monnier
681e0e7c02 (completion-pcm--merge-completions): Make sure the
string we return is all made up of text from the completions rather
than part from the completions and part from the input (bug#4219).
2009-10-14 15:10:09 +00:00
Stefan Monnier
40ba988259 (completion--file-name-table): Return nil if there's
no file completion, even if substitute-in-file-name changed
the string (bug#4708).
2009-10-14 03:05:06 +00:00
Stefan Monnier
075518b529 (minibuffer-force-complete): Cycle the list, rather
than just dropping elements from it (bug#4504).
2009-09-24 02:37:37 +00:00
Glenn Morris
6e2ca89515 (completion-initials-expand): Fix typo. 2009-09-02 03:09:10 +00:00
Stefan Monnier
b001adf965 Remove todo item now done. 2009-09-01 20:20:11 +00:00
Stefan Monnier
fcb68f70a4 (completion-try-completion, completion-all-completions):
Remove ill-defined (and mistakenly installed and luckily never used nor
documented) `completion-styles' property.
(completion-initials-expand, completion-initials-all-completions)
(completion-initials-try-completion): New functions.
(completion-styles-alist): Add doc to each entry.
Add new `initials' entry.
2009-09-01 19:49:34 +00:00
Stefan Monnier
ab22be48bd (minibuffer-message): If the current buffer is not
a minibuffer, insert the message in the echo area rather than at the
end of the buffer.
(completion-annotate-function): New variable.
(minibuffer-completion-help): Use it.
(completion--embedded-envvar-table): Environment vars are
always case-sensitive.
2009-08-30 03:45:30 +00:00
Stefan Monnier
890429cc79 (minibuffer-hide-completions): New function.
(completion--do-completion): Use it.
(completions-annotations): New face.
(completion--insert-strings): Use it.
(completion-pcm--delim-wild-regex): Add docstring.
(completion-pcm--string->pattern): Add support for 0-width delimiters
in completion-pcm--delim-wild-regex.
2009-08-19 02:15:19 +00:00
Stefan Monnier
265d4549b0 (completion--do-completion): Move point for the #b001 case as well (bug#4176).
(minibuffer-complete, minibuffer-complete-word): Don't move point.
2009-08-18 19:11:41 +00:00
Jason Rumney
2aafe8087c (read-file-name): Treat confirm options to
MUSTMATCH as nil when invoking x-file-dialog.  (Bug#3969)
2009-08-02 14:56:04 +00:00
Stefan Monnier
1afbbf8521 (completion--try-word-completion): Don't disable
`partial-completion' any more.  Mark the added char instead.
(completion-pcm--string->pattern): Notice chars added by
completion--try-word-completion and treat them specially.
2009-04-14 02:02:30 +00:00
Chong Yidong
90810a8ef0 (minibuffer-complete-and-exit): Doc fix. 2009-03-17 04:39:09 +00:00
Chong Yidong
846b6ebaae (read-file-name): Doc fix. 2009-03-16 03:17:48 +00:00
Chong Yidong
68b113f645 (completion-styles): Add emacs22 completion style as fallback. 2009-03-15 14:29:12 +00:00
Jason Rumney
6462af0dee (read-file-name): Only split dir name when
default filename is missing.  (Bug#2585)
2009-03-09 13:31:23 +00:00
Juanma Barranquero
e35b306327 * minibuffer.el (internal-complete-buffer-except): Doc fix. (Bug#2315) 2009-02-13 10:35:40 +00:00
Stefan Monnier
f87ff5396e (completion--insert-strings): Fix up computation of
column position which manifested e.g. in proced's signal completion.
2009-01-21 21:20:55 +00:00
Juanma Barranquero
9f3618b5f0 * minibuffer.el (minibuffer-message): Fix regexp so it doesn't exclude
MESSAGEs with internal square brackets (i.e., " this [test] message").
  Use `string-match-p'.
  (completion--make-envvar-table, completion--file-name-table)
  (completion-pcm--string->pattern, completion-pcm--all-completions)
  (completion-pcm--filename-try-filter): Use `string-match-p'.
2009-01-14 02:29:52 +00:00
Glenn Morris
8989a9203f Replace last-command-char with last-command-event. 2009-01-09 04:44:15 +00:00
Stefan Monnier
1bba1cfc46 (completion-hilit-commonality): Don't presume
all-completions always include the input as prefix.
(completion-pcm--pattern-trivial-p): Accept a few more patterns
as trivial.
(completion-pcm--hilit-commonality): Remove leftover code that used to
deal with the now removed cdr-in-last-cons.
2009-01-06 04:17:04 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Stefan Monnier
125f795168 (completion-all-completions-with-base-size): Remove.
(completion-all-completions): Don't set it.
(completion-table-with-context, completion--file-name-table):
Don't add base-size in last cdr.
(completion-hilit-commonality): Add argument `base-size'.
(display-completion-list, completion-emacs21-all-completions)
(completion-emacs22-all-completions, completion-basic-all-completions):
Provide it.
(completion-pcm--all-completions): Don't need to remove the base-size
in last-cdr any more.
2008-12-21 05:20:06 +00:00
Chong Yidong
a25c543a3c (minibuffer-confirm-exit-commands): Add PC-complete and
PC-complete-word to the list.
2008-11-29 21:41:30 +00:00