summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xref.el
Commit message (Collapse)AuthorAgeFilesLines
...
* | xref-find-references-and-replace: New commandDmitry Gutov2022-01-141-0/+16
| | | | | | | | | | * lisp/progmodes/xref.el (xref-find-references-and-replace): New command.
* | Steamline xref-query-replace-in-resultsDmitry Gutov2022-01-141-4/+13
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref-query-replace-in-results): Steamline the most common scenario (https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00864.html).
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2021-12-241-2/+14
|\| | | | | | | | | 04be23f19f Improve Xref documentation edb1d491d9 * lisp/net/shr.el (shr-expand-url): Also strip trailing wh...
| * Improve Xref documentationDmitry Gutov2021-12-241-2/+14
| | | | | | | | | | * lisp/progmodes/xref.el (xref-item): Add docstring for 'summary'. Fix typo in the header Commentary.
* | Avoid adding duplicates to Xref historyMattias Engdegård2021-11-181-6/+16
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref--push-backward, xref--push-forward): New functions. (xref-push-marker-stack, xref-go-back, xref-go-forward): Use them.
* | Merge from origin/emacs-28Stefan Kangas2021-11-131-1/+1
|\| | | | | | | | | 42d4e24ff3 ; Fix typos 0d0125daae Improve documentation of 'decode-coding-region'
| * ; Fix typosStefan Kangas2021-11-121-1/+1
| |
* | Revert "* lisp/progmodes/xref.el (xref-pop-marker-stack): Don't obsolete."Mattias Engdegård2021-11-041-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit f56408a6f0152cd46d1ea8a0985fbfeeb839ea06. As commented by Dmitry Gutov in [1], obsoleting `xref-pop-marker-stack` makes sense. [1] https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg01870.html
* | * lisp/progmodes/xref.el (xref-pop-marker-stack): Don't obsolete.Mattias Engdegård2021-10-261-1/+1
| |
* | Rename `xref-pop-marker-stack` to `xref-go-back` (bug#38797)Mattias Engdegård2021-10-251-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is the natural name after the addition of `xref-go-forward`. The old name is retained as an alias. * lisp/progmodes/xref.el (xref-pop-marker-stack): Rename. (xref-go-forward, xref-quit-and-pop-marker-stack) (xref-find-definitions): * lisp/menu-bar.el (menu-bar-goto-menu): * lisp/progmodes/etags.el (find-tag-marker-ring, pop-tag-mark): * lisp/progmodes/prog-mode.el (prog-context-menu): * doc/emacs/maintaining.texi (Looking Up Identifiers): * etc/NEWS: Use the new name.
* | Add xref forward history (bug#38797)Mattias Engdegård2021-10-251-32/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to go forward as well as back in the Xref history. The new `xref-go-forward` is bound to `C-M-,`. * lisp/progmodes/etags.el (find-tag-marker-ring-length): Update. (tags-location-ring-length): New. (find-tag-marker-ring): Keep as dummy. (tags-location-ring, tags-reset-tags-tables): Use `tags-location-ring-length` instead of `xref-marker-ring-length`. * lisp/progmodes/xref.el (xref-marker-ring-length, xref-marker-ring) (xref-set-marker-ring-length): Make obsolete. (xref--history, xref-go-forward, xref-forward-history-empty-p): New. (xref-push-marker-stack, xref-pop-marker-stack) (xref-clear-marker-stack, xref-marker-stack-empty-p): Use `xref--history`. * lisp/menu-bar.el (menu-bar-goto-menu): Add Forward entry. * doc/emacs/maintaining.texi (Looking Up Identifiers): Document. * etc/NEWS: Announce.
* | xref.el: Better compatibility with outdated Emacs 28 buildsDmitry Gutov2021-10-201-2/+2
| | | | | | | | | | | | * lisp/progmodes/xref.el: Ensure better compatibility with outdated Emacs 28 builds as well (like the pgtk branch). Bump the version.
* | * lisp/progmodes/xref.el: Bump version.Dmitry Gutov2021-10-191-1/+1
| |
* | Fix Emacs 26 support in xref.elDmitry Gutov2021-10-191-7/+14
| | | | | | | | | | * lisp/progmodes/xref.el (xref--defstruct): New macro. (xref-item, xref-match-item): Use it in definitions.
* | Merge from origin/emacs-28Glenn Morris2021-10-091-55/+55
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 394209c1a0 (origin/emacs-28) ; Fix indentation in etc/NEWS 81f20e8b89 Fix thinko in ls-lisp--insert-directory ec9f25bd35 Mention that RET means "yes" in y-or-n-p 00eb21c897 ; * src/dispextern.h (struct glyph_string): Comment on NCH... 20eb3644ba Rewrite Antinews for Emacs 28 3a9b881603 ; * etc/NEWS: Rearrange the "incompatible changes" sections. ebb7e26013 ; * etc/NEWS: Fix a typo. 315fe20086 ; * src/Makefile.in (../native-lisp): Add comment. 47cbd103f5 * lisp/bindings.el (mode-line-position): Improve tooltip. 35a752863a * lisp/progmodes/xref.el: Bump the version. bbcd8cc1a9 Slight simplificaiton e139dd1b1e Fix doc strings of 2 categories 59782839cb (xref--collect-matches-1): Remove some intermediate alloca... 1c7d056f4d ; Fix two typos where em dash was written as en dash # Conflicts: # etc/NEWS
| * * lisp/progmodes/xref.el: Bump the version.Dmitry Gutov2021-10-091-1/+1
| |
| * Slight simplificaitonDmitry Gutov2021-10-091-28/+26
| | | | | | | | | | * lisp/progmodes/xref.el (xref--insert-xrefs): Compute log only once. Use 'dolist'.
| * (xref--collect-matches-1): Remove some intermediate allocationsDmitry Gutov2021-10-081-26/+28
| | | | | | | | | | | | * lisp/progmodes/xref.el: (xref--collect-matches-1): Rewrite to remove some intermediate allocations. Modest performance improvement.
* | Merge from origin/emacs-28Glenn Morris2021-10-081-0/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | af01b674ce (origin/emacs-28) ; Fix spacing in previous commit 915e044d60 Use the correct label in the warning 6e83a4100a ; * admin/make-tarball.txt: Should configure --with-native... 525602d682 ; * etc/TODO (display): Add entry about Default_Ignorables. 65de510c16 ; Fix 'restore-buffer-modified-p' doc string typo 9d8202b45e Add Emacs 27 compatibility hack 89d64fca75 Pacify GCC 10.3 -Wmaybe-uninitialized bb8ef1aa30 * lisp/tab-bar.el (tab-detach, tab-window-detach): New ali... 7ae70054aa ; * src/composite.h (LGSTRING_FONT): Add comment about its... 1af00e67d6 Include the refcards in the release tarball 3c29fb705c ; * src/Makefile.in (../native-lisp): Make the long recipe...
| * Add Emacs 27 compatibility hackDmitry Gutov2021-10-081-0/+14
| | | | | | | | | | * lisp/progmodes/xref.el: Add Emacs 27 compatibility hack, for the standalone version of this package.
* | Merge from origin/emacs-28Glenn Morris2021-10-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1ccd3eb721 (origin/emacs-28) ; Fix typo in etc/NEWS 0f28ee94ac * NEWS: Mention rcirc connects to #emacs by default aacafbe267 Refactor mh-utils-tests macro 'with-mh-test-env' ead5c5cc51 Avoid using variable before it has been initialized b2c50d7cf3 Clarify docstring of blink-matching-paren d2a34cabcf ; Very minor touch-up to a recent change 36a7ce4393 ; * doc/emacs/trouble.texi (After a Crash): Fix typo. 1cd1b2835b * doc/misc/gnus.texi (Loose Threads): Use regexp-opt in ex... 9f041cdfac Bump project.el version ad2287e659 Retain compatibility with older project.el projects d86b2e59c7 native-comp-available-p is the definitive test 1b383ac424 Minor fix of a recently installed documentation change 4d76765b6c Fix md5 issue in recent Gnulib merge 18308b739a Tweak recent 'configure' fix # Conflicts: # etc/NEWS
| * Retain compatibility with older project.el projectsDmitry Gutov2021-10-051-1/+1
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref--analyze): Retain compatibility with older project.el and its compatible project definitions (for standalone Xref from ELPA).
* | Use format-prompt for many more promptsStefan Kangas2021-10-051-6/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bookmark.el (bookmark-completing-read): * lisp/calc/calc-prog.el (calc-user-define-formula): * lisp/calc/calc-store.el (calc-permanent-variable): * lisp/calc/calc-units.el (calc-convert-units) (calc-convert-exact-units, calc-convert-temperature): * lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine): * lisp/cus-edit.el (customize-read-group): * lisp/dired-aux.el (dired-do-chxxx): * lisp/dired-x.el (dired-mark-unmarked-files): * lisp/emacs-lisp/debug.el (cancel-debug-on-entry) (cancel-debug-on-variable-change): * lisp/emacs-lisp/edebug.el (edebug-cancel-on-entry) (edebug-remove-instrumentation): * lisp/epa.el (epa-read-file-name, epa-export-keys): * lisp/faces.el (read-face-name): * lisp/format.el (format-decode-buffer, format-decode-region): * lisp/gnus/gnus-art.el (gnus-read-save-file-name): * lisp/gnus/gnus-util.el (gnus-completing-read): * lisp/gnus/message.el (message-check-news-header-syntax): * lisp/info.el (Info-follow-reference): * lisp/international/mule-diag.el (describe-font) (describe-fontset): * lisp/international/quail.el (quail-show-keyboard-layout): * lisp/language/cyril-util.el (standard-display-cyrillic-translit): * lisp/mail/rmailkwd.el (rmail-read-label): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/mail/rmailout.el (rmail-output-read-file-name): * lisp/man.el (Man-goto-section, Man-follow-manual-reference): * lisp/menu-bar.el (emacs-index--prompt): * lisp/net/ange-ftp.el (ange-ftp-get-passwd): * lisp/proced.el (proced-send-signal): * lisp/progmodes/cpp.el (cpp-choose-face): * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/progmodes/grep.el (grep-read-files): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/pascal.el (pascal-goto-defun): * lisp/progmodes/prolog.el (prolog-read-predicate): * lisp/progmodes/sql.el (sql-get-login-ext): * lisp/ses.el (ses-define-local-printer): * lisp/textmodes/artist.el (artist-figlet-choose-font): * lisp/textmodes/tex-mode.el (tex-compile): * lisp/vc/diff.el (diff): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/ediff-util.el (ediff-read-file-name): * lisp/vc/pcvs.el (cvs-mode-mark-on-state): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-revision-other-window, vc-retrieve-tag): * lisp/wid-edit.el: Prefer format-prompt unconditionally. * lisp/org/org-capture.el (org-capture-fill-template): * lisp/org/org-refile.el (org-refile-get-location): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): * lisp/progmodes/xref.el (xref--read-identifier): Prefer format-prompt when it is fboundp.
* ; s/class/typeDmitry Gutov2021-10-011-2/+2
|
* Migrate Xref off EIEIODmitry Gutov2021-10-011-89/+65
| | | | | | | | | | | | | | | | | | | | | | To improve performance and flexibility (bug#50777). * lisp/progmodes/xref.el (xref-location): Remove. (xref-file-location): Change to cl-struct. (xref-buffer-location, xref-bogus-location): Ditto. (xref-item, xref-match-item): Same. And update all method definitions accordingly. (xref--insert-xrefs): Don't use 'oref', use 'xref-item-location'. (xref--insert-xrefs, xref-show-definitions-completing-read): Insetad of 'with-slots', use 'xref-item-summary' and 'xref-item-location'. * lisp/progmodes/etags.el (xref-etags-location): Change from EIEIO class into a cl-struct. (xref-etags-apropos-location): Ditto. Update all method definitions. * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run): Avoid using 'oref'.
* ; Remove various duplicated wordsMattias Engdegård2021-09-251-1/+1
| | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Extending Rx): * doc/lispref/strings.texi (Creating Strings): * doc/misc/modus-themes.org (Measure color contrast (DIY)): * etc/NEWS: * lisp/find-file.el (ff-find-other-file): * lisp/gnus/gnus-group.el (gnus-group-suspend): * lisp/progmodes/cc-langs.el (c-ml-string-any-closer-re): * lisp/progmodes/flymake.el (flymake-list-only-diagnostics): * lisp/progmodes/xref.el (xref--group-name-for-display): * lisp/transient.el (transient-child, transient-files) (transient-infix-value): * src/alloc.c: * src/regex-emacs.c (regex_compile): Remove duplicate words in comments, documentation etc.
* 'xref-search-program'-related doc string fixesLars Ingebrigtsen2021-09-251-2/+9
| | | | | | * lisp/progmodes/xref.el (xref-search-program): Mention what this variable controls. (xref-matches-in-files): Mention the variables that controls it.
* A bit less overhead when converting hitsDmitry Gutov2021-09-231-5/+7
| | | | | | * lisp/progmodes/xref.el (xref--collect-matches): Move 'remote-id' and 'syntax-needed' definitions to the caller function. Bind 'inhibit-modification-hooks' to t (bug#50733).
* More per-match overhead reductionDmitry Gutov2021-09-231-13/+15
| | | | | | * lisp/progmodes/xref.el (xref--show-common-initialize) (xref-revert-buffer): Inhibit modification hooks (bug#50733). (xref--insert-xrefs): Cosmetics (no measurable difference here).
* xref-matches-in-files: Decrease per match and per group overheadDmitry Gutov2021-09-231-13/+11
| | | | | | | | * lisp/progmodes/xref.el (xref-search-program-alist): Add '--null' argument for slightly faster parsing and probably better behavior with weirder file names. (xref--alistify): Don't accept TEST argument, use 'assoc' instead of 'cl-assoc', use a tash table during sorting (bug#50733).
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-1/+1
|
* xref-matches-in-files: Move sorting to LispDmitry Gutov2021-09-171-8/+12
| | | | | | | | | | | For better compatibility with different systems. Performance is unaffected, except in very pathological cases (~100000 matches), and even then the overhead of 'sort' is comparable. * lisp/progmodes/xref.el (xref-search-program-alist): Drop the piping through 'sort'. (xref-matches-in-files): Sort here instead. Do that to both searchers' output as well now.
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-7/+7
|
* Extend xref-file-name-display to elisp and etags definitionsDmitry Gutov2021-09-131-34/+48
| | | | | | | | | | | And all other types of locations (with a looks-like-file-name check). * lisp/progmodes/xref.el (xref--group-name-for-display): Extract from xref-buffer-location's implementation of xref-location-group. (xref-file-location): Define trivial reader for the 'file' slot. (xref-location-group): Update docstring. (xref--analyze): Use the new function here, to be able to format group names coming from any location type.
* Doc string followup to last change.Eli Zaretskii2021-09-101-1/+3
| | | | | | | * lisp/progmodes/xref.el (xref-find-apropos): Mention 'tags-apropos-additional-actions' in the doc string. * lisp/progmodes/etags.el (tags-apropos-additional-actions): Mention 'xref-find-apropos' in the doc string.
* Fix a recent documentation changeEli Zaretskii2021-09-071-2/+2
| | | | | | * lisp/progmodes/xref.el (xref-auto-jump-to-first-definition) (xref-auto-jump-to-first-xref): * etc/NEWS: Fix wording and typos.
* Improve documentation of new Xref optionsEli Zaretskii2021-09-071-4/+9
| | | | | | | | | | | | | | | * lisp/progmodes/xref.el (xref-auto-jump-to-first-definition) (xref-auto-jump-to-first-xref): More accurate description in the doc strings. * doc/emacs/maintaining.texi (Looking Up Identifiers) (Identifier Search, List Identifiers, Project File Commands): Fix the documentation of 'xref-auto-jump-to-first-definition' and 'xref-auto-jump-to-first-xref' to be more accurate. * etc/NEWS: More accurate wording of the entry about 'xref-auto-jump-to-first-definition' and 'xref-auto-jump-to-first-xref'.
* Fixup dired-do-find-regexp-and-replaceDmitry Gutov2021-09-061-1/+4
| | | | | | | | | * lisp/dired-aux.el (dired-do-find-regexp-and-replace): Disregard the customized value of xref-auto-jump-to-first-xref (it breaks the xref-query-replace-in-results invocation). * lisp/progmodes/xref.el (xref-auto-jump-to-first-xref): Mention the caveat for users or xref distributed through ELPA.
* project--files-in-directory: Fix handling of ignoresDmitry Gutov2021-09-061-6/+11
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/project.el (project--files-in-directory): Pass "." as the DIR argument to 'find' because otherwise the ignore expression can match the project root directory name, which we don't want to happen (bug#50240). Fixup the resulting file names at the end with concatenation. Originally I thought it could lead to worse performance, but the results show equal or slightly better timings. * lisp/progmodes/xref.el (xref-matches-in-directory): Apply a similar fix. (xref--find-ignores-arguments): Use file-name-as-directory, so that when passed "." replace-match still had the expected effect. * test/lisp/progmodes/project-tests.el (project-ignores-bug-50240): New test. * test/lisp/progmodes/xref-tests.el (xref-matches-in-directory-filters-with-ignores): New test.
* * lisp/progmodes/xref.el: Bump the version again.Dmitry Gutov2021-09-051-1/+1
|
* * lisp/progmodes/xref.el: Fix defcustoms (bug#50067)Juri Linkov2021-09-051-7/+9
| | | | | * lisp/progmodes/xref.el (xref-auto-jump-to-first-definition) (xref-auto-jump-to-first-xref, xref-search-program): Fix defcustoms.
* Belated fixDmitry Gutov2021-09-051-3/+6
| | | | | * lisp/progmodes/xref.el: (xref--show-xref-buffer): Fix support for xref-auto-jump-to-first-xref.
* * lisp/progmodes/xref.el: Bump version.Dmitry Gutov2021-09-051-1/+1
|
* Xref: automatic jumping to the first definition or referenceDmitry Gutov2021-09-051-8/+52
| | | | | | | | | | * 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.
* Rename xref-select-and-{goto,show}-xrefDmitry Gutov2021-09-051-3/+4
| | | | | | * lisp/progmodes/xref.el (xref-select-and-show-xref): Rename from xref-select-and-goto-xref (bug#35376). Update all references.
* Rename xref--mouse-2 and adjust documentationLars Ingebrigtsen2021-08-311-3/+6
| | | | | | | | | * 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).
* Use overlay arrow to indicate current *xref* selectionMattias Engdegård2021-08-211-0/+10
| | | | | | | * 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.
* Add "Find References" to context menu (bug#50067)Mattias Engdegård2021-08-211-0/+14
| | | | | | | | | 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`.