aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/completion-preview.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; completion-preview.el: Refine recent addition.Eshel Yaron2026-02-141-7/+8
| | | | | | * lisp/completion-preview.el (completion-preview-inhibit-functions): Reposition, add :version tag.
* ; Add t as a possible value for 'completion-preview-commands'Eshel Yaron2026-02-141-3/+8
| | | | | | | | * lisp/completion-preview.el (completion-preview-commands): Allow the value t, which says that completion preview should be attempted after any command. * lisp/completion-preview.el (completion-preview-require-certain-commands): Adapt.
* New option 'completion-preview-inhibit-functions' (bug#80370)Eshel Yaron2026-02-141-1/+17
| | | | | | | * lisp/completion-preview.el (completion-preview-inhibit-functions): New option. (completion-preview--post-command): Respect it. * etc/NEWS: Announce it.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* ; * lisp/completion-preview.el: Fix race condition.Eshel Yaron2025-08-131-1/+3
| | | | | | | | | | * lisp/completion-preview.el (completion-preview--update): Bind 'inhibit-quit' to non-nil around completion preview overlay initialization. This binding prevents the surrounding 'while-no-input' from interrupting the overlay initialization, which yields an inconsistent state wherein the overlay is visible but completion-preview-active-mode wasn't enabled.
* Merge from savannah/emacs-30Po Lu2025-03-161-8/+12
|\ | | | | | | | | 2d5cf228186 Fix clipboard object handle leak on Android 3.1 to 11.0 b6b4a080a3a Only disable 'completion-preview-active-mode' when it is on
| * Only disable 'completion-preview-active-mode' when it is onEshel Yaron2025-03-161-7/+11
| | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview--post-command): Avoid calling 'completion-preview-active-mode' to disable the mode when already off, since it forces a costly redisplay. (Bug#76964)
* | Merge from savannah/emacs-30Po Lu2025-03-041-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | 1b80bc67aad ; * doc/emacs/android.texi (Android Software): Minor mark... dcfbf7d1863 ; * etc/PROBLEMS: Document the same problem here. b09bbf22afd Document requirements respecting XDG MIME databases on An... 365a91622e0 ; (completion-preview--try-table): Propagate extra proper... # Conflicts: # lisp/completion-preview.el
| * ; (completion-preview--try-table): Propagate extra properties.Eshel Yaron2025-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview--try-table): Let-bind 'completion-extra-properties' to completion properties that the completion backend (capf) provides, so that these properties take effect when querying the completion table. * test/lisp/completion-preview-tests.el (completion-preview-propagates-properties): Add test.
* | Merge from origin/emacs-30Eli Zaretskii2025-03-011-0/+4
|\ \ | |/ | | | | | | | | | | 62b3d3136fa Fix fns-tests-collate-strings failure with musl 840c6824589 ; (completion-preview-complete): Fix bug#76606 fa42626a6a8 ; Fix indentation in cl.texi example 7ff806da496 ; Fix my last commit
| * ; (completion-preview-complete): Fix bug#76606Eshel Yaron2025-02-271-0/+4
| | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-complete): Dismiss completion preview before calling ':exit-function'. This eliminates potential flicker with slow exit functions and avoids the broken preview update reported in bug#76606.
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | (completion-preview-sort-function): Refine ':type'.Eshel Yaron2025-02-281-1/+7
| | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-sort-function): Add some specific sort functions as available choices for this user option. Suggested by Robert Pluim <rpluim@gmail.com>.
* | Make 'completion-preview-sort-function' a defcustomEshel Yaron2025-02-281-2/+14
| | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-sort-function): Define and document it as a user option. * etc/NEWS: Announce.
* | ; * lisp/completion-preview.el: Add some commentary.Eshel Yaron2025-02-261-0/+9
| | | | | | | | | | Clarify the relation of Completion Preview mode with 'completion-at-point' and in-buffer completion interfaces.
* | Add 'help-echo' hint to completion previewEshel Yaron2025-02-261-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview--propertize-for-mouse): New function. * lisp/completion-preview.el (completion-preview--update) (completion-preview--show) (completion-preview-partial-insert) (completion-preview-complete) (completion-preview-next-candidate): Use it to propertize completion preview text with mouse-related properties, including a new 'help-echo' hint.
* | Simplify 'completion-preview-active-mode' command taggingEshel Yaron2025-02-261-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-insert) (completion-preview-insert-word) (completion-preview-insert-sexp) (completion-preview-complete) (completion-preview-prev-candidate) (completion-preview-next-candidate): Use 'interactive' to associate command with 'completion-preview-active-mode' instead of using a bespoke 'completion-predicate' property. (completion-preview-active-p): Declare obsolete.
* | ; (completion-preview--bg-color): Fix bug#75544.Eshel Yaron2025-01-141-1/+1
| | | | | | | | | | * lisp/completion-preview.el (completion-preview--bg-color): Fix loop check.
* | Auto-adapt completion preview background colorEshel Yaron2025-01-091-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach Completion Preview mode to automatically remap its faces such that the background color of the preview overlay matches the background color of the buffer text that is being completed. Crucially, this resolves an issue where the preview overlay didn't look nice with hl-line-mode on. Also see related discussion in bug#71282. * lisp/completion-preview.el (completion-preview-adapt-background-color): New option. (completion-preview--bg-color): New function. (completion-preview--face-remap-cookie-jar): New variable. (completion-preview--make-overlay): Use them.
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Give Completion Preview bindings higher precedenceEshel Yaron2024-11-231-2/+9
| | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-active-mode): add keymap to 'minor-mode-overriding-map-alist' so it takes precedence over other minor mode maps that bind TAB, such as 'eshell-cmpl-mode' in Eshell. (bug#74404)
* | Mark if-let and when-let obsoleteSean Whitton2024-10-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (if-let*, when-let*, if-let, when-let): Mark if-let and when-let obsolete (bug#73853 and elsewhere). Move docstring text around so that if-let* and when-let* descriptions no longer refer to if-let and when-let. * etc/NEWS: Announce the change. * admin/admin.el (reminder-for-release-blocking-bugs): * doc/misc/erc.texi (display-buffer): * lisp/ansi-color.el (ansi-color-apply) (ansi-color--face-vec-face): * lisp/ansi-osc.el (ansi-osc-apply-on-region) (ansi-osc-hyperlink): * lisp/arc-mode.el (archive-goto-file) (archive-next-file-displayer): * lisp/auth-source-pass.el (auth-source-pass-search) (auth-source-pass--parse-data) (auth-source-pass--find-match-many): * lisp/autorevert.el (auto-revert-notify-rm-watch): * lisp/buff-menu.el (Buffer-menu-unmark-all-buffers) (Buffer-menu-group-by-root): * lisp/calendar/parse-time.el (parse-iso8601-time-string): * lisp/cedet/pulse.el (pulse-tick): * lisp/comint.el (comint--fontify-input-ppss-flush-indirect) (comint--intersect-regions): * lisp/completion-preview.el (completion-preview--try-table) (completion-preview--capf-wrapper, completion-preview--update): * lisp/cus-edit.el (setopt--set) (custom-dirlocals-maybe-update-cons, custom-dirlocals-validate): * lisp/custom.el (load-theme): * lisp/descr-text.el (describe-char): * lisp/desktop.el (desktop--emacs-pid-running-p): * lisp/dired-x.el (menu): * lisp/dired.el (dired-font-lock-keywords) (dired-insert-directory, dired--insert-disk-space, dired-mode): * lisp/dnd.el (dnd-handle-multiple-urls): * lisp/dom.el (dom-remove-attribute): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): * lisp/emacs-lisp/comp-common.el (comp-function-type-spec): * lisp/emacs-lisp/comp-cstr.el (comp--all-classes) (comp-cstr-set-range-for-arithm, comp--cstr-union-1-no-mem) (comp-cstr-intersection-no-mem, comp-cstr-fixnum-p) (comp-cstr-type-p): * lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install) (native--compile-async): * lisp/emacs-lisp/comp.el (comp--get-function-cstr) (comp--function-pure-p, comp--intern-func-in-ctxt) (comp--addr-to-bb-name, comp--emit-assume, comp--maybe-add-vmvar) (comp--add-call-cstr, comp--compute-dominator-tree) (comp--dom-tree-walker, comp--ssa-rename) (comp--function-call-maybe-fold, comp--fwprop-call) (comp--call-optim-func): * lisp/emacs-lisp/edebug.el (edebug-global-prefix) (edebug-remove-instrumentation): * lisp/emacs-lisp/eieio.el (initialize-instance): * lisp/emacs-lisp/ert-x.el (ert-resource-directory): * lisp/emacs-lisp/ert.el (ert--expand-should-1) (ert-test-location, ert-write-junit-test-report) (ert-test--erts-test): * lisp/emacs-lisp/icons.el (icon-complete-spec, icon-string) (icons--create): * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload) (loaddefs-generate--parse-file): * lisp/emacs-lisp/multisession.el (multisession-edit-mode--revert, multisession-edit-value): * lisp/emacs-lisp/package-vc.el (package-vc--read-archive-data) (package-vc--version, package-vc--clone): * lisp/emacs-lisp/package.el (package--reload-previously-loaded): * lisp/emacs-lisp/pp.el (pp--insert-lisp): * lisp/emacs-lisp/subr-x.el (add-display-text-property): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): * lisp/emacs-lisp/timer.el (run-at-time): * lisp/emacs-lisp/vtable.el (vtable-goto-table) (vtable-goto-column, vtable-update-object, vtable--insert-line) (vtable--compute-widths, vtable--make-keymap): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/epa-file.el (epa-file-insert-file-contents): * lisp/epa.el (epa-show-key): * lisp/erc/erc-backend.el (erc--split-line, erc--conceal-prompt) (PRIVMSG, erc--get-isupport-entry): * lisp/erc/erc-button.el (erc-button-add-nickname-buttons) (erc--button-next): * lisp/erc/erc-common.el (erc--find-group): * lisp/erc/erc-fill.el (erc-fill, erc-fill-static) (erc-fill--wrap-escape-hidden-speaker) (erc-fill--wrap-unmerge-on-date-stamp) (erc-fill--wrap-massage-initial-message-post-clear) (erc-fill-wrap, erc-fill--wrap-rejigger-region): * lisp/erc/erc-goodies.el (erc--scrolltobottom-all) (erc--keep-place-indicator-on-window-buffer-change) (keep-place-indicator, erc--keep-place-indicator-adjust-on-clear) (erc-keep-place-move, erc--command-indicator-display): * lisp/erc/erc-ibuffer.el (erc-members): * lisp/erc/erc-join.el (erc-join--remove-requested-channel) (erc-autojoin--join): * lisp/erc/erc-networks.el (erc-networks--id-qualifying-init-parts, erc-networks--id-reload) (erc-networks--id-ensure-comparable) (erc-networks--reclaim-orphaned-target-buffers) (erc-networks--server-select): * lisp/erc/erc-nicks.el (erc-nicks-invert) (erc-nicks--redirect-face-widget-link, erc-nicks--highlight) (erc-nicks--highlight-button) (erc-nicks--list-faces-help-button-action, erc-nicks-list-faces) (erc-nicks-refresh, erc-nicks--colors-from-faces) (erc-nicks--track-prioritize) (erc-nicks--remember-face-for-track): * lisp/erc/erc-notify.el (querypoll, erc--querypoll-get-next) (erc--querypoll-on-352, erc--querypoll-send): * lisp/erc/erc-sasl.el (erc-sasl--read-password): * lisp/erc/erc-services.el (erc-services-issue-ghost-and-retry-nick): * lisp/erc/erc-speedbar.el (erc-speedbar--ensure, nickbar) (erc-speedbar-toggle-nicknames-window-lock) (erc-speedbar--compose-nicks-face): * lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect) (erc-stamp-prefix-log-filter, erc--conceal-prompt) (erc--insert-timestamp-left, erc-insert-timestamp-right) (erc-stamp--defer-date-insertion-on-post-modify) (erc-insert-timestamp-left-and-right) (erc-stamp--redo-right-stamp-post-clear) (erc-stamp--reset-on-clear, erc-stamp--dedupe-date-stamps): * lisp/erc/erc-status-sidebar.el (bufbar) (erc-status-sidebar-prefer-target-as-name) (erc-status-sidebar-default-allsort, erc-status-sidebar-click): * lisp/erc/erc-track.el (erc-track--shortened-names-get) (erc-track--setup, erc-track--select-mode-line-face) (erc-track-modified-channels, erc-track--collect-faces-in) (erc-track--switch-buffer, erc-track--replace-killed-buffer): * lisp/erc/erc-truncate.el (erc-truncate--setup) (erc-truncate-buffer): * lisp/erc/erc.el (erc--ensure-query-member) (erc--ensure-query-members, erc--remove-channel-users-but) (erc--cusr-change-status, erc--find-mode, erc--update-modules) (erc-log-irc-protocol, erc--refresh-prompt) (erc--restore-important-text-props) (erc--order-text-properties-from-hash, erc-send-input-line) (erc-cmd-IGNORE, erc--unignore-user, erc-cmd-QUERY) (erc-cmd-BANLIST, erc--speakerize-nick) (erc--format-speaker-input-message, erc-channel-receive-names) (erc-send-current-line, erc-format-target-and/or-network) (erc-kill-buffer-function, erc-restore-text-properties) (erc--get-eq-comparable-cmd): * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias--which) (eshell-maybe-replace-by-alias): * lisp/eshell/em-glob.el (eshell-glob-convert): * lisp/eshell/em-pred.el (eshell-pred-user-or-group) (eshell-pred-file-time, eshell-pred-file-type) (eshell-pred-file-mode, eshell-pred-file-links) (eshell-pred-file-size): * lisp/eshell/em-prompt.el (eshell-forward-paragraph) (eshell-next-prompt): * lisp/eshell/esh-arg.el (eshell-resolve-current-argument): * lisp/eshell/esh-cmd.el (eshell-do-eval, eshell/which) (eshell-plain-command--which, eshell-plain-command): * lisp/eshell/esh-io.el (eshell-duplicate-handles) (eshell-protect-handles, eshell-get-target, eshell-close-target): * lisp/eshell/esh-proc.el (eshell-sentinel): * lisp/eshell/esh-var.el (eshell-parse-variable-ref) (eshell-get-variable, eshell-set-variable): * lisp/faces.el (face-at-point): * lisp/ffap.el (ffap-in-project): * lisp/filenotify.el (file-notify--rm-descriptor): * lisp/files-x.el (read-dir-locals-file) (connection-local-update-profile-variables) (connection-local-value): * lisp/files.el (file-remote-p, abbreviate-file-name) (set-auto-mode, hack-local-variables) (revert-buffer-restore-read-only): * lisp/find-dired.el (find-dired-sort-by-filename): * lisp/font-lock.el (font-lock--filter-keywords): * lisp/gnus/gnus-art.el (article-emojize-symbols): * lisp/gnus/gnus-int.el (gnus-close-server): * lisp/gnus/gnus-search.el (gnus-search-transform) (gnus-search-indexed-parse-output, gnus-search-server-to-engine): * lisp/gnus/gnus-sum.el (gnus-collect-urls, gnus-shorten-url): * lisp/gnus/gnus.el (gnus-check-backend-function): * lisp/gnus/message.el (message-send-mail): * lisp/gnus/mml.el (mml-generate-mime, mml-insert-mime-headers): * lisp/gnus/nnatom.el (nnatom--read-feed, nnatom--read-article) (nnatom--read-article-or-group-authors, nnatom--read-publish) (nnatom--read-update, nnatom--read-links): * lisp/gnus/nnfeed.el (nnfeed--read-server, nnfeed--write-server) (nnfeed--parse-feed, nnfeed--group-data, nnfeed-retrieve-article) (nnfeed-retrieve-headers, nnfeed--print-part) (nnfeed-request-article, nnfeed-request-group) (nnfeed-request-list, nnfeed--group-description) (nnfeed-request-group-description) (nnfeed-request-list-newsgroups, nnfeed-request-rename-group): * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): * lisp/help-fns.el (help-find-source) (help-fns--insert-menu-bindings, help-fns--mention-first-release) (help-fns--mention-shortdoc-groups) (help-fns--customize-variable-version) (help-fns--face-custom-version-info, describe-mode): * lisp/help-mode.el (help-make-xrefs): * lisp/help.el (help-key-description, help--describe-command): * lisp/hfy-cmap.el (htmlfontify-load-rgb-file): * lisp/ibuf-ext.el (ibuffer-jump-to-filter-group) (ibuffer-kill-filter-group, ibuffer-kill-line) (ibuffer-save-filter-groups, ibuffer-save-filters, filename) (basename, file-extension, ibuffer-diff-buffer-with-file-1) (ibuffer-mark-by-file-name-regexp) (ibuffer-mark-by-content-regexp): * lisp/ibuf-macs.el (ibuffer-aif, ibuffer-awhen): * lisp/ibuffer.el (ibuffer-mouse-toggle-mark) (ibuffer-toggle-marks, ibuffer-mark-interactive) (ibuffer-compile-format, process, ibuffer-map-lines): * lisp/image.el (image--compute-map) (image--compute-original-map): * lisp/image/exif.el (exif-parse-buffer): * lisp/image/image-converter.el (image-convert-p, image-convert) (image-converter--find-converter): * lisp/image/image-dired-util.el (image-dired-file-name-at-point): * lisp/image/image-dired.el (image-dired-track-original-file) (image-dired--on-file-in-dired-buffer) (image-dired--with-thumbnail-buffer) (image-dired-jump-original-dired-buffer) (image-dired--slideshow-step, image-dired-display-image): * lisp/image/wallpaper.el (wallpaper--init-action-kill) (wallpaper--find-setter, wallpaper--find-command) (wallpaper--find-command-args, wallpaper--x-monitor-name): * lisp/info-look.el (info-lookup-interactive-arguments) (info-complete)::(:mode): * lisp/info.el (info-pop-to-buffer, Info-read-node-name-1): * lisp/international/emoji.el (emoji--adjust-displayable-1) (emoji--add-recent): * lisp/jsonrpc.el (jsonrpc--call-deferred) (jsonrpc--process-sentinel, jsonrpc--remove): * lisp/keymap.el (keymap-local-lookup): * lisp/mail/emacsbug.el (report-emacs-bug-hook) (submit-emacs-patch): * lisp/mail/ietf-drums.el (ietf-drums-parse-addresses): * lisp/mail/mailclient.el (mailclient-send-it): * lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): * lisp/mail/undigest.el (rmail-digest-parse-mixed-mime): * lisp/minibuffer.el (completion-metadata-get) (completions--after-change) (minibuffer-visible-completions--filter): * lisp/net/browse-url.el (browse-url-url-at-point) (browse-url-file-url, browse-url-emacs): * lisp/net/dbus.el (dbus-byte-array-to-string) (dbus-monitor-goto-serial): * lisp/net/dictionary.el (dictionary-search): * lisp/net/eww.el (eww--download-directory) (eww-auto-rename-buffer, eww-open-in-new-buffer, eww-submit) (eww-follow-link, eww-read-alternate-url) (eww-copy-alternate-url): * lisp/net/goto-addr.el (goto-address-at-point): * lisp/net/mailcap.el (mailcap-mime-info): * lisp/net/rcirc.el (rcirc, rcirc-connect, rcirc-send-string) (rcirc-kill-buffer-hook, rcirc-print, rcirc-when) (rcirc-color-attributes, rcirc-handler-NICK) (rcirc-handler-TAGMSG, rcirc-handler-BATCH): * lisp/net/shr.el (shr-descend, shr-adaptive-fill-function) (shr-correct-dom-case, shr-tag-a): * lisp/net/sieve.el (sieve-manage-quit): * lisp/outline.el (outline-cycle-buffer): * lisp/pcmpl-git.el (pcmpl-git--tracked-file-predicate): * lisp/proced.el (proced-auto-update-timer): * lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-vc): * lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): * lisp/progmodes/c-ts-mode.el (c-ts-mode--preproc-offset) (c-ts-mode--anchor-prev-sibling, c-ts-mode-indent-defun): * lisp/progmodes/compile.el (compilation-error-properties) (compilation-find-file-1): * lisp/progmodes/eglot.el (eglot--check-object) (eglot--read-server, eglot-upgrade-eglot) (eglot-handle-notification, eglot--CompletionParams) (eglot-completion-at-point, eglot--sig-info) (eglot-register-capability): * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load) (elisp-eldoc-var-docstring-with-value): * lisp/progmodes/erts-mode.el (erts-mode--goto-start-of-test): * lisp/progmodes/flymake.el (flymake--update-eol-overlays) (flymake-eldoc-function): * lisp/progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom) (gdb-frame-handler): * lisp/progmodes/go-ts-mode.el (go-ts-mode-docstring) (go-ts-mode--comment-on-previous-line-p) (go-ts-mode--get-test-regexp-at-point) (go-ts-mode-test-this-file): * lisp/progmodes/grep.el (lgrep, rgrep-default-command) (grep-file-at-point): * lisp/progmodes/perl-mode.el (perl--end-of-format-p): * lisp/progmodes/php-ts-mode.el (php-ts-mode--anchor-prev-sibling, php-ts-mode--indent-defun): * lisp/progmodes/project.el (project--other-place-command) (project--find-default-from, project--transplant-file-name) (project-prefixed-buffer-name, project--remove-from-project-list) (project-prompt-project-name, project-remember-projects-under) (project--switch-project-command) (project-uniquify-dirname-transform, project-mode-line-format): * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration) (python--treesit-fontify-union-types) (python-shell-get-process-name, python-shell-restart) (python-shell-completion-at-point, python-ffap-module-path) (python-util-comint-end-of-output-p, python--import-sources) (python-add-import, python-remove-import, python-fix-imports): * lisp/progmodes/xref.el (xref--add-log-current-defun): * lisp/repeat.el (repeat-echo-message-string): * lisp/saveplace.el (save-place-dired-hook): * lisp/server.el (server-save-buffers-kill-terminal): * lisp/shadowfile.el (shadow-make-fullname) (shadow-contract-file-name, shadow-define-literal-group): * lisp/shell.el (shell-highlight-undef-mode): * lisp/simple.el (command-completion-using-modes-p) (command-execute, file-user-uid, file-group-gid) (first-completion, last-completion, switch-to-completions): * lisp/startup.el (startup--load-user-init-file): * lisp/tab-line.el (tab-line-tabs-buffer-group-by-project): * lisp/tar-mode.el (tar-goto-file, tar-next-file-displayer): * lisp/term/android-win.el (android-encode-select-string) (gui-backend-set-selection): * lisp/term/haiku-win.el (haiku-dnd-convert-string) (haiku-select-encode-xstring, haiku-select-encode-utf-8-string): * lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize): * lisp/textmodes/ispell.el (ispell-completion-at-point): * lisp/textmodes/sgml-mode.el (sgml-validate) (html-mode--complete-at-point): * lisp/textmodes/tex-mode.el (tex-recenter-output-buffer) (xref-backend-references): * lisp/thingatpt.el (thing-at-point-file-at-point) (thing-at-point-face-at-point): * lisp/thread.el (thread-list--get-status): * lisp/time.el (world-clock-copy-time-as-kill, world-clock): * lisp/touch-screen.el (touch-screen-handle-touch): * lisp/treesit.el (treesit-language-at, treesit-node-at) (treesit-node-on, treesit-buffer-root-node) (treesit-node-field-name, treesit-local-parsers-at) (treesit-local-parsers-on, treesit--cleanup-local-range-overlays) (treesit-font-lock-recompute-features) (treesit-font-lock-fontify-region, treesit-transpose-sexps) (treesit-add-log-current-defun, treesit-major-mode-setup) (treesit--explorer-refresh, treesit-install-language-grammar): * lisp/url/url.el (url-retrieve-synchronously): * lisp/vc/smerge-mode.el (smerge-diff): * lisp/vc/vc-dir.el (vc-dir): * lisp/vc/vc-dispatcher.el (vc-do-async-command): * lisp/vc/vc-git.el (vc-git-dir--branch-headers) (vc-git-dir--stash-headers, vc-git--log-edit-summary-check) (vc-git-stash-list): * lisp/vc/vc.el (vc-responsible-backend, vc-buffer-sync-fileset) (vc-clone): * lisp/visual-wrap.el (visual-wrap--apply-to-line): * lisp/wid-edit.el (widget-text) (widget-editable-list-insert-before): * lisp/window-tool-bar.el (window-tool-bar--keymap-entry-to-string): * lisp/window.el (display-buffer, display-buffer-full-frame) (window-point-context-set, window-point-context-use) (window-point-context-use-default-function): * lisp/xdg.el (xdg-current-desktop): * lisp/xwidget.el (xwidget-webkit-callback): * lisp/yank-media.el (yank-media--get-selection) (yank-media-types): * test/lisp/comint-tests.el (comint-tests/test-password-function): * test/lisp/completion-preview-tests.el (completion-preview-tests--capf): * test/lisp/cus-edit-tests.el (with-cus-edit-test): * test/lisp/erc/erc-scenarios-base-local-modules.el (-phony-sblm-): * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--on-post-modify): * test/lisp/erc/erc-services-tests.el (erc-services-tests--asp-parse-entry): * test/lisp/erc/erc-tests.el (erc-modules--internal-property) (erc--find-mode, erc-tests--update-modules): * test/lisp/erc/resources/erc-d/erc-d-i.el (erc-d-i--parse-message): * test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-kill-related-buffers, erc-d-t-with-cleanup): * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-i--parse-message--irc-parser-tests): * test/lisp/erc/resources/erc-d/erc-d-u.el (erc-d-u--read-exchange-slowly): * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--expire) (erc-d--finalize-done, erc-d--command-handle-all): * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common-with-cleanup): * test/lisp/erc/resources/erc-tests-common.el (erc-tests--common-display-message) (erc-tests-common-create-subprocess): * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25058): * test/lisp/international/mule-tests.el (mule-cmds-tests--ucs-names-missing-names): * test/lisp/progmodes/python-tests.el (python-tests-get-shell-interpreter) (python-tests--get-interpreter-info): * test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-resource-file): * test/lisp/replace-tests.el (replace-tests-with-undo): * test/src/emacs-tests.el (emacs-tests--seccomp-debug): * test/src/process-tests.el (process-tests--emacs-command) (process-tests--emacs-binary, process-tests--dump-file): * test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Replace use of the now-obsolete if-let and when-let.
* | New user option 'completion-preview-ignore-case'Eshel Yaron2024-09-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Completion Preview mode implicitly assumed that 'completion-ignore-case' is nil, and while it can also work with 'completion-ignore-case' non-nil, the results are a bit different than what you get with 'completion-at-point'. Add an option that controls case sensitivity explicitly and specifically for Completion Preview mode, and clarify the behavior when case differences are ignored. (Bug#73234) * lisp/completion-preview.el (completion-preview-ignore-case): New user option.
* | New variable 'completion-preview-overlay-priority'Eshel Yaron2024-09-041-0/+25
| | | | | | | | | | | | * lisp/completion-preview.el: Update commentary. (completion-preview-overlay-priority): New variable. (completion-preview--make-overlay): Use it. (Bug#72762)
* | ; Inhibit completion preview in read-only buffersEshel Yaron2024-08-211-1/+2
| | | | | | | | | | | | * lisp/completion-preview.el (completion-preview--post-command): Avoid showing completion preview if buffer is read-only.
* | Inherit text props in Completion Preview insertion commandsEshel Yaron2024-06-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When completing with Completion Preview mode commands, inherit text properties from surrounding text similarly to other completion commands, such as 'completion-at-point'. * lisp/completion-preview.el (completion-preview-insert) (completion-preview-partial-insert) (completion-preview-complete): Use 'insert-and-inherit' instead of 'insert' to insert text for completion. * test/lisp/completion-preview-tests.el (completion-preview-insert-inherits-text-properties): New test.
* | ; (completion-preview-partial-insert): Avoid no-op undo entriesEshel Yaron2024-06-281-17/+21
| | | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-partial-insert): Abort change group rather than deleting entire temporary insertion, so as to avoid recording no-op undo entries. Move 'deactivate-mark' let-binding outside of 'catch' form.
* | Minor improvements to new Completion Preview commandsEshel Yaron2024-06-261-79/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/completion-preview.el (Commentary): Mention `completion-preview-partial-insert' and elaborate about `completion-preview-insert-sexp'. (completion-preview--barf-if-no-preview): New function. (completion-preview-insert, completion-preview-complete): Use it. (completion-preview-partial-insert): Rename arg to FUN; only compute (+ end (length aft)) once; bind 'deactivate-mark' to nil while inserting/deleting to allow commands that use this function to work as expected with 'shift-select-mode'; improve behavior when called with point not at the start of the completion preview overlay (e.g. when point is in the middle of a multi-word symbol and this function is called via 'completion-preview-insert-word'); add the base part of the completion candidate to when calling exit-function. (completion-preview-insert-word): Improve docsting, rename argument ARG to N. (completion-preview-insert-sexp): Likewise, and also remove second argument INTERACTIVE. (completion-preview--active-p): Rename to... (completion-preview-active-p): ...this. Make this function public so users can leverage it for their own commands. Extend docstring to explain how to do that. * test/lisp/completion-preview-tests.el (completion-preview-insert-calls-exit-function) (completion-preview-insert-word): Break long lines. (completion-preview-insert-sexp) (completion-preview-insert-nonsubword) (completion-preview-insert-subword): Fix docstrings. (completion-preview-insert-mid-symbol): New test.
* | New commands 'completion-preview-insert-{word,sexp}'Jules Tamagnan2024-06-261-1/+81
|/ | | | | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-partial-insert): New function. (completion-preview-insert-word) (completion-preview-insert-sexp): New commands. (completion-preview-commands): Add them. (Commentary): Document them. (completion-preview-active-mode-map): Add comment. * test/lisp/completion-preview-tests.el (completion-preview-insert-calls-exit-function): Update. (completion-preview-insert-nonsubword) (completion-preview-insert-subword) (completion-preview-insert-sexp): New tests. (Bug#71716)
* New user option 'completion-preview-idle-delay'Eshel Yaron2024-06-051-2/+40
| | | | | | | | | | | | | | Support displaying the completion preview shortly after you pause typing (on idle) rather than immediately. * lisp/completion-preview.el (Commentary): Update. (completion-preview--try-update): (completion-preview--update-from-timer): New functions. (completion-preview--timer): New buffer-local variable. (completion-preview-idle-delay): New user option. (completion-preview--show): Use it. (completion-preview--post-command): (completion-preview-mode): Disable idle timer if active.
* Allow 'completion-preview-require-minimum-symbol-length' to be nilEshel Yaron2024-06-051-5/+10
| | | | | | | | | | | | | | | With some completion backends, completion preview is useful not only after a partial symbol, but also after punctuation and other non-symbol characters. For example, in C code it's helpful to display the completion preview for struct members when point is after 'foo->'. Provide an option to skip the check for minimum symbol length at point in order to support this use case. * lisp/completion-preview.el (completion-preview-minimum-symbol-length): Mention possible nil value in type and docstring. (completion-preview-require-minimum-symbol-length): Skip check if 'completion-preview-minimum-symbol-length' is nil.
* Spelling fixesPaul Eggert2024-06-041-1/+1
|
* ; Refine 'completion-preview-exact' faceEshel Yaron2024-05-241-1/+1
| | | | | | | * lisp/completion-preview.el (completion-preview-exact): Use different underline color to further distinguish this face from 'completion-preview-common', and improve legibility with dark background color.
* ; Exclude a few more modes in 'global-completion-preview-mode'Eshel Yaron2024-05-241-1/+5
| | | | | | * lisp/completion-preview.el (global-completion-preview-mode): Exclude a few non-edit major modes whose definition sets 'major-mode' directly, rather than using 'define-derived-mode'.
* ; Exclude more modes in 'global-completion-preview-mode'Eshel Yaron2024-04-251-1/+8
| | | | | | | | | Avoid activating Completion Preview mode in a few more major modes when 'global-completion-preview-mode' is enabled. * lisp/completion-preview.el (global-completion-preview-mode): By default, exclude a few more major modes for which Completion Preview mode isn't suitable.
* (completion-preview-prev-candidate): add numeric prefix argumentEshel Yaron2024-04-231-10/+12
| | | | | | * lisp/completion-preview.el (completion-preview-prev-candidate): Add numeric prefix argument N. (completion-preview-next-candidate): Update documentation.
* ; Fix Completion Preview mode mouse-click bindingsEshel Yaron2024-04-231-5/+20
| | | | | | | * lisp/completion-preview.el (completion-preview--ignore): New internal command. (completion-preview--internal-commands): Add it. (completion-preview--mouse-map): Use it to fix bindings.
* New command 'completion-preview-complete'Eshel Yaron2024-04-201-76/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command completes the symbol at point up to the longest common prefix of all completions candidates. We also add an indication of the longest common prefix in the completion preview by highlighting that part of the preview with the 'completion-preview-exact' face. To facilitate these features we change the way we store the completion candidates while the preview is visible, to explicitly keep the common prefix along with a list of its suffixes. * lisp/completion-preview.el (completion-preview--try-table): Return longest common prefix and list of suffixes instead of list of full candidates. Add illustrative comment. (completion-preview--capf-wrapper, completion-preview--update) (completion-preview--show, completion-preview-insert) (completion-preview-next-candidate): Adjust. (completion-preview-common): New face. (completion-preview-exact): Tweak to distinguish it from 'completion-preview-common'. (completion-preview-complete): New command. (completion-preview-active-mode-map): Bind it. (completion-preview-mode): Mention it in docstring. (completion-preview-commands): Add 'completion-preview-complete'. (completion-preview--make-overlay): Simplify. (completion-preview--internal-command-p): Remove. (completion-preview-require-certain-commands): Update. (completion-preview--inhibit-update): New inline function. (completion-preview--inhibit-update-p): New local variable. (completion-preview--post-command, completion-preview-hide): Reset it to nil. * test/lisp/completion-preview-tests.el (completion-preview-tests--check-preview): Check the 'face' property of both the first and last character. Update callers. (completion-preview-insert-calls-exit-function) (completion-preview-complete): New tests. (Bug#70381)
* ; Optimize 'completion-preview--try-table'Eshel Yaron2024-04-121-1/+14
| | | | | | | | | | | | * lisp/completion-preview.el (completion-preview-completion-styles): New variable. Default to only include the 'basic' completion style. (completion-preview--try-table): Let-bind 'completion-styles' when calling 'completion-all-completions'. With the default value of 'completion-preview-completion-styles', this yields a significant performance improvement (up to 4 times faster compared to the 'substring' style when tested with 'elisp-completion-at-point'). Suggested by Ergus <spacibba@aol.com>
* ; Remove obsolete 'mouse-wheel-up/down-event' bindingsEshel Yaron2024-04-101-13/+1
| | | | | | | | | | | Following commit e720ba62193 'mouse-wheel-up-event' and 'mouse-wheel-down-event' are translated to 'wheel-up/down' events, so we only need to bind 'wheel-down/up' in 'completion-preview--mouse-map'. * lisp/completion-preview.el: Don't require 'mwheel'. (completion-preview--mouse-map): Remove bindings for 'mouse-wheel-up/down-event'.
* (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel eventsStefan Monnier2024-04-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the handling of the old X11 convention that uses mouse-4/5/6/7 events to represent wheel events: instead of asking downstream packages to use the `mouse-wheel-*-event` variables to know which events represent wheel events, use new var `mouse-wheel-buttons` to directly convert those events into the standard `wheel-up/down/left/right` events used everywhere else. This will simplify the work of packages which can thus just bind their commands to `wheel-up/down/left/right`. * lisp/mouse.el (mouse-wheel-buttons): New custom variable. * src/keyboard.c (make_lispy_event): Adjust for "wheel-clicks" on the tab-bar. * src/xterm.c (x_construct_mouse_click): Add `xi2` argument and obey `mouse-wheel-buttons` variable. (handle_one_xevent): Adjust calls accordingly. (syms_of_xterm): Define the `mouse-wheel-buttons` and the `wheel-up/down/left/right`symbols. * lisp/xt-mouse.el: Don't require `mwheel` any more. (xterm-mouse--same-button-p): Delete function. (xterm-mouse--read-event-sequence): Use `mouse-wheel-buttons`. * lisp/mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event) (mouse-wheel-left-event, mouse-wheel-right-event): Make obsolete. (mouse-wheel-obey-old-style-wheel-buttons): Delete variable. * lisp/completion-preview.el (completion-preview--mouse-map): * lisp/progmodes/flymake.el (flymake--mode-line-counter-map): * lisp/edmacro.el (edmacro-fix-menu-commands): Silence warnings.
* ; Autoload 'global-completion-preview-mode'Eshel Yaron2024-04-031-0/+1
| | | | | * lisp/completion-preview.el (global-completion-preview-mode): Add autoload cookie.
* Add global minor mode 'global-completion-preview-mode'Eshel Yaron2024-03-311-0/+4
| | | | | | | | | | | This is a global variant of 'completion-preview-mode'. * lisp/completion-preview.el (global-completion-preview-mode): New global minor mode. * doc/emacs/programs.texi (Symbol Completion): Document it. * etc/NEWS: Announce it. (Bug#70010)
* ; Fix mid-symbol updating/cycling completion previewEshel Yaron2024-02-211-12/+12
| | | | | | | | | | | | | | | | This fixes an issue where 'completion-preview-next-candidate' would fail to take into account the part of the symbol that follows point (the suffix) when point is at the middle of a symbol, as well as a similar issue in 'completion-preview--show' that would manifest with slow 'completion-at-point-functions'. * lisp/completion-preview.el (completion-preview-next-candidate) (completion-preview--show): Ensure that the completion preview remains at the end of a symbol, when updating it while point is in the middle of that symbol. * test/lisp/completion-preview-tests.el (completion-preview-mid-symbol-cycle): New test. (Bug#68875)
* Take stock of the wheel-up/down confusionStefan Monnier2024-01-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | While we're hopefully all aware of the usual confusion between the scroll operation moving the document or moving the viewport, Emacs has its very own instance of that confusion where the `mouse-wheel-down-event` variable is the one that (used to) hold the value `wheel-up` and vice versa. Thanks for Po Lu's commit 957b4f826a4 which not only fixed my change but brought that confusion to my attention. This patch doesn't fix the problem, but tries to fix the other places in the code where we did not take it into account. * doc/lispref/commands.texi (Misc Events): Mention the wheel-up/down confusion. * lisp/progmodes/flymake.el (flymake--mode-line-counter-map): * lisp/completion-preview.el (completion-preview--mouse-map): Fix wheel-up/down confusion. * lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event): Fix docstrings.
* mwheel.el: Remove `mouse-wheel-*-alternate-event` varsStefan Monnier2024-01-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | Now that `wheel-DIR` events are hardcoded, we never need more than one variable (which we actually never needed anyway, we could have let `mouse-wheel-*-event` vars hold lists of events instead), so remove the `mouse-wheel-*-alternate-event` vars by merging their default value into that of the corresponding `mouse-wheel-*-event`. * lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event) (mouse-wheel-left-event, mouse-wheel-right-event): Don't bother holding `wheel-DIR` events since these are already handled anyway. Hold the event that would have been held in `mouse-wheel-DIR-alternate-event` instead. (mouse-wheel-down-alternate-event, mouse-wheel-up-alternate-event) (mouse-wheel-left-alternate-event, mouse-wheel-right-alternate-event): Delete vars. (mwheel--is-dir-p, mouse-wheel--setup-bindings): * lisp/edmacro.el (edmacro-fix-menu-commands): * lisp/completion-preview.el (completion-preview--mouse-map): Don't use `mouse-wheel-up/down-alternate-event` any more. * lisp/progmodes/flymake.el (flymake--mode-line-counter-map): Do nothing, because it already ignored those vars.
* mwheel.el: Unconditionally use the `wheel-up/down/...` eventsStefan Monnier2024-01-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | The `mouse-wheel-DIR-event` vars were introduced because under X11 we get different `mouse-N` events depending on the users' mouse and those same events can be used for other things for other rodents, so we can't unconditionally treat those events as mouse-wheel events. But this does not apply to the `wheel-up/down/...` events. So hard code them. * lisp/mwheel.el (mwheel--is-dir-p): Always consider the `wheel-DIR` events. (mouse-wheel--setup-bindings): Always bind the `wheel-DIR` events. * lisp/completion-preview.el (completion-preview--mouse-map): Unconditionally bind the `wheel-DIR` events. * lisp/edmacro.el (edmacro-fix-menu-commands): Hard code the `wheel-DIR` events as mouse events regardless of `mouse-wheel-*-event`s. * lisp/progmodes/flymake.el (flymake--mode-line-counter-map): Do nothing, because it's already been done in commit e5be6c7ae309. * doc/lispref/commands.texi (Misc Events): Document the need to use `wheel-up/down/left/right` unconditionally.
* * lisp/completion-preview.el: Fix use in non-GUI sessionStefan Monnier2024-01-201-8/+10
| | | | | | | | | | | Fix loading in non-GUI sessions where `mwheel` is not preloaded. Not requiring `mwheel` would be a lot more complex, since it would require delaying the construction of `completion-preview--mouse-map`. * lisp/completion-preview.el (<toplevel>): Require `mwheel`. Remove correspondingly redundant `defvar`s. (completion-preview--mouse-map): Use `key-description` rather than mimicking it with `format`.
* ; Fix compilation errors in completion-preview.elEli Zaretskii2024-01-021-0/+4
| | | | | | | * lisp/completion-preview.el (mouse-wheel-up-event) (mouse-wheel-up-alternate-event, mouse-wheel-down-event) (mouse-wheel-down-alternate-event): Defvar, to avoid warnings and errors in builds --without-x. (Bug#68213)
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|