* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Fix the last argument in xref-find-all-definitions calls.
Use the renamed 'xref-find-all-definitions' in Eglot
* lisp/progmodes/eglot.el (eglot-find-declaration)
(eglot-find-implementation, eglot-find-typeDefinition):
Use the renamed 'xref-find-all-definitions'.
Rename xref-find-definitions-by-kind to xref-find-all-definitions
* lisp/progmodes/xref.el (xref-find-all-definitions): Rename from
'xref-find-definitions-by-kind' and change accordingly. Meaning
it collects definitions from all "kinds" by default (passing
through 'delete-dups', which only works if the items are
structurally the same) and asks for specific KIND only when called
with a prefix argument.
Rename the xref-backend-extra-* methods to use the term definition
Because they are not "extra", and to a large extent will contain
"kinds" already included in the 'xref-find-definitions' output.
* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): Remove the entry
for 'references' because of differing semantics. Simplify the names
of the keys as well (remove the 'eglot--xref-' prefix) because these
are shown to the user. They won't be sent to any other backend, so
private names seem unnecessary. Use strings, to ensure specific type.
* lisp/progmodes/xref.el (xref-backend-definition-kinds):
Rename from 'xref-backend-extra-kinds'. Update all references.
(xref-xref-backend-definitions-by-kind): Rename from
'xref-backend-extra-defs'. Update all references.
2792031...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Eglot: use new xref-find-extra feature of Xref
This removes the need of some Eglot hacks to implement the commands
eglot-find-declaration, eglot-find-implementation, and
eglot-find-typeDefinition.
It also allows the new command xref-find-extra to find different kinds
of definitions.
* lisp/progmodes/eglot.el (eglot--xref-kinds-alist): New variable.
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Use xref-find-extra.
(xref-backend-definitions): Minor tweak.
(xref-backend-references): Don't use eglot--lsp-xref-refs.
(eglot--lsp-xref-helper): Delete this helper.
(eglot--lsp-xref-refs): Delete this variable.
(xref-backend-extra-kinds, xref-backend-extra-defs): New implementation.
963ccb4...
by
=?utf-8?b?Sm/Do28gVMOhdm9yYQ==?= <email address hidden>
Xref: make xref-find-extra useful for non-interactive use
* lisp/progmodes/xref.el (xref-find-extra): Put interactive parts
inside interactive spec. Make versatile for non-interactive use.
* lisp/progmodes/elisp-mode.el (xref-backend-extra-kinds):
Implement for elisp backend.
* lisp/progmodes/xref.el (xref-backend-extra-kinds)
(xref-backend-extra-defs): New generic functions.
(xref-prompt-for-identifier): Tweak.
(xref--create-fetcher): Rework.
(xref-find-extra): New command.
505edce...
by
Spencer Baugh <email address hidden>
Use the project--list as history when prompting for a project
The project--list is already ordered such that the most recently used
projects are at the front. Now we use it as the minibuffer history
when prompting for a project.
To avoid savehist from picking up project--list as a minibuffer
history variable and overriding our own persistence mechanism, we
don't pass project--list directly as a history variable, but instead
pass project--dir-history or project--name-history, dynamically-bound
to an appropriate value. project--dir-history and
project--name-history won't be persisted since they're always unbound
at the top level; but if they are persisted anyway somehow, it won't
affect us.
If we later find a way to rely on savehist for persistence instead of
having our own mechanism, we can change the in-memory format of
project--list to be just a list of directories, and our explicit calls
to project--add-dir can be replaced by let-binding
history-delete-duplicates=t, history-length=t.
* lisp/progmodes/project.el (project--remember-dir): Add.
(project-remember-project): Use project--remember-dir.
(project--name-history, project-prompt-project-name)
(project--dir-history, project-prompt-project-dir): Pass a
preprocessed project--list as HIST to completing-read. (bug#67310)
(project-switch-project): Call project--remember-dir.
2ed9c9f...
by
"F. Jason Park" <email address hidden>
Optionally allow substitution patterns in erc-prompt
* etc/ERC-NEWS: Add entry for `erc-prompt-format'.
* lisp/erc/erc-compat.el (erc-compat--defer-format-spec-in-buffer):
New macro to wrap `format-spec' specification values in functions that
run in the current buffer and fall back to the empty string.
* lisp/erc/erc.el (erc-prompt): Add predefined Custom choice for
function type in `erc-prompt-format'.
(erc--prompt-format-face-example): New "pre-propertized" value for
option `erc-prompt-format'.
(erc-prompt-format): New companion option for `erc-prompt' choice
`erc-prompt-format'. New function of the same name to perform format
substitutions and serve as a Custom choice value for `erc-prompt'.
Based on work and ideas originally proposed by Stefan Kangas.
(erc--away-indicator, erc-away-status-indicator,
erc--format-away-indicator): New formatting function and helper
variables for displaying short away status.
(erc--user-modes-indicator): New variable.
(erc--format-user-modes): New function.
(erc--format-channel-status-prefix): New function.
(erc--format-modes): New function.
* test/lisp/erc/erc-scenarios-prompt-format.el: New file. (Bug#51082)
Co-authored-by: Stefan Kangas <email address hidden>