[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole c2bf47c15b 068/143: xref is used by etags sin
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole c2bf47c15b 068/143: xref is used by etags since 26.1 so use it unconditionally (#432) |
Date: |
Mon, 19 Feb 2024 15:59:03 -0500 (EST) |
branch: externals/hyperbole
commit c2bf47c15b913b51ddf03991f05e1fca73dd115c
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
xref is used by etags since 26.1 so use it unconditionally (#432)
---
hmouse-tag.el | 63 +++++++++++++++++++++++++----------------------------------
1 file changed, 27 insertions(+), 36 deletions(-)
diff --git a/hmouse-tag.el b/hmouse-tag.el
index 00c54cc6bf..de1d0644ab 100644
--- a/hmouse-tag.el
+++ b/hmouse-tag.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 24-Aug-91
-;; Last-Mod: 5-Jan-24 at 14:02:46 by Bob Weiner
+;; Last-Mod: 5-Jan-24 at 23:01:12 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -27,35 +27,32 @@
;; command.
(load "etags.elc" t nil t)))
-;; If etags utilizes the new xref.el library, define some helper
-;; functions to simplify programming and fix one existing function.
-(when (require 'xref nil t)
- ;; Fix next xref function to handle when called at beginning of buffer
- (defun xref--item-at-point ()
- (get-text-property
- (max (point-min) (if (eolp) (1- (point)) (point)))
- 'xref-item))
- (when (not (fboundp 'xref-definition))
- (defun xref-definitions (identifier)
- "Return a list of all definitions of string IDENTIFIER."
- (let* ((elisp-flag (smart-emacs-lisp-mode-p))
- (xref-backend (or (and elisp-flag
- (fboundp 'ert-test-boundp)
- (ert-test-boundp identifier)
- (boundp 'xref-etags-mode)
- 'etags)
- (xref-find-backend)))
- (xref-items (xref-backend-definitions xref-backend identifier)))
- xref-items))
- (defun xref-definition (identifier)
- "Return the first definition of string IDENTIFIER."
- (car (xref-definitions identifier)))
- (defun xref-item-buffer (item)
- "Return the buffer in which xref ITEM is defined."
- (marker-buffer (save-excursion (xref-location-marker (xref-item-location
item)))))
- (defun xref-item-position (item)
- "Return the buffer position where xref ITEM is defined."
- (marker-position (save-excursion (xref-location-marker
(xref-item-location item)))))))
+(require 'xref)
+;; Fix next xref function to handle when called at beginning of buffer
+(defun xref--item-at-point ()
+ (get-text-property
+ (max (point-min) (if (eolp) (1- (point)) (point)))
+ 'xref-item))
+(defun xref-definitions (identifier)
+ "Return a list of all definitions of string IDENTIFIER."
+ (let* ((elisp-flag (smart-emacs-lisp-mode-p))
+ (xref-backend (or (and elisp-flag
+ (fboundp 'ert-test-boundp)
+ (ert-test-boundp identifier)
+ (boundp 'xref-etags-mode)
+ 'etags)
+ (xref-find-backend)))
+ (xref-items (xref-backend-definitions xref-backend identifier)))
+ xref-items))
+(defun xref-definition (identifier)
+ "Return the first definition of string IDENTIFIER."
+ (car (xref-definitions identifier)))
+(defun xref-item-buffer (item)
+ "Return the buffer in which xref ITEM is defined."
+ (marker-buffer (save-excursion (xref-location-marker (xref-item-location
item)))))
+(defun xref-item-position (item)
+ "Return the buffer position where xref ITEM is defined."
+ (marker-position (save-excursion (xref-location-marker (xref-item-location
item)))))
;;; ************************************************************************
;;; Public declarations
@@ -90,12 +87,6 @@
(declare-function org-in-src-block-p "org")
(declare-function ibtype:def-symbol "hbut")
-;; Forward declare needed? Because of optional defined above? Can we
-;; skip checking if xref is available since it has been at least since
-;; 26.1 or even earlier? Then we should not need these declares.
-(declare-function xref-item-position "hmouse-tag")
-(declare-function xref-item-buffer "hmouse-tag")
-
;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
- [elpa] externals/hyperbole cf6c291eae 124/143: Rename ibut:act to ibut:act-label, (continued)
- [elpa] externals/hyperbole cf6c291eae 124/143: Rename ibut:act to ibut:act-label, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c0f33ab989 095/143: hsys-org-fix-version - fix to reload Org libs from the proper path, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole f40a30d11c 127/143: Use actionv4 (#465), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 5d27b22695 129/143: Add overview and top-level outline tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 6befc489c5 131/143: Autoload `hypb:add-to-invisibility-spec' used in kotl-mode, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c5b276b61e 142/143: HyRolo - `hyrolo-outline-minor-mode' expands invisible text at point, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 93ff5acf4b 140/143: hyrolo.el - Add default hyrolo-entry-group-number for hyrolo-mode, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole b3a0a7d2e2 038/143: Merge remote branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 6c7b8e5afb 048/143: Add helper for generating org files + two tests using the matches, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 8d9b7f0dde 032/143: hyrolo-tests.el - "*HyRolo*" literal to `hyrolo-display-buffer' var, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c2bf47c15b 068/143: xref is used by etags since 26.1 so use it unconditionally (#432),
ELPA Syncer <=
- [elpa] externals/hyperbole 327f53f078 069/143: Mock y-or-n-p to avoid being prompted (#433), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole e88a3873ed 073/143: htype:def-symbol, htype:names, actype:def-symbol - Call update, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole eeb6aacd9f 075/143: Add more hyrolo show, hide and movement tests (#436), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 47d87c252f 113/143: HyRolo - resolve all outline movement issues and tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7b50db7eb0 085/143: Matsl rsw forward backward same level tests (#443), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 3d80bcbaf4 109/143: Merge branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 1078846a45 120/143: Update generation of README.md.html for increased reliability, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 970a5573f3 133/143: Merge branch 'rsw' into matsl-rsw-add-top-view-n-overview-tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7c7aae7206 052/143: Add edit entry test, fix regular expressions, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 6009912456 128/143: Add type of but in error message, renamed but parameter, ELPA Syncer, 2024/02/19