summaryrefslogtreecommitdiff
path: root/lisp/icomplete.el
Commit message (Collapse)AuthorAge
* Make icomplete-tidy-shadowed-file-names into a defcustomSean Whitton2023-03-22
| | | | | lisp/icomplete.el (icomplete-tidy-shadowed-file-names): Make variable into a defcustom.
* Merge from origin/emacs-29Stefan Kangas2023-03-07
|\ | | | | | | | | | | | | | | bd07cec8442 Fix regression in Fido mode (bug#62015) 0e3c7ac13da * Fix `emacs-lisp-native-compile-and-load' for (bug#61917) 4a7e657389a * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (... 8a8a994cfab Revert "Fix configuration of webp libraries" de4277af009 Fix configuration of webp libraries
| * Fix regression in Fido mode (bug#62015)João Távora2023-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To understand the regression consider this recipe where the 'fo' pattern is typed by the user in the last step. emacs -Q C-x b foo RET C-x b afoo RET C-x b *scratch* RET M-x fido-mode RET C-x b fo This used to offer both 'foo' and 'afoo' as candidates but now only offered 'foo'. This is because the pattern 'fo' matches 'foo', but not 'afoo' with 'basic' completion style. Fido mode, however, prioritizes 'flex' completion style, and that is not happening here as it used to. This was introduced in this commit commit bf81df86e52fdc995bec8d9646f84d114cb896d1 Author: João Távora <joaotavora@gmail.com> Date: Wed Dec 7 10:43:59 2022 +0000 Don't override completion-category-defaults in fido-mode I took away the nil setting of 'completion-category-defaults; in Fido mode's minibuffer. It seemed generally the correct thing to do, and was done mainly because Eglot added its style preferences to that variable instead of completion-category-overrides directly, which is a nono. So, to be able use the Fido UI with Eglot successfully, 'completion-category-defaults' should stay untouched. Or so I thought. However, I failed to notice that, for most categories, the default value of 'completion-category-defaults' prioritizes the 'basic' completion style. For example, in the 'buffer' category, the default value has the styles list '(basic substring)'. This means that if a pattern matches accoring to the 'basic' style, 'substring' will not be tried. And neither will 'completion-styles' which in Fido mode's case happens to be 'flex'. The solution in this commit is to craft a value for completion category defaults that is just like the default one, but prioritizes 'flex' completion for every category. * lisp/icomplete.el (icomplete--fido-ccd): New helper. (icomplete--fido-mode-setup): Use it.
| * Revert inadvertent change to lisp/icomplete.el in previous commitJoão Távora2023-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change commit 3a651773d29afb48ac4229cd19e532bd57a4ee2d Author: João Távora <joaotavora@gmail.com> Date: Fri Mar 3 13:13:35 2023 +0000 Eglot: pay better attention to hints' paddingLeft/Right (bug#61924) Inadvertently added a line to this file, which shouldn't (yet) bet added. * lisp/icomplete.el (icomplete--vertical-minibuffer-setup): Remove truncate-lines.
| * Eglot: pay better attention to hints' paddingLeft/Right (bug#61924)João Távora2023-03-03
| | | | | | | | | | * lisp/progmodes/eglot.el (eglot--update-hints-1): Consider :json-false, which is a non-nil value.
| * * lisp/icomplete.el (fido-mode): Enable in-buffer completion (bug#45763).João Távora2023-03-01
| | | | | | | | | | Backport: (cherry picked from commit b5c13032538377b0037c745715613693a1580f81)
| * * lisp/icomplete.el: Fix in-buffer completion.Juri Linkov2023-03-01
| | | | | | | | | | | | | | | | | | | | (icomplete-force-complete-and-exit, icomplete-force-complete): Use 'icomplete--field-beg/end' when not in the minibuffer to not erase the current buffer. Also disable 'completion-in-region-mode' instead of calling 'exit-minibuffer' (bug#45764, bug#51575, bug#61479). Backport: (cherry picked from commit a7a984c0ebebb891e2052d8416544f0bd7002007)
* | * lisp/icomplete.el (icomplete-in-buffer): Make into a defcustom.Sean Whitton2023-03-03
| |
* | * lisp/icomplete.el (fido-mode): Enable in-buffer completion (bug#45763).João Távora2023-02-27
| |
* | * lisp/icomplete.el: Fix in-buffer completion.Juri Linkov2023-02-27
| | | | | | | | | | | | | | (icomplete-force-complete-and-exit, icomplete-force-complete): Use 'icomplete--field-beg/end' when not in the minibuffer to not erase the current buffer. Also disable 'completion-in-region-mode' instead of calling 'exit-minibuffer' (bug#45764, bug#51575, bug#61479).
* | * lisp/icomplete.el (icomplete-exhibit): Check validity of the current buffer.Juri Linkov2023-02-09
|/ | | | | | This function is applicable only in buffers where functions like icomplete--field-beg can be called, and they expects either non-nil completion-in-region--data or window-minibuffer-p (bug#61308).
* ; Fix typosStefan Kangas2023-01-15
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Don't override completion-category-defaults in fido-modeJoão Távora2022-12-07
| | | | | | | | | | To more closely emulate ido-mode, fido-mode and fido-vertical-mode strongly lean to the 'flex completion style. But overriding completion-category-defaults is not the correct way to do it, since sometimes even the 'flex style isn't possible. * lisp/icomplete.el (icomplete--fido-mode-setup): Don't set completion-category-defaults here.
* ; Fix typosStefan Kangas2022-11-11
|
* ; Fix several symbol name typosStefan Kangas2022-10-26
|
* Prefer defvar-keymap in icomplete.elStefan Kangas2022-09-07
| | | | | | * lisp/icomplete.el (icomplete-minibuffer-map) (icomplete-fido-mode-map) (icomplete-vertical-mode-minibuffer-map): Prefer defvar-keymap.
* ; Fix typos: prefer American spellingStefan Kangas2022-07-14
|
* Merge from origin/emacs-28Stefan Kangas2022-07-14
|\ | | | | | | | | | | | | | | | | | | | | | | 5e47ec9511 ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo. ba0871bef1 ; Fix typos: prefer American spelling e3e7f31faa Adapt Tramp doc # Conflicts: # etc/NEWS # etc/themes/modus-themes.el # lisp/emacs-lisp/byte-opt.el # test/lisp/so-long-tests/spelling-tests.el
| * ; Fix typos: prefer American spellingStefan Kangas2022-07-13
| |
* | Quote some literal keys to get help-key-binding faceStefan Kangas2022-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align): * lisp/bindings.el (undo-repeat-map): * lisp/calc/calc-embed.el (calc-do-embedded): * lisp/calc/calc-prog.el (calc-user-define-invocation): * lisp/calc/calc-yank.el (calc--edit-mode): * lisp/comint.el (comint-history-isearch) * lisp/dired.el (dired-mode): * lisp/emulation/viper.el (viper-mode): * lisp/erc/erc-button.el (erc-button-face): * lisp/erc/erc-track.el (erc-track-enable-keybindings): * lisp/gnus/gnus-art.el (gnus-article-button-face): * lisp/gnus/gnus-eform.el (gnus-edit-form): * lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message) (gnus-summary-goto-unread): * lisp/icomplete.el (icomplete-show-matches-on-no-input): * lisp/image-mode.el (image-scroll-up): * lisp/international/iso-transl.el (iso-transl-set-language): * lisp/isearch.el (isearch-forward-regexp): * lisp/misc.el (butterfly): * lisp/outline.el (outline-minor-mode-cycle-filter) (outline-minor-mode-cycle): * lisp/progmodes/grep.el (rgrep): * lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map) (gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map) (gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map): * lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size) (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers) (idlwave-list-shell-load-path-shadows): * lisp/progmodes/python.el (python-shell-get-process-or-error): * lisp/repeat.el (repeat-check-key): * lisp/replace.el (query-replace, query-replace-regexp) (read-regexp): * lisp/simple.el (read-extended-command-predicate): * lisp/tab-bar.el (tab-bar-switch-repeat-map) (tab-bar-move-repeat-map): * lisp/term.el (ansi-term): * lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key): * lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right): * lisp/windmove.el: * lisp/winner.el (winner-mode): Quote literal keys to get 'help-key-binding' face. * lisp/comint.el (comint-insert-previous-argument): Use regular quotes.
* | Merge from origin/emacs-28Stefan Kangas2022-06-24
|\| | | | | | | | | | | | | a772c0b852 ; Fix typos: prefer US spelling. # Conflicts: # doc/misc/modus-themes.org
| * ; Fix typos: prefer US spelling.Stefan Kangas2022-06-23
| |
* | * lisp/icomplete.el: Consider a list in minibuffer-default (bug#55800)Juri Linkov2022-06-12
| | | | | | | | | | * lisp/icomplete.el (icomplete--sorted-completions): Handle a string value in the first element of the list of default values in minibuffer-default.
* | icomplete-in-buffer doc fixLars Ingebrigtsen2022-06-08
| | | | | | | | | | * lisp/icomplete.el (icomplete-in-buffer): dabbrev now uses icomplete-in-buffer (bug#45764).
* | Make the icomplete-in-buffer doc string document moreLars Ingebrigtsen2022-05-07
| | | | | | | | | | * lisp/icomplete.el (icomplete-in-buffer): Note what this variable does and doesn't do (bug#45768).
* | (icomplete-exhibit): Fix use in-bufferStefan Monnier2022-05-06
| | | | | | | | | | | | | | Also prefer #' to quote function names and remove redundant :group args. * lisp/icomplete.el (icomplete-exhibit): Don't presume the completion field ends at `point-max`.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
* | lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/"Rasmus2021-11-12
| | | | | | | | | | * lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/" (bug#43925).
* | * lisp/icomplete.el (icomplete-exhibit): Remove workaroundAaron Jensen2021-10-31
|/
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-16
|
* Double check completions-group customization variable in IcompleteJoão Távora2021-08-22
| | | | | | bug#48545 * lisp/icomplete.el (icomplete--augment): Double check completions-group.
* Make icomplete-forward-completions O(1) when icomplete-scroll is tJoão Távora2021-08-19
| | | | | | | | | In particular, this makes the recently added icomplete-vertical-goto-last (bug#49005) be O(n) instead of O(n^2). That used to be almost unbearably slow for large n. * lisp/icomplete.el (icomplete-forward-completions): don't call last unless needed.
* Minor doc fixes in icomplete.elEli Zaretskii2021-08-19
| | | | | * lisp/icomplete.el (icomplete-section): Add :version. (icomplete--augment): Doc fix.
* ; Correct :version tag of icomplete-selected-match faceJoão Távora2021-08-19
| | | | * lisp/icomplete.el (icomplete-selected-match): Fix :version
* Section by 'group-function' in Icomplete and Fido's vertical modesJoão Távora2021-08-19
| | | | | | | | | Fixes: bug#48545 * lisp/icomplete.el (icomplete--augment): Rewrite from icomplete--affixate. (icomplete--render-vertical): Rework. (icomplete--vertical-minibuffer-setup): Separator is hardcoded "\n", no need to set.
* Bind <up> and <down> in icomplete-vertical-modeJoão Távora2021-08-17
| | | | | | | Suggested by Ergus <spacibba@aol.com> * lisp/icomplete.el (icomplete-vertical-mode-minibuffer-map): Bind <up> and <down>
* Jump to first,last completion with M-<, M-> in icomplete-vertical-modeJoão Távora2021-08-17
| | | | | | | | | | | | Fixes: bug#49005 Co-authored-by: Simon Lang <simon.lang@outlook.com> * lisp/icomplete.el (icomplete-backward-completions): Return non-nil iff something was stepped. Ajust docstring. (icomplete-forward-completions): Adjust docstring. (icomplete-vertical-goto-first, icomplete-vertical-goto-last): New commands. (icomplete-vertical-mode-minibuffer-map): Bind new commands to M-< and M->.
* Make icomplete-vertical-mode take immediate effect (bug#49075)João Távora2021-08-16
| | | | | | | | * etc/NEWS: Mention change. * lisp/icomplete.el (icomplete-vertical-mode): (fido-vertical-mode): Tweak docstring. Turn on icomplete-mode. and fido-mdoe
* Fix bug#50063 when using icomplete-fido-kill with C-x p pJoão Távora2021-08-15
| | | | | | | | | C-x p p utilizes a completion table "category" which is 'project-file' icomplete-fido-kill only functioned for 'buffer' and 'file', and failed with a non-informative message when something else was used. * lisp/icomplete.el (icomplete-fido-kill): Support 'project-file' class. Use cl-case, instead of pcase.
* Use 'remember-buffer' in remember.el doc strings.Gabriel do Nascimento Ribeiro2021-07-19
| | | | | | | | | * lisp/textmodes/remember.el (remember-initial-contents) (remember-before-remember-hook, remember-destroy): Refer to `remember-buffer'. * lisp/textmodes/remember.el (remember-buffer): Make into defcustom (bug#49373).
* Speed up fido-modeDmitry Gutov2021-07-04
| | | | * lisp/icomplete.el (icomplete-completions): Speed up fido-mode (bug#48841).
* In files that use allout use it for all headingsJonas Bernoulli2021-06-30
| | | | | | | * lisp/allout.el: Don't prefix regular comments with three semicolons. * lisp/icomplete.el: Use allout syntax for all headings. * lisp/net/eudc.el: Use allout syntax for all headings.
* Consider environment vars in Fido's directory-aware RET bindingJoão Távora2021-06-05
| | | | | | | Fixes: bug#48782 * lisp/icomplete.el (icomplete-fido-ret): Consider environment variables in dir expansion.
* Make icomplete less blinky and more responsiveDmitry Gutov2021-06-05
| | | | | | | | * lisp/icomplete.el (icomplete-pre-command-hook, icomplete-tidy): Remove, update the callers (https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00111.html). (icomplete-compute-delay): Change the default to 150ms. (icomplete-max-delay-chars): Change the default to 2.
* Add annotation capability to icomplete-vertical-modeJoão Távora2021-06-01
| | | | | | | | Co-authored-by Daniel Mendler <mail@daniel-mendler.de> * lisp/icomplete.el (icomplete--affixate): New helper. (icomplete--render-vertical): Use it. Rework. (icomplete-completions): Pass md to icomplete--render-vertical.
* Improve icomplete-vertical-mode and fido-vertical-modeJoão Távora2021-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mode is intended to be used with Icomplete ('M-x icomplete-mode') or Fido ('M-x fido-mode'), to display the list of completions candidates vertically instead of horizontally. When used with Icomplete, completions are rotated and selection kept at the top. When used with Fido, completions scroll like a typical dropdown widget. If the dropdown behaviour is desired for Icomplete (instead of rotation), icomplete-scroll can be adjusted separately by the user. * etc/NEWS (icomplete-vertical-mode): Reword. * lisp/icomplete.el (simple): Require it. (icomplete-selected-match): New face. (icomplete-scroll): New user-visible var. (icomplete-forward-completions): Rework. (icomplete-backward-completions): Rework. (icomplete--fido-mode-setup): Prefer icomplete-scroll according to icomplete-vertical mode. (icomplete-minibuffer-setup): Initialize icomplete--scrolled-completions. (fido-vertical-mode): An alias for icomplete-vertical-mode. (icomplete-exhibit): Init icomplete--scrolled-past. Adjust overlay. (icomplete--render-vertical): New helper. (icomplete--sorted-completions): If cache is stale, also invalidate icomplete--scrolled-past. (icomplete-completions): Rework. Mostly reformat. * lisp/simple.el (max-mini-window-lines): New helper. (display-message-or-buffer): Use it.
* ; Remove some useless commentsStefan Kangas2021-04-16
|
* Add new icomplete-vertical-modeGregory Heytings2021-04-10
| | | | | | | | | | | | | Co-authored-by: João Távora <joaotavora@gmail.com> * lisp/icomplete.el (icomplete-completions): Consider icomplete-vertical-mode. (icomplete-vertical-mode-minibuffer-map): New map. (icomplete--vertical-minibuffer-setup): New helper. (icomplete-vertical-mode): New minor mode. * doc/emacs/buffers.texi (Icomplete): Mention icomplete-vertical-mode. * etc/NEWS: Mention icomplete-vertical-mode