Commit graph

200 commits

Author SHA1 Message Date
Stefan Kangas
2a05479c22 ; Fix typos: prefer American spelling 2022-07-14 12:13:31 +02:00
Stefan Kangas
4e79f77635 Merge from origin/emacs-28
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
2022-07-14 11:37:42 +02:00
Stefan Kangas
ba0871bef1 ; Fix typos: prefer American spelling 2022-07-13 13:04:22 +02:00
Stefan Kangas
05297e40c0 Quote some literal keys to get help-key-binding face
* 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.
2022-07-03 23:31:31 +02:00
Stefan Kangas
81e58d1ce5 Merge from origin/emacs-28
a772c0b852 ; Fix typos: prefer US spelling.

# Conflicts:
#	doc/misc/modus-themes.org
2022-06-24 13:52:51 +02:00
Stefan Kangas
a772c0b852 ; Fix typos: prefer US spelling. 2022-06-23 22:03:50 +02:00
Juri Linkov
72e0ef74d0 * lisp/icomplete.el: Consider a list in minibuffer-default (bug#55800)
* lisp/icomplete.el (icomplete--sorted-completions): Handle a string value
in the first element of the list of default values in minibuffer-default.
2022-06-12 21:24:01 +03:00
Lars Ingebrigtsen
c8532a0acf icomplete-in-buffer doc fix
* lisp/icomplete.el (icomplete-in-buffer): dabbrev now uses
icomplete-in-buffer (bug#45764).
2022-06-08 13:48:48 +02:00
Lars Ingebrigtsen
e13744780f Make the icomplete-in-buffer doc string document more
* lisp/icomplete.el (icomplete-in-buffer): Note what this variable
does and doesn't do (bug#45768).
2022-05-07 12:15:30 +02:00
Stefan Monnier
95ed231015 (icomplete-exhibit): Fix use in-buffer
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`.
2022-05-06 16:44:54 -04:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
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
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Rasmus
87e5357886 lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/"
* lisp/icomplete.el (icomplete-fido-backward-updir): Expand "~/"
(bug#43925).
2021-11-12 09:02:28 +01:00
Aaron Jensen
6265e9349f * lisp/icomplete.el (icomplete-exhibit): Remove workaround 2021-10-31 22:33:28 -04:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
João Távora
1afe59f7f8 Double check completions-group customization variable in Icomplete
bug#48545

* lisp/icomplete.el (icomplete--augment): Double check completions-group.
2021-08-22 16:36:26 +01:00
João Távora
fb81c8c3ad Make icomplete-forward-completions O(1) when icomplete-scroll is t
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.
2021-08-19 23:56:29 +01:00
Eli Zaretskii
787fa7a8ab Minor doc fixes in icomplete.el
* lisp/icomplete.el (icomplete-section): Add :version.
(icomplete--augment): Doc fix.
2021-08-19 15:29:49 +03:00
João Távora
37f0ea99f8 ; Correct :version tag of icomplete-selected-match face
* lisp/icomplete.el (icomplete-selected-match): Fix :version
2021-08-19 12:16:03 +01:00
João Távora
2be8e2ffc9 Section by 'group-function' in Icomplete and Fido's vertical modes
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.
2021-08-19 12:16:03 +01:00
João Távora
e6fb7e44cc Bind <up> and <down> in icomplete-vertical-mode
Suggested by Ergus <spacibba@aol.com>

* lisp/icomplete.el (icomplete-vertical-mode-minibuffer-map): Bind
<up> and <down>
2021-08-17 13:06:06 +01:00
João Távora
96bbd6f0a7 Jump to first,last completion with M-<, M-> in icomplete-vertical-mode
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->.
2021-08-17 12:56:38 +01:00
João Távora
a126c06b0a Make icomplete-vertical-mode take immediate effect (bug#49075)
* etc/NEWS: Mention change.

* lisp/icomplete.el (icomplete-vertical-mode):
(fido-vertical-mode): Tweak docstring.  Turn on
icomplete-mode. and fido-mdoe
2021-08-16 23:18:27 +01:00
João Távora
e6f3a4dc6c Fix bug#50063 when using icomplete-fido-kill with C-x p p
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.
2021-08-15 09:13:25 +01:00
Gabriel do Nascimento Ribeiro
513539524e Use 'remember-buffer' in remember.el doc strings.
* 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).
2021-07-19 18:04:25 +02:00
Dmitry Gutov
9b318d5c58 Speed up fido-mode
* lisp/icomplete.el (icomplete-completions): Speed up fido-mode (bug#48841).
2021-07-04 04:38:54 +03:00
Jonas Bernoulli
8ebd8e1fea In files that use allout use it for all headings
* 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.
2021-06-30 22:17:01 +02:00
João Távora
45d711a356 Consider environment vars in Fido's directory-aware RET binding
Fixes: bug#48782

* lisp/icomplete.el (icomplete-fido-ret): Consider environment
variables in dir expansion.
2021-06-05 21:47:57 +01:00
Dmitry Gutov
8d5b7f519f Make icomplete less blinky and more responsive
* 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.
2021-06-05 03:56:33 +03:00
João Távora
fb1c5e4816 Add annotation capability to icomplete-vertical-mode
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.
2021-06-01 10:44:47 +01:00
João Távora
05ab6e53e2 Improve icomplete-vertical-mode and fido-vertical-mode
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.
2021-06-01 10:40:54 +01:00
Stefan Kangas
289ec2d911 ; Remove some useless comments 2021-04-16 14:54:02 +02:00
Gregory Heytings
5761e9004a Add new icomplete-vertical-mode
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
2021-04-10 23:51:05 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Juri Linkov
dc6e616dfe Don't show matches with no input for nil icomplete-show-matches-on-no-input
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Fix docstring.
(icomplete--initial-input): New internal variable.
(icomplete-minibuffer-setup): Set buffer-local
icomplete--initial-input to icomplete--field-string.
(icomplete-ret, icomplete-force-complete-and-exit)
(icomplete--sorted-completions, icomplete-exhibit):
Compare icomplete--initial-input with icomplete--field-string
to detect no input.  (Bug#19031)

etc/NEWS: Remove duplicate entry.
2020-12-14 10:44:04 +02:00
Stefan Kangas
c50c0a19e3 Prefer setq-local in most files
* lisp/apropos.el (apropos-print):
* lisp/buff-menu.el (Buffer-menu-mode):
* lisp/calc/calc.el (calc-trail-buffer):
* lisp/chistory.el (command-history-mode):
* lisp/dabbrev.el:
* lisp/dframe.el (dframe-frame-mode):
* lisp/doc-view.el (doc-view-presentation-mode):
* lisp/ebuff-menu.el (electric-buffer-menu-mode)
(electric-buffer-update-highlight):
* lisp/edmacro.el (edit-kbd-macro):
* lisp/face-remap.el (buffer-face-set, buffer-face-toggle):
* lisp/files.el:
(find-file-noselect-1, hack-local-variables-confirm)
(set-visited-file-name, revert-buffer--default):
* lisp/filesets.el (filesets-spawn-external-viewer):
* lisp/find-dired.el (find-dired):
* lisp/find-lisp.el (find-lisp-find-dired-internal):
* lisp/finder.el (finder-mode):
* lisp/font-core.el (font-lock-default-function):
* lisp/format.el (format-annotate-function):
* lisp/help-fns.el (describe-variable):
* lisp/help-mode.el (help-mode):
* lisp/icomplete.el (icomplete-minibuffer-setup)
(icomplete--in-region-setup):
* lisp/ido.el (ido-completion-help, ido-tidy):
* lisp/international/robin.el (robin-activate):
* lisp/leim/quail/hangul.el (hangul-input-method-activate):
* lisp/leim/quail/uni-input.el (ucs-input-activate):
* lisp/man.el (Man-mode):
* lisp/master.el (master-set-slave):
* lisp/minibuffer.el (minibuffer-completion-help)
(read-file-name-default):
* lisp/outline.el (outline-minor-mode):
* lisp/pcomplete.el (pcomplete-comint-setup):
* lisp/proced.el (proced-mode):
* lisp/recentf.el (recentf-edit-list, recentf-open-files-items):
* lisp/replace.el (occur-1):
* lisp/reveal.el (reveal-mode):
* lisp/ruler-mode.el (ruler--save-header-line-format):
* lisp/scroll-lock.el (scroll-lock-mode):
* lisp/startup.el (normal-top-level, normal-splash-screen):
* lisp/strokes.el (strokes-list-strokes):
* lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list):
* lisp/tree-widget.el (tree-widget-set-theme):
* lisp/window.el (read-buffer-to-switch):
* lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer
setq-local.
2020-12-09 11:58:38 +01:00
Lars Ingebrigtsen
3568ff084c Clarify icomplete-show-matches-on-no-input doc string
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Clarify
doc string (bug#19031), suggested by Andrii Kolomoiets.
2020-12-07 13:37:44 +01:00
Lars Ingebrigtsen
de7a741c7b Revert "Clarify icomplete-show-matches-on-no-input doc string"
This reverts commit f352c57972.

The new explanation of what icomplete does is wrong.
2020-12-07 13:37:44 +01:00
Lars Ingebrigtsen
f352c57972 Clarify icomplete-show-matches-on-no-input doc string
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Clarify
the meaning of the variable (bug#19031).
2020-12-04 12:15:29 +01:00
João Távora
dd25055829 Fix up fix for bug#19032
* lisp/icomplete.el (icomplete-ret): Call
minibuffer-icomplete-and-exit, not minibuffer-exit.
2020-09-09 20:12:45 +01:00
João Távora
0fb5425442 Change icomplete-show-matches-on-no-input behaviour for Icomplete only
Fixes: bug#19032, bug#43120

Previous fixes to bug#19032 introduced bugs in Fido mode.  This fix
relies on a new command bound to RET.

* etc/NEWS (Miscellaneous): Mention icomplete-show-matches-on-no-input.

* lisp/icomplete.el (icomplete-show-matches-on-no-input): Add comment.
(icomplete-minibuffer-map): Rebind minibuffer-complete-and-exit to
icomplete-ret.
(icomplete-ret): New command.
2020-09-08 09:47:48 +01:00
João Távora
627e9c191e Revert two commits for bug#19032
This reverts:

- commit 585fe00557, which is titled
  "Fix up previous icomplete-show-matches-on-no-input change"

- commit 1b8d369c38, which is titled
  "Change icomplete-show-matches-on-no-input behavior".

A simpler, less intrusive fix follows shortly after this commit.
2020-09-08 09:47:34 +01:00
João Távora
c8472cc69d Better explain behaviour of icomplete--sorted-completions
* lisp/icomplete.el (icomplete--sorted-completions): Overhaul comment
2020-09-07 10:53:01 +01:00
João Távora
6fc502c1ef Don't resort Icomplete candidates when default already on top
Fixes: bug#43222

Icomplete mode re-sorts candidates, bubbling the default to top if
it's found somewhere down the list.  This is done according to two
criteria: exact match and prefix match.  Before this fix, it didn't
take into account the possibility that the exact match for the default
would already be on top, and would incorrectly bubble a prefixing
completion down the list to the top.  This commit fixes that.

* lisp/icomplete.el (icomplete--sorted-completions):
Rework. Recomment.
2020-09-06 08:36:39 +01:00
Lars Ingebrigtsen
585fe00557 Fix up previous icomplete-show-matches-on-no-input change
* lisp/icomplete.el (icomplete-completions): Ensure that the
default value is cleared (bug#43120).
2020-09-05 23:11:43 +02:00
Lars Ingebrigtsen
1b8d369c38 Change icomplete-show-matches-on-no-input behavior
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Doc fix.
(icomplete-completions): Set completion-content-when-empty.

* lisp/minibuffer.el (completion-content-when-empty): New variable.
(completion--complete-and-exit): Use it (bug#19032).

Based on a patch by Matthew Leach <matthew@mattleach.net>.
2020-08-14 13:29:59 +02:00
João Távora
079b0dc430 Delete, don't kill, dir dir fragments in icomplete-fido-backward-updir
Reported by: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>

* lisp/icomplete.el (icomplete-fido-backward-updir): Don't save
dir fragments to kill ring.
2020-06-13 18:46:03 +01:00
João Távora
3916e63f9e Have Fido mode also imitate Ido mode in ignore-case options
Suggested by Sean Whitton <spwhitton@spwhitton.name>.

* lisp/icomplete.el (icomplete--fido-mode-setup): Set ignore-case
options.
2020-06-05 23:38:21 +01:00
João Távora
145a151d62 Correct Fido-mode's backspacing of directories with spaces
Fixes: bug#40625

* lisp/icomplete.el (icomplete-fido-backward-updir): Use
zap-up-to-char.
2020-04-16 09:33:37 +01:00
João Távora
660b9b8cfb Default completion-flex-nospace to nil
By default, the flex completion style _does_ match spaces.

Fixes: bug#40625

* lisp/icomplete.el (icomplete--fido-mode-setup): Force
completion-flex-nospace to nil.

* lisp/minibuffer.el (completion-flex-nospace): Default to nil.
2020-04-15 18:43:09 +01:00