summaryrefslogtreecommitdiff
path: root/lisp/progmodes/xref.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add the necessary argument (bug#42967)Dmitry Gutov2020-08-271-1/+1
|
* ; Bump xref versionDmitry Gutov2020-08-271-1/+1
|
* Unbreak dired-do-find-regexp in Emacs 26Dmitry Gutov2020-08-271-0/+10
| | | | | * lisp/progmodes/xref.el (xref--show-xrefs): Support the old convention (bug#42967).
* Unbreak xref-goto-xref in Emacs 26Dmitry Gutov2020-08-271-1/+4
| | | | | * lisp/progmodes/xref.el (xref-goto-xref): Call next-error-found only if it's defined (bug#42981).
* Unbreak project-find-regexp in Emacs 26.3 (bug#42765)Dmitry Gutov2020-08-141-11/+32
| | | | | | | | | | | | * lisp/progmodes/project.el: Depend on xref. Bump the version. * lisp/progmodes/xref.el: Remove 'project' from the list of dependencies. Depending on Emacs 26.3 already ensures that some version is available. Bump the version. (xref--process-file-region): Move from project.el with a rename. Update the sole caller. (xref-backend-references): Make compatible with old project.el. Update the docstring.
* Replace some uses of cl-mapcan with mapcanBasil L. Contovounesios2020-06-211-3/+3
| | | | | | | | | * lisp/progmodes/project.el (project-files, project-files): * lisp/progmodes/xref.el (xref-backend-references) (xref--convert-hits): * test/lisp/emacs-lisp/package-tests.el (package-test-strip-version): Replace cl-mapcan with equivalent calls to mapcan.
* Change xref-find-apropos to pass PATTERN to backend verbatimDmitry Gutov2020-06-011-9/+23
| | | | | | | | | | | | | | * lisp/progmodes/xref.el (xref-backend-apropos): Rename this generic's second arg to PATTERN, to clarify that it should be handled entirely in the backend, with no pre-processing by the command. (xref-find-apropos): Update accordingly, but keep compatibility with backends in older Emacs versions. (xref-apropos-regexp): Extract from xref-find-apropos. * lisp/progmodes/etags.el (xref-backend-apropos): Use it here. * lisp/progmodes/elisp-mode.el (xref-backend-apropos): And here.
* project.el: A project has only one main root nowDmitry Gutov2020-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | Practice shows that the vast majority of projects only use one main root. The users of this API very often make this assumption as well. The rest of the "roots" should be possible to express through project-external-roots. * lisp/progmodes/project.el: Update the commentary. Only 4 non-obsolete generics now. (project-root): Replacement for `project-roots'. All callers updated. Implementations too. (project-roots): Declare obsolete. (project-external-roots): Simplify the docstring. (project-ignores): Update the docstring. (project-find-regexp): Omit the second arg to project-files. (project--dir-ignores): Simplify. (project-compile): Simplify, remove outdated comment. * lisp/cedet/ede.el: Add a FIXME.
* * lisp/progmodes/xref.el: Fix first line syntaxStefan Monnier2020-05-151-6/+6
| | | | (xref--find-ignores-arguments): Simplify.
* ; Tweak version numbers in lisp/progmodes/xref.elJoão Távora2020-05-151-2/+2
| | | | | | | | Hopefully this aids in getting the package correctly listed in GNU ELPA. * lisp/progmodes/xref.el (Version): Bump to 1.0.1 (Package-Requires): Require project 0.1.1.
* Turn Eldoc, Xref and Project into GNU ELPA :core packagesJoão Távora2020-05-131-0/+5
| | | | | | | | | | | | | | | | The new packages state they require Emacs 26.3 to function, but a small part of project.el breaks this "soft" rule: the two functions requiring fileloop.el are incompatible with Emacs 26.3. * lisp/jsonrpc.el: Tweak comment near Package-Requires. * lisp/emacs-lisp/eldoc.el: Add Version and Package-Requires. * lisp/progmodes/flymake.el: Add comment near Package-Requires. * lisp/progmodes/project.el: Add Version and Package-Requires. * lisp/progmodes/xref.el: Add Version and Package-Requires.
* Handle project--files-in-directory finding no files betterDmitry Gutov2020-03-301-0/+1
| | | | | | | | * lisp/progmodes/project.el (project--find-regexp-in-files): Signal user-error when passed an empty list of files. * lisp/progmodes/xref.el (xref-matches-in-files): Make sure FILES is not empty.
* Honor tags-case-fold-search during xref identifer completionDmitry Gutov2020-01-181-1/+7
| | | | | | | | | | | | | | | | * etc/NEWS: New entry. * lisp/progmodes/etags.el (tags-case-fold-search): Mark as safe-local. (find-tag--completion-ignore-case): Extract from tags-completion-at-point-function, find-tag-tag and etags--xref-find-definitions. (xref-backend-identifier-completion-ignore-case): New method. Use it here as well. * lisp/progmodes/xref.el (xref-backend-identifier-completion-ignore-case): New generic. (xref--read-identifier): Use it here.
* xref-matches-in-files: Big Tramp speed-upDmitry Gutov2020-01-071-1/+9
| | | | | | * lisp/progmodes/xref.el (xref-matches-in-files): Greatly improve performance with remote files using Tramp (bug#34343).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* ; xref-references-in-directory: Autoload as wellDmitry Gutov2019-12-291-0/+1
|
* Extract xref-matches-in-files from project--find-regexp-in-filesDmitry Gutov2019-12-291-0/+50
| | | | | | | * lisp/progmodes/xref.el (xref-matches-in-files): Extract from project--find-regexp-in-files. * lisp/dired-aux.el (dired-do-find-regexp): Also use it here.
* Rename xref-collect-references and xref-collect-matchesDmitry Gutov2019-12-291-3/+13
| | | | | | | | | | | * lisp/progmodes/xref.el (xref-references-in-directory): Rename from xref-collect-references. Update the sole caller. (xref-matches-in-directory): Rename from xref-collect-matches. Update all callers (all of them are in the /tests/ dir). * test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Don't use the EMACS_TEST_DIRECTORY env var. It doesn't work when running interactively.
* ; Improve the docstring some moreDmitry Gutov2019-12-291-2/+3
|
* Improve docstringsDmitry Gutov2019-12-291-2/+5
| | | | | * lisp/progmodes/xref.el (xref-collect-matches) (xref-collect-references): Improve docstrings.
* Don't require semantic/fwDmitry Gutov2019-12-281-1/+0
| | | | | | * lisp/progmodes/xref.el (xref-collect-matches): Don't require semantic/fw, we haven't been using semantic-find-file-noselect here for a while.
* Do some renames for clarityDmitry Gutov2019-12-281-7/+9
| | | | | | | * lisp/progmodes/xref.el (xref--last-file-buffer): Rename from xref--last-visiting-buffer. Update users. (xref--find-file-buffer): Rename from xref--find-buffer-visiting to match the standard function that gets called inside. Ditto.
* (xref--find-buffer-visiting): Speed up by using get-file-bufferDmitry Gutov2019-12-271-4/+2
| | | | | | | * lisp/progmodes/xref.el (xref--find-buffer-visiting): Speed up by using get-file-buffer. (xref--collect-matches): Remove the condition on remote-id. (https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00753.html)
* xref--collect-matches: Speed up on remoteDmitry Gutov2019-12-271-2/+5
| | | | | | * lisp/progmodes/xref.el (xref--collect-matches): Don't call find-buffer-visiting on remote file names, it's pretty slow (bug#34343).
* Apply the 'xref-group' property properlyDmitry Gutov2019-12-241-1/+1
| | | | | * lisp/progmodes/xref.el (xref--insert-xrefs): Apply the 'xref-group' property properly (bug#36974).
* In xref-location-marker, handle deleted file or outdated xref location nicelyStephen Leake2019-10-201-2/+7
| | | | * lisp/progmodes/xref.el (xref-location-marker): Add ignore-errors.
* lisp/*.el: Fix typos and improve some docstringsJuanma Barranquero2019-10-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (auth-source-backend-parse-parameters) (auth-source-search-collection) (auth-source-secrets-listify-pattern) (auth-source--decode-octal-string, auth-source-plstore-search): * lisp/registry.el (registry-lookup) (registry-lookup-breaks-before-lexbind) (registry-lookup-secondary, registry-lookup-secondary-value) (registry-search, registry-delete, registry-size, registry-full) (registry-insert, registry-reindex, registry-prune) (registry-collect-prune-candidates): * lisp/subr.el (nbutlast, process-live-p): * lisp/tab-bar.el (tab-bar-list): * lisp/cedet/ede/linux.el (ede-linux--get-archs) (ede-linux--include-path, ede-linux-load): * lisp/erc/erc-log.el (erc-log-all-but-server-buffers): * lisp/erc/erc-pcomplete.el (pcomplete-erc-commands) (pcomplete-erc-ops, pcomplete-erc-not-ops, pcomplete-erc-nicks) (pcomplete-erc-all-nicks, pcomplete-erc-channels) (pcomplete-erc-command-name, pcomplete-erc-parse-arguments): * lisp/eshell/em-term.el (eshell-visual-command-p): * lisp/gnus/gnus-cache.el (gnus-cache-fully-p): * lisp/gnus/nnmail.el (nnmail-get-active) (nnmail-fancy-expiry-target): * lisp/mail/mail-utils.el (mail-string-delete): * lisp/mail/supercite.el (sc-hdr, sc-valid-index-p): * lisp/net/ange-ftp.el (ange-ftp-use-smart-gateway-p): * lisp/net/nsm.el (nsm-save-fingerprint-maybe) (nsm-network-same-subnet, nsm-should-check): * lisp/net/rcirc.el (rcirc-looking-at-input): * lisp/net/tramp-cache.el (tramp-get-hash-table): * lisp/net/tramp-compat.el (tramp-compat-process-running-p): * lisp/net/tramp-smb.el (tramp-smb-get-share) (tramp-smb-get-localname, tramp-smb-read-file-entry) (tramp-smb-get-cifs-capabilities, tramp-smb-get-stat-capability): * lisp/net/zeroconf.el (zeroconf-list-service-names) (zeroconf-list-service-types, zeroconf-list-services) (zeroconf-get-host, zeroconf-get-domain) (zeroconf-get-host-domain): * lisp/nxml/rng-xsd.el (rng-xsd-compile) (rng-xsd-make-date-time-regexp, rng-xsd-convert-date-time): * lisp/obsolete/erc-hecomplete.el (erc-hecomplete) (erc-command-list, erc-complete-at-prompt): * lisp/org/ob-scheme.el (org-babel-scheme-get-buffer-impl): * lisp/org/ob-shell.el (org-babel--variable-assignments:sh-generic) (org-babel--variable-assignments:bash_array) (org-babel--variable-assignments:bash_assoc) (org-babel--variable-assignments:bash): * lisp/org/org-clock.el (org-day-of-week): * lisp/progmodes/cperl-mode.el (cperl-char-ends-sub-keyword-p): * lisp/progmodes/gud.el (gud-find-c-expr, gud-innermost-expr) (gud-prev-expr, gud-next-expr): * lisp/textmodes/table.el (table--at-cell-p, table--probe-cell) (table--get-cell-justify-property) (table--get-cell-valign-property) (table--put-cell-justify-property) (table--put-cell-valign-property): Fix typos. * lisp/so-long.el (fboundp): Doc fix. (so-long-mode-line-info, so-long-mode) (so-long--check-header-modes): Fix typos. * lisp/emulation/viper-mous.el (viper-surrounding-word) (viper-mouse-click-get-word): Fix typos. (viper-mouse-click-search-word): Doc fix. * lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p) (erc-bounds-of-word-at-point): Fix typos. (erc-decode-string-from-target, define-erc-response-handler): Refill docstring. * lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC): Fix typo. (erc-dcc-get-host, erc-dcc-auto-mask-p, erc-dcc-get-file): Doc fixes. * lisp/erc/erc-networks.el (erc-network-name): Fix typo. (erc-determine-network): Refill docstring. * lisp/net/dbus.el (dbus-list-hash-table) (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-check-event): Fix typos. (dbus-introspect-get-property): Doc fix. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Rename ARGS to ARGUMENTS. Doc fix. (tramp-adb-sh-fix-ls-output, tramp-adb-execute-adb-command) (tramp-adb-find-test-command): Fix typos. * lisp/net/tramp.el (tramp-set-completion-function) (tramp-get-completion-function) (tramp-completion-dissect-file-name) (tramp-completion-dissect-file-name1) (tramp-get-completion-methods, tramp-get-completion-user-host) (tramp-get-inode, tramp-get-device, tramp-mode-string-to-int) (tramp-call-process, tramp-call-process-region) (tramp-process-lines): Fix typos. (tramp-interrupt-process): Doc fix. * lisp/org/ob-core.el (org-babel-named-src-block-regexp-for-name) (org-babel-named-data-regexp-for-name): Doc fix. (org-babel-src-block-names, org-babel-result-names): Fix typos. * lisp/progmodes/inf-lisp.el (lisp-input-filter): Doc fix. (lisp-fn-called-at-pt): Fix typo. * lisp/progmodes/xref.el (xref-backend-identifier-at-point): Doc fix. (xref-backend-identifier-completion-table): Fix typo.
* Add imenu support to xrefDamien Cassou2019-08-231-2/+23
| | | | | | | * lisp/progmodes/xref.el (xref--imenu-prev-index-position) (xref--imenu-extract-index-name): Add functions to get imenu support. (xref--xref-buffer-mode): Set imenu variables to the new functions. * etc/NEWS: Add corresponding entry (bug#36974).
* ; Fix typoes.Juri Linkov2019-08-151-1/+1
|
* Fix recent commit in xref.elEli Zaretskii2019-07-251-1/+5
| | | | | | * lisp/progmodes/xref.el (xref-file-name-display): Doc fix. * etc/NEWS: Fix the corresponding entry.
* Add xref-file-name-displayStephen Leake2019-07-171-1/+9
| | | | | | | * lisp/progmodes/xref.el (xref-file-name-display): New user variable. (xref-location-group): Use it. * etc/NEWS: Mention it.
* Make xref-show-xrefs-function a defcustomFritz Stelzer2019-06-251-4/+6
| | | | | | | | | * lisp/progmodes/xref.el (xref-show-xrefs-function): Make into a defcustome (bug#29206). * lisp/progmodes/xref.el (xref-show-definitions-function): Ditto. Copyright-paperwork-exempt: yes
* Fix regressions in xref-find-definitions and ...-other-windowDmitry Gutov2019-06-161-3/+17
| | | | | | | * lisp/progmodes/xref.el: (xref--display-buffer-in-other-window) (xref--display-buffer-in-window): New functions. (xref--show-pos-in-buf): Use them (bug#33870)
* Unbreak saving xref--original-window, etcDmitry Gutov2019-06-101-2/+2
| | | | | | * lisp/progmodes/xref.el (xref--show-xref-buffer) (xref--show-defs-buffer-at-bottom): Move major mode calls earlier. So that local variable values are not lost.
* Rename xref--pop-to-location to xref-pop-to-locationDmitry Gutov2019-06-091-5/+5
| | | | | | | * lisp/progmodes/xref.el (xref-pop-to-location): Rename from xref-pop-to-location. So that third-party xref-show-definitions-function implementations can use it safely (bug#36144). Update all callers.
* Add a built-in alternative for xref-show-definitions-functionDmitry Gutov2019-06-091-13/+43
| | | | | | | | | | | * lisp/progmodes/xref.el (xref--transient-buffer-mode-map): New variable. (xref--transient-buffer-mode): New major mode. (xref--button-map): Remove the RET binding (it was unnecessary in the first place). (xref--show-common-initialize): Extract from xref--show-xref-buffer. (xref--show-defs-buffer-at-bottom): New function.
* Rename xref-refresh-results to xref-revert-bufferDmitry Gutov2019-05-301-2/+2
| | | | | * lisp/progmodes/xref.el (xref-revert-buffer): Rename from 'xref-refresh-results' (https://debbugs.gnu.org/35737#40).
* ; Remove unused piece of code and update a docstringDmitry Gutov2019-05-301-3/+1
|
* ; Minor docstring changeDmitry Gutov2019-05-261-1/+1
|
* ; xref--create-fetcher: Add some further clarificationDmitry Gutov2019-05-261-0/+6
|
* Expand some xref documentationDmitry Gutov2019-05-261-2/+23
| | | | | | * lisp/progmodes/xref.el (xref-show-xrefs-function) (xref-show-definitions-function, xref--create-fetcher): Add or extend the docstring.
* Rename xref--revert-xref-buffer to xref-refresh-resultsDmitry Gutov2019-05-251-2/+3
| | | | | * lisp/progmodes/xref.el (xref-refresh-results): Rename from xref--revert-xref-buffer (bug#35702).
* Support reverting in xref-find-definitions results as wellDmitry Gutov2019-05-251-29/+36
| | | | | | | | | * lisp/progmodes/xref.el (xref--show-xref-buffer): Expect the first argument to always be a function (bug#35702). Handle a FETCHED-XREFS entry in ALIST. (xref--show-defs-buffer): Update accordingly. (xref--create-fetcher): Extract from xref--find-xrefs. (xref--find-definitions): Use it.
* Support "reverting" Xref buffers (bug#35702)Dmitry Gutov2019-05-241-10/+43
| | | | | | | | | | | | | | * lisp/progmodes/xref.el (xref--fetcher): New variable. (xref--xref-buffer-mode-map): Add binding for 'g'. (xref--revert-xref-buffer): New command. (xref--show-xref-buffer): Accept a function as the first argument. (xref--show-xrefs): Same. (xref--find-xrefs): Pass the above a fetcher function. * lisp/progmodes/project.el (project-find-regexp) (project-or-external-find-regexp): Same. * lisp/dired-aux.el (dired-do-find-regexp): Same.
* Make xref-find-definitions more customizableDmitry Gutov2019-05-231-11/+17
| | | | | | | | | * lisp/progmodes/xref.el (xref--show-defs-buffer): New function. Move a bit of logic from xref--show-defs to make it more customizable. (xref--push-markers): New function, extracted from xref--show-xrefs. (xref-show-definitions-function): Set to the new function.
* Separate xref-find-definitions' behavior from other commandsDmitry Gutov2019-05-231-16/+25
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref-show-definitions-function): New variable. (xref--show-defs): Split off from xref--show-xrefs. (xref--find-definitions): Use it. (xref--not-found-error): New function. (xref--show-xrefs): Simplify. Show the list buffer even when there is just one item in the list. Remove the last argument. * lisp/dired-aux.el (dired-do-find-regexp): Update accordingly.
* xref--find-ignores-arguments: Return "" if IGNORES is nilDmitry Gutov2019-05-031-1/+2
|
* (xref--mouse-2): Fix not to jump to the next lineDmitry Gutov2019-05-031-1/+2
| | | | | * lisp/progmodes/xref.el (xref--mouse-2): Fix not to jump to the next line.
* Fix an "empty identifier" problemDmitry Gutov2019-05-031-12/+17
| | | | | | * lisp/progmodes/xref.el (xref--read-identifier): Abort on empty input if there is no default (https://lists.gnu.org/archive/html/help-gnu-emacs/2019-05/msg00012.html).
* New faces in xref (bug#23179)Juri Linkov2019-04-141-4/+15
| | | | | | * lisp/progmodes/xref.el (xref-file-header, xref-line-number) (xref-match): New faces. (xref--insert-xrefs, xref--collect-matches-1): Use them.