diff options
| author | Dmitry Gutov | 2015-07-20 03:26:01 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2015-07-20 03:26:01 +0300 |
| commit | 10ac9dbdcf2973bd70ea63aa79a9f3ad7dd9ff5a (patch) | |
| tree | 0b05d78506b67469c1252ecb9cb605e71585b912 | |
| parent | e29206e84af78ea58dc06155ad5ce9dbcf683cc9 (diff) | |
| download | emacs-10ac9dbdcf2973bd70ea63aa79a9f3ad7dd9ff5a.tar.gz emacs-10ac9dbdcf2973bd70ea63aa79a9f3ad7dd9ff5a.zip | |
Rename xref--xref to xref-item
* lisp/progmodes/xref.el (xref-item): Rename from `xref--xref'.
Update all references.
| -rw-r--r-- | lisp/progmodes/xref.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index bf0710ea1cf..a17550f445f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -147,19 +147,23 @@ actual location is not known.") | |||
| 147 | 147 | ||
| 148 | ;;; Cross-reference | 148 | ;;; Cross-reference |
| 149 | 149 | ||
| 150 | (defclass xref--xref () | 150 | (defclass xref-item () |
| 151 | ((summary :type string :initarg :summary | 151 | ((summary :type string :initarg :summary |
| 152 | :reader xref--xref-summary) | 152 | :reader xref-item-summary |
| 153 | :documentation "One line which will be displayed for | ||
| 154 | this item in the output buffer.") | ||
| 153 | (location :initarg :location | 155 | (location :initarg :location |
| 154 | :reader xref--xref-location)) | 156 | :reader xref-item-location |
| 155 | :comment "An xref is used to display and locate constructs like | 157 | :documentation "An object describing how to navigate |
| 156 | variables or functions.") | 158 | to the reference's target.")) |
| 159 | :comment "An xref item describes a reference to a location | ||
| 160 | somewhere.") | ||
| 157 | 161 | ||
| 158 | (defun xref-make (summary location) | 162 | (defun xref-make (summary location) |
| 159 | "Create and return a new xref item. | 163 | "Create and return a new xref item. |
| 160 | SUMMARY is a short string to describe the xref. | 164 | SUMMARY is a short string to describe the xref. |
| 161 | LOCATION is an `xref-location'." | 165 | LOCATION is an `xref-location'." |
| 162 | (make-instance 'xref--xref :summary summary :location location)) | 166 | (make-instance 'xref-item :summary summary :location location)) |
| 163 | 167 | ||
| 164 | 168 | ||
| 165 | ;;; API | 169 | ;;; API |
| @@ -521,7 +525,7 @@ meantime are preserved." | |||
| 521 | "Insert XREF-ALIST in the current-buffer. | 525 | "Insert XREF-ALIST in the current-buffer. |
| 522 | XREF-ALIST is of the form ((GROUP . (XREF ...)) ...). Where | 526 | XREF-ALIST is of the form ((GROUP . (XREF ...)) ...). Where |
| 523 | GROUP is a string for decoration purposes and XREF is an | 527 | GROUP is a string for decoration purposes and XREF is an |
| 524 | `xref--xref' object." | 528 | `xref-item' object." |
| 525 | (require 'compile) ; For the compilation faces. | 529 | (require 'compile) ; For the compilation faces. |
| 526 | (cl-loop for ((group . xrefs) . more1) on xref-alist | 530 | (cl-loop for ((group . xrefs) . more1) on xref-alist |
| 527 | for max-line-width = | 531 | for max-line-width = |
| @@ -557,7 +561,7 @@ GROUP is a string for decoration purposes and XREF is an | |||
| 557 | Return an alist of the form ((FILENAME . (XREF ...)) ...)." | 561 | Return an alist of the form ((FILENAME . (XREF ...)) ...)." |
| 558 | (xref--alistify xrefs | 562 | (xref--alistify xrefs |
| 559 | (lambda (x) | 563 | (lambda (x) |
| 560 | (xref-location-group (xref--xref-location x))) | 564 | (xref-location-group (xref-item-location x))) |
| 561 | #'equal)) | 565 | #'equal)) |
| 562 | 566 | ||
| 563 | (defun xref--show-xref-buffer (xrefs alist) | 567 | (defun xref--show-xref-buffer (xrefs alist) |
| @@ -599,7 +603,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)." | |||
| 599 | (user-error "No %s found for: %s" (symbol-name kind) input)) | 603 | (user-error "No %s found for: %s" (symbol-name kind) input)) |
| 600 | ((not (cdr xrefs)) | 604 | ((not (cdr xrefs)) |
| 601 | (xref-push-marker-stack) | 605 | (xref-push-marker-stack) |
| 602 | (xref--pop-to-location (xref--xref-location (car xrefs)) window)) | 606 | (xref--pop-to-location (xref-item-location (car xrefs)) window)) |
| 603 | (t | 607 | (t |
| 604 | (xref-push-marker-stack) | 608 | (xref-push-marker-stack) |
| 605 | (funcall xref-show-xrefs-function xrefs | 609 | (funcall xref-show-xrefs-function xrefs |