| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-auto-jump-to-first-definition)
(xref-auto-jump-to-first-xref): New user options.
Discussed in bug#50067.
(xref--show-xrefs, xref--show-defs): Use them here.
(xref--auto-jump-first): New function, handles different values.
(xref-show-definitions-buffer)
(xref-show-definitions-buffer-at-bottom): Use it.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-select-and-show-xref):
Rename from xref-select-and-goto-xref (bug#35376).
Update all references.
|
|
|
|
|
|
|
|
|
| |
* doc/emacs/maintaining.texi (Xref Commands): `mouse-1' is bound
to `xref-goto-xref', not `mouse-2' (bug#35376).
(Xref Commands): Mention what `mouse-2' does.
* lisp/progmodes/xref.el (xref--button-map): Adjust.
(xref-select-and-goto-xref): Rename from xref--mouse-2 (bug#35376).
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--set-arrow): New function.
(xref-show-location-at-point, xref-goto-xref)
(xref--next-error-function): Call it.
(xref--show-common-initialize): Remove arrow.
|
|
|
|
|
|
|
|
|
| |
The new entry appears next to "Find Definition" and like it only
appears when the context menu was invoked on an identifier.
* lisp/progmodes/prog-mode.el (prog-context-menu): New menu entry.
* lisp/progmodes/xref.el (xref-find-references-at-mouse): New
function, analogous to `xref-find-definitions-at-mouse`.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-backend-references): Add messages to
show the user that something is happening instead of silently freezing
during the frequently long synchronous searches for references.
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-match-item): Change type for
:location from `xref-file-location`, which was likely a mistake,
to `xref-location`. This allows `xref-make-match` to take
arguments of any subtype of `xref-location` (bug#50067).
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-find-definitions): Mention 'M-,' in
the doc string.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--next-error-function):
Bind `xref--current-item` during the call to `xref--show-location` so
that `xref-pulse-momentarily` finds the match extent.
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-find-apropos):
Provide a default for the pattern (bug#49731).
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-goto-xref):
Change the error message (bug#49846).
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of multiple items in one group without line numbers
(mentioned in bug#49731).
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of line numbers when we have multiple files with
(e.g.) single match on the same line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/grep.el (grep-compute-defaults):
Add '-H' to grep-find-template (bug#48471).
* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Pass the root directory name without the trailing slash.
* lisp/progmodes/xref.el (xref-matches-in-directory): Ditto.
* test/lisp/progmodes/xref-tests.el (xref--xref-file-name-display-is-abs)
(xref--xref-file-name-display-is-relative-to-project-root):
Make tests more strict again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A completion table can specify a `group-function` in its metadata.
The group function takes two arguments, a completion candidate and a
transform argument. The group function is used to group the
candidates after sorting and to enhance the completion UI with group
titles.
If the transform argument is nil, the function must return the title
of the group to which the completion candidate belongs. The function
may also return nil if the candidate does not belong to a group.
If the transform argument is non-nil, the function must return the
transformed candidate. For example, the transformation allows to
remove a redundant part of the candidate, which is then displayed in
the title.
The grouping functionality is guarded by the customizable variable
`completions-group` and turned off by default for the *Completions*
buffer.
The specific form of the `group-function` has been chosen in order to
allow allocation-free grouping. This is important for completion UIs,
which continously update the displayed set of candidates (Icomplete,
Vertico, Ivy, etc.). Only when the transform argument is non-nil the
candidate transformation is performed, which may involve a string
allocation as done in the function `xref--completing-read-group`.
The function `xref-show-definitions-completing-read` makes use of the
`group-function`, by moving the file name prefix to the title. If
grouping is enabled, the *Completions* are displayed as
"linenum:summary" instead of "file:linenum:summary". This way the
*Completions* buffer resembles the *Occur* buffer.
* doc/lispref/minibuf.texi: Add documentation.
* lisp/minibuffer.el (completion-metadata): Describe the
`group-function` in the docstring.
(completions-group): Add guard variable, off by default.
(completions-group-format): Add variable defining the format string
for the group titles.
(completions-group-title): Add face used by `completions-group-format`
for the group titles.
(completions-group-separator): Add face used by
`completions-group-format` for the group separator lines.
(minibuffer--group-by): New grouping function.
(minibuffer-completion-help): Use it.
(display-completion-list): Add optional GROUP-FUN argument.
(completion--insert-strings): Add optional GROUP-FUN argument. Insert
group titles if `completions-format` is `one-column`. Transform each
candidate with the GROUP-FUN. Attach the untransformed candidate to
the property `completion--string`.
* lisp/simple.el (choose-completion): Retrieve the untransformed
completion candidate from the property `completion--string`.
* lisp/progmodes/xref.el:
(xref--completing-read-group): New grouping function.
(xref-show-definitions-completing-read): Use it.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-truncation-width): New option.
(xref--apply-truncation): New function.
(xref--insert-xrefs): Use it (bug#46859).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* doc/emacs/maintaining.texi (Xref Commands): Remove the
description of the TAB binding. Enhance the description of the
RET binding. (Bug#44611)
* etc/NEWS: Announce the obsolescence of TAB binding in XREF.
* lisp/progmodes/xref.el (xref-goto-xref): Improve doc string.
|
|
|
|
|
|
|
| |
This reverts commit 522c34f0e80f60969861b0dc34bc7105249f9994.
Making changes to which there was an explicit disagreement
and a long discussion is unacceptable. (Bug#44611)
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--xref-buffer-mode-map):
Remove the binding for xref-quit-and-goto-xref (bug#44611).
* doc/emacs/maintaining.texi (Xref Commands): Update.
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/project.el (project--find-regexp-in-files):
Don't unquote file names here.
* lisp/progmodes/xref.el (xref-matches-in-files): Do it here.
And only if the first element in the list is quoted (bug#47799).
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/project.el (project--files-in-directory):
Quote LOCALDIR a bit earlier, to affect
xref--find-ignores-arguments as well (bug#47799).
* lisp/progmodes/xref.el (xref-matches-in-directory):
Quote the dir passed to xref--rgrep-command.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-file-name-display): Change the default value
to 'project-relative' (bug#47012).
(xref-match)<face>: Inherit from 'match'.
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--read-identifier)
(xref-find-definitions, xref-find-definitions-other-window)
(xref-find-definitions-other-frame, xref-find-references):
Undo the latest change for Emacs 26 compatibility (bug#47286).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/cmuscheme.el (scheme-load-file, scheme-compile-file):
* lisp/comint.el (comint-get-source):
* lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer)
(viper-query-replace, viper-read-string-with-history):
* lisp/eshell/esh-mode.el (eshell-find-tag):
* lisp/gnus/gnus-sum.el (gnus-articles-to-read)
(gnus-summary-search-article-forward)
(gnus-summary-search-article-backward):
* lisp/international/mule-cmds.el (set-input-method, toggle-input-method)
(describe-input-method, set-language-environment)
(describe-language-environment):
* lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition):
* lisp/mh-e/mh-letter.el (mh-insert-letter):
* lisp/mh-e/mh-mime.el (mh-display-with-external-viewer)
(mh-mime-save-parts, mh-mh-forward-message)
(mh-mml-query-cryptographic-method, mh-minibuffer-read-type):
* lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range):
* lisp/mh-e/mh-utils.el (mh-prompt-for-folder):
* lisp/progmodes/etags.el (find-tag-tag):
(find-tag-noselect, find-tag, find-tag-other-window)
(find-tag-other-frame, find-tag-regexp):
* lisp/progmodes/idlwave.el (idlwave-find-module):
* lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file):
* lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/xref.el (xref--read-identifier):
(xref-find-definitions, xref-find-definitions-other-window)
(xref-find-definitions-other-frame, xref-find-references):
* lisp/ses.el (ses-read-printer):
(ses-read-cell-printer, ses-read-column-printer)
(ses-read-default-printer, ses-define-local-printer):
* lisp/subr.el (read-number):
* lisp/term.el (term-get-source):
* src/minibuf.c (read-buffer): Remove prompt suffix and
use 'format-prompt'.
* lisp/minibuffer.el (format-prompt): Ignore DEFAULT empty strings
(bug#47286).
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-next-line-no-show)
(xref-prev-line-no-show): New commands.
(xref-next-line, xref-prev-line): Use them.
|
|
|
|
| |
(xref--insert-xrefs): Use run-hooks on it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--insert-xrefs): Cut up the current
line into pieces here for multiple matches's summaries, so that
xref--insert-xrefs can do less work (bug#46859).
(xref--insert-xrefs): Do less work.
(xref--outdated-p):
Update accordingly to how the summary creation logic changed.
(xref--buf-pairs-iterator): Update to the new calling convention.
(xref-location-column): Effectively rename back to
xref-file-location-column since the generic version is now unused.
* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-finds-two-matches-on-the-same-line)
(xref-matches-in-directory-finds-an-empty-line-regexp-match):
Adjust to the xref-location-column change.
(xref-matches-in-files-trims-summary-for-matches-on-same-line):
New test.
* test/lisp/progmodes/xref-resources/file1.txt:
Change contents slightly to test the new xref--outdated-p code.
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-revert-buffer):
Also 'erase-buffer' when handling a user-error (bug#46042).
|
|
|
|
|
|
|
| |
* lisp/progmodes/project.el: Change Package-Requires to Emacs 26.1
(bug#44671).
* lisp/progmodes/xref.el: Ditto.
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-revert-buffer):
Erase the buffer only after fetching the new contents (bug#46042).
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Make sure the new window is not too tall (bug#45945).
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-quit-and-pop-marker-stack):
New command.
(xref--xref-buffer-mode-map): Binding for it.
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--show-xref-buffer):
Pick up default-directory value from the caller
(https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00551.html).
(xref-show-definitions-buffer-at-bottom): Same.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/project.el (project--files-in-directory):
Make sure the directory includes the trailing slash in case it's
a symlink, discussed in
https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00345.html.
* lisp/progmodes/xref.el (xref-matches-in-directory): Same.
* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Same.
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--show-pos-in-buf):
Don't set other-window-scroll-buffer (bug#45581).
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-show-definitions-completing-read):
Default to the first location.
|
|
|
|
| |
Run "TZ=UTC0 admin/update-copyright".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-file-name-display): Document new value.
(xref-location-group ((l xref-file-location))): Handle the new value.
(xref--project-root): Extract from the default method of
'xref-backend-references' so it can be used in above's new code.
Also fix an old bug in the "backward compat" branch.
* lisp/progmodes/xref.el (xref--project-root-memo): New variable.
* test/lisp/progmodes/xref-tests.el: Add test cases for the three
possible settings of 'xref-file-name-display'.
Co-authored-by: Tobias Rittweiler <trittweiler@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* lisp/minibuffer.el (completion-category-defaults)
Use 'substring' completion style for 'xref-location' category by
default.
* lisp/progmodes/xref.el (xref-show-definitions-completing-read):
Assign the 'xref-location' category to the completions. Pass
REQUIRE-MATCH=t.
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-show-definitions-buffer): Rename
from 'xref--show-defs-buffer'.
(xref-show-definitions-buffer-at-bottom): Rename from
'xref--show-defs-buffer-at-bottom'.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-location-column):
Create a generic from xref-file-location-column, to use in the
common rendering code (bug#36967).
(xref--insert-xrefs): Update accordingly.
* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-finds-two-matches-on-the-same-line)
(xref-matches-in-directory-finds-an-empty-line-regexp-match):
Ditto.
|
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--insert-xrefs):
Render matches coming from the same line together (bug#36967).
(xref--item-at-point): Account for the above.
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-search-program-alist)
(xref-search-program): Add :version and :package-version.
|