1. 28 Dec, 2015 1 commit
    • Dmitry Gutov's avatar
      Rename project-library-roots to project-external-roots · 17ab0d10
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-library-roots): Rename to
      project-external-roots.
      (project-library-roots-function): Rename to
      project-vc-external-roots-function.  Only use it in the VC
      backend, for now.  Update project-external-roots accordingly.
      (project-vc-library-roots): Remove.
      (project-or-libraries-find-regexp):
      Rename to project-or-external-find-regexp.
      
      * lisp/progmodes/elisp-mode.el (elisp-library-roots):
      Rename to elisp-load-path-roots.
      
      * lisp/progmodes/etags.el (etags-library-roots): Remove.  Use
      an anonymous function for the default value of
      project-vc-external-roots-function.
      17ab0d10
  2. 02 Dec, 2015 1 commit
  3. 27 Nov, 2015 1 commit
  4. 20 Nov, 2015 1 commit
  5. 17 Nov, 2015 1 commit
  6. 15 Nov, 2015 3 commits
  7. 14 Nov, 2015 3 commits
    • Artur Malabarba's avatar
      * lisp/progmodes/xref.el (xref-pop-marker-stack): Downgrade errors · d24e7833
      Artur Malabarba authored
      Signal user-errors instead.
      d24e7833
    • Dmitry Gutov's avatar
      7126e9a4
    • Dmitry Gutov's avatar
      Use generic dispatch for xref backends · 246d6605
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-backend-functions):
      New variable.
      (xref-find-function): Remove.
      (xref-find-backend)
      (xref--etags-backend): New functions.
      (xref-identifier-at-point-function)
      (xref-identifier-completion-table-function): Remove.
      (xref-backend-definitions, xref-backend-references)
      (xref-backend-apropos, xref-backend-identifier-at-point)
      (xref-backend-identifier-completion-table):
      New generic functions.
      
      * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Add
      `elisp--xref-backend' to the beginning of
      `xref-backend-functions', locally.  Delete references to
      removed functions and vars.
      (elisp-xref-find): Remove.
      (elisp--xref-backend): New function.
      (elisp--xref-find-references, elisp--xref-find-apropos)
      (elisp--xref-identifier-completion-table):
      Turn into appropriately named generic methods.
      
      * lisp/progmodes/etags.el (etags-xref-find): Remove.
      (xref-backend-identifier-completion-table)
      (xref-backend-references, xref-backend-definitions)
      (xref-backend-apropos): New generic methods.
      246d6605
  8. 13 Nov, 2015 2 commits
    • Dmitry Gutov's avatar
      Handle multiple matches on the same line; add highlighting · f103a277
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-location-marker): Interpret the
      column value in characters.
      (xref--collect-matches): Rename from `xref--collect-match'.
      Search for all matches in the hit line.  Add `highlight' face to
      the matched region in the summary.  Update both callers.
      f103a277
    • Dmitry Gutov's avatar
      Replace xref-match-bounds with xref-match-length · fe973fc2
      Dmitry Gutov authored
      Relying on xref-location-marker to point to the beginning of the match
      
      * lisp/progmodes/xref.el (xref-match-bounds): Remove.
      (xref-match-length): Add.
      (xref-make-match): Change the arguments.
      (xref--match-buffer-bounds): Remove.
      (xref-match-item): Store length, instead of end-column.
      (xref-pulse-momentarily)
      (xref--collect-match)
      (xref--query-replace-1): Update accordingly.
      (xref-query-replace): Ditto.  And check that the search results
      are up-to-date.
      fe973fc2
  9. 08 Nov, 2015 1 commit
    • Dmitry Gutov's avatar
      Move and rename xref-find-regexp to the project package · 3a37d99e
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-find-regexp)
      (project--read-regexp)
      (project--find-regexp-in): New functions.
      
      * lisp/progmodes/xref.el (xref--find-xrefs): Extract from
      xref--show-xrefs.  Use in existing callers in place of that
      function.
      (xref--show-xrefs): Only do the "show" part.
      (xref-find-regexp): Rename, more or less, to
      project-or-libraries-find-regexp.
      3a37d99e
  10. 06 Nov, 2015 3 commits
    • Dmitry Gutov's avatar
      Abolish temporary buffer management for xref · 55ad7fce
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--temporary-buffers)
      (xref--current)
      (xref--inhibit-mark-current)
      (xref--mark-selected): Remove.  Remove all references.
      (xref--show-xrefs): Do not construct the
      list of the temporary buffers, nor pass it along.
      55ad7fce
    • Dmitry Gutov's avatar
      Rename "search path" to "library roots" · 97769720
      Dmitry Gutov authored
      * lisp/emacs-lisp/cl-seq.el (cl-set-difference): Retain the order
      of the elements from CL-LIST1.
      
      * test/automated/cl-lib-tests.el (cl-lib-test-set-functions):
      Update WRT to the above change.
      
      * lisp/progmodes/project.el (project-search-path-function): Rename
      to project-library-roots-function, update the documentation and
      references.
      (project-search-path): Likewise, to project-library-roots.
      (project-roots): Clarify documentation.
      (project-vc-search-path): Likewise, to project-vc-library-roots.
      (project-library-roots): In addition to the renames, thread the
      results through file-name-as-directory.
      (project-prune-directories): Accept a variable number of
      arguments.  Rename to project-combine-directories.
      (project-subtract-directories): New function.
      
      * lisp/progmodes/elisp-mode.el (elisp--xref-find-references):
      Append project-roots and project-library-roots together.
      
      * lisp/progmodes/etags.el (etags--xref-find-references): Ditto.
      97769720
    • Stephen Leake's avatar
  11. 04 Nov, 2015 1 commit
    • Juanma Barranquero's avatar
      * lisp/progmodes/xref.el: Doc fixes · 587b2328
      Juanma Barranquero authored
      (xref-make-file-location, xref-make-buffer-location, xref-make)
      (xref-make-bogus-location, xref-make-match): Add cross-references.
      (xref--insert-xrefs): Fix typo in docstring.
      587b2328
  12. 03 Sep, 2015 1 commit
    • Paul Eggert's avatar
      Fix some more docstring etc. quoting problems · 26bd978d
      Paul Eggert authored
      Mostly these fixes prevent the transliteration of apostrophes
      that should stay apostrophes.  Also, prefer curved quotes in
      Bahá’í proper names, as that’s the preferred Bahá’í style and
      these names are chock-full of non-ASCII characters anyway.
      * lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload)
      (eieio-defclass-internal):
      * lisp/emacs-lisp/eieio.el (defclass):
      * lisp/hi-lock.el (hi-lock-mode):
      Don’t transliterate Lisp apostrophes when generating a
      doc string or diagnostic.
      * lisp/international/mule-diag.el (list-coding-systems-1):
      * lisp/international/ogonek.el (ogonek-jak, ogonek-how):
      * lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
      * lisp/vc/ediff-mult.el (ediff-redraw-registry-buffer):
      * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map):
      Substitute quotes before putting them in the help buffer.
      26bd978d
  13. 11 Aug, 2015 1 commit
    • Stephen Leake's avatar
      elisp--xref-find-definitions handle cl-defstuct default constructor · 85f7e511
      Stephen Leake authored
      * lisp/progmodes/elisp-mode.el (elisp-xref-find): Add FIXME.
      (elisp--xref-format-extra): Rename from elisp--xref-format-cl-defmethod.
      (elisp--xref-find-definitions): Handle cl-defstuct default constructor.
      
      * test/automated/elisp-mode-tests.el (xref-elisp-test-run): Split out
      from xref-elisp-test for ease of debugging.
      (xref-elisp-deftest): Rename from xref-elisp-test.
      (find-defs-constructor): New test.
      (find-defs-defgeneric-el): Match batch test config.
      (compile): Required for find-defs compilation-minor-mode test.
      (find-defs-defvar-el): Match code change.
      (find-defs-face-el): Match code change.
      
      * lisp/progmodes/xref.el (xref-find-function, xref-find-definitions):
      Improve doc string.
      85f7e511
  14. 10 Aug, 2015 2 commits
  15. 05 Aug, 2015 1 commit
  16. 01 Aug, 2015 1 commit
    • Dmitry Gutov's avatar
      Add a second argument to project-ignores · 543bb9bc
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-ignores): Add a second
      argument DIR.
      
      * lisp/progmodes/project.el (project-ignores): Only include the VC
      ignores if DIR is the VC root.
      
      * lisp/progmodes/xref.el (xref-find-regexp): Update accordingly.
      543bb9bc
  17. 31 Jul, 2015 1 commit
    • Dmitry Gutov's avatar
      Rename project-directories to project-roots · 6a79a169
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-search-path-function)
      (project-search-path): Update the docstring.
      (project-directories): Rename to `project-roots', update all
      callers and implementations accordingly.
      (project-root): Remove.
      
      * lisp/progmodes/xref.el (xref-find-regexp): Use * instead of *.*
      as the default file mask.
      6a79a169
  18. 22 Jul, 2015 1 commit
  19. 21 Jul, 2015 1 commit
    • Dmitry Gutov's avatar
      Add new xref-query-replace command · b6ac30ab
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--match-buffer-bounds): New
      function, extracted from xref-pulse-momentarily.
      (xref-query-replace): New command.
      (xref--query-replace-1): New helper function.
      (xref--xref-buffer-mode-map): Add `r' binding.
      b6ac30ab
  20. 20 Jul, 2015 4 commits
    • Dmitry Gutov's avatar
      ; Fix a typo · 4051fb20
      Dmitry Gutov authored
      4051fb20
    • Dmitry Gutov's avatar
      Add xref-match-item, and use it · 5330a45e
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-match-bounds): New generic function.
      (xref-file-location): Add reader for the column slot.
      (xref-match-item): New class.
      (xref-match-bounds): A method implementation for it.
      (xref-make-match): New constructor function.
      (xref--current-item): New private variable.
      (xref-pulse-momentarily): Use it.
      (xref--pop-to-location): Change the first argument to an xref
      item, instead of location, bind xref--current-item.
      Update all callers.
      (xref-next-line, xref-prev-line, xref--next-error-function)
      (xref--mouse-2): Look for the property `xref-item',
      instead of `xref-location'.
      (xref--item-at-point): Likewise.  This function replaces
      `xref-location-at-point'.  Update all callers.
      (xref--insert-xrefs): Add the `xref-item' text property, instead
      of `xref-location'.
      (xref--collect-match): Use xref-make-match.
      5330a45e
    • Dmitry Gutov's avatar
      Rename xref--xref to xref-item · 10ac9dbd
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-item): Rename from `xref--xref'.
      Update all references.
      10ac9dbd
    • Dmitry Gutov's avatar
      Rename xref description slot to summary · e29206e8
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--xref): Rename the `description'
      slot to `summary'.
      e29206e8
  21. 19 Jul, 2015 1 commit
  22. 13 Jul, 2015 1 commit
    • Dmitry Gutov's avatar
      Show the default value in the prompt · 35ad161d
      Dmitry Gutov authored
      * lisp/progmodes/xref.el: Add `M-?' binding for
      xref-find-references.  Declare functions `grep-read-files' and
      `grep-expand-template'.
      (xref--read-identifier): Show the default value in the prompt.
      35ad161d
  23. 12 Jul, 2015 2 commits
    • Dmitry Gutov's avatar
      When called with prefix argument, ask for file patterns to search as well · 5153d30c
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-find-regexp): When called with
      prefix argument, ask for file patterns to search as well.  When
      prompting for the directory, require an existing one.
      (xref-collect-matches): Add a new argument, FILES.  Use it in the
      above function.
      5153d30c
    • Dmitry Gutov's avatar
      Add `project-ignores' · 62d5d465
      Dmitry Gutov authored
      * lisp/progmodes/project.el (project-ignores): New generic
      function, and an implementation for the	VC project type.
      
      * lisp/progmodes/xref.el (xref--rgrep-command): Split, as a
      variant of rgrep-default-command that handles a generic list of
      ignores.
      (xref-collect-matches): Use it, and pass through to it the value
      of the newly added argument.
      (xref-find-regexp): Handle ignored paths within the project.
      Remove outdated comment.
      
      * lisp/vc/vc.el (vc-default-ignore-completion-table):
      Skip the comments and the empty lines.
      62d5d465
  24. 11 Jul, 2015 1 commit
  25. 10 Jul, 2015 2 commits
    • Dmitry Gutov's avatar
      Don't check the exit status, it can be misleading · 53cf3cfe
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-collect-matches): Don't check the
      exit status, it can be misleading.
      53cf3cfe
    • Dmitry Gutov's avatar
      Introduce a Project API · f8c720b5
      Dmitry Gutov authored
      * lisp/progmodes/project.el: New file.
      
      * lisp/cedet/ede.el: (project-try-ede): New function.
      (project-root): New implementation.
      
      * lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
      Set project-search-path-function.
      (elisp--xref-find-references): Delegate some logic to
      project-search-path.
      (elisp-search-path): New function.
      (elisp-xref-find): Don't implement `matches' anymore.
      
      * lisp/progmodes/etags.el: Don't implement `matches'.
      Delegate some logic to project-search-path.
      (etags-search-path): New function.
      
      * lisp/progmodes/xref.el (xref-find-function):
      Remove `matches' from the API.
      (xref-find-regexp): Move whatever common logic was in elisp and
      etags implementations, and search the directories returned by
      project-directories and project-search-path.
      f8c720b5
  26. 09 Jul, 2015 2 commits