mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-05-27 23:56:04 -07:00
* lisp/progmodes/xref.el (xref-buffer-name, xref--window):
Move definitions before use.
This commit is contained in:
parent
cbedfc2658
commit
9094304a9c
1 changed files with 5 additions and 6 deletions
|
|
@ -436,6 +436,8 @@ If SELECT is non-nil, select the target window."
|
||||||
;;; XREF buffer (part of the UI)
|
;;; XREF buffer (part of the UI)
|
||||||
|
|
||||||
;; The xref buffer is used to display a set of xrefs.
|
;; The xref buffer is used to display a set of xrefs.
|
||||||
|
(defconst xref-buffer-name "*xref*"
|
||||||
|
"The name of the buffer to show xrefs.")
|
||||||
|
|
||||||
(defmacro xref--with-dedicated-window (&rest body)
|
(defmacro xref--with-dedicated-window (&rest body)
|
||||||
`(let* ((xref-w (get-buffer-window xref-buffer-name))
|
`(let* ((xref-w (get-buffer-window xref-buffer-name))
|
||||||
|
|
@ -470,6 +472,9 @@ If SELECT is non-nil, select the target window."
|
||||||
(xref--show-pos-in-buf marker buf select))
|
(xref--show-pos-in-buf marker buf select))
|
||||||
(user-error (message (error-message-string err)))))
|
(user-error (message (error-message-string err)))))
|
||||||
|
|
||||||
|
(defvar-local xref--window nil
|
||||||
|
"The original window this xref buffer was created from.")
|
||||||
|
|
||||||
(defun xref-show-location-at-point ()
|
(defun xref-show-location-at-point ()
|
||||||
"Display the source of xref at point in the appropriate window, if any."
|
"Display the source of xref at point in the appropriate window, if any."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -500,9 +505,6 @@ If SELECT is non-nil, select the target window."
|
||||||
(back-to-indentation)
|
(back-to-indentation)
|
||||||
(get-text-property (point) 'xref-item)))
|
(get-text-property (point) 'xref-item)))
|
||||||
|
|
||||||
(defvar-local xref--window nil
|
|
||||||
"The original window this xref buffer was created from.")
|
|
||||||
|
|
||||||
(defun xref-goto-xref ()
|
(defun xref-goto-xref ()
|
||||||
"Jump to the xref on the current line and select its window."
|
"Jump to the xref on the current line and select its window."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -624,9 +626,6 @@ references displayed in the current *xref* buffer."
|
||||||
(t
|
(t
|
||||||
(error "No %s xref" (if backward "previous" "next"))))))
|
(error "No %s xref" (if backward "previous" "next"))))))
|
||||||
|
|
||||||
(defconst xref-buffer-name "*xref*"
|
|
||||||
"The name of the buffer to show xrefs.")
|
|
||||||
|
|
||||||
(defvar xref--button-map
|
(defvar xref--button-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(define-key map [(control ?m)] #'xref-goto-xref)
|
(define-key map [(control ?m)] #'xref-goto-xref)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue