emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/wisi cd5e7d3 1/2: Match change in xref 1.3.2


From: Stephen Leake
Subject: [elpa] externals/wisi cd5e7d3 1/2: Match change in xref 1.3.2
Date: Sun, 21 Nov 2021 11:03:44 -0500 (EST)

branch: externals/wisi
commit cd5e7d35b85faf3ce41e1e9082dc240cd23bd9f5
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

    Match change in xref 1.3.2
    
    * wisi-prj.el (wisi-goto-spec/body): Match change in xref 1.3.2.
    
    * wisi.texi (Indent actions): Fix typo.
---
 wisi-prj.el | 21 +++++++++++++++------
 wisi.texi   |  2 +-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/wisi-prj.el b/wisi-prj.el
index 015fe1e..8bcb030 100644
--- a/wisi-prj.el
+++ b/wisi-prj.el
@@ -270,7 +270,8 @@ LINE, COLUMN are Emacs origin."
     (goto-char (marker-position marker))))
 
 (defun wisi-filter-table (table file)
-  "If FILE is nil, return TABLE. Otherwise return only items in TABLE with 
location FILE."
+  "If FILE is nil, return TABLE.
+Otherwise return only items in TABLE with location FILE."
   (cond
    ((null file)
     table)
@@ -283,7 +284,8 @@ LINE, COLUMN are Emacs origin."
       result))))
 
 (defun wisi-get-identifier (prompt)
-  "Get identifier at point, or, if no identifier at point or with user arg, 
prompt for one.
+  "Get identifier at point.
+If no identifier at point or with user arg, prompt for an identifier.
 Single user arg completes on all identifiers in project; double
 user arg limits completion to current file."
   ;; Similar to xref--read-identifier, but uses a different completion
@@ -333,10 +335,17 @@ If no symbol at point, or with prefix arg, prompt for 
symbol, goto spec."
      ((stringp identifier)
       ;; from xref-backend-identifier-at-point; desired location is 'other'
       (let ((item (wisi-xref-item identifier prj)))
-       (condition-case-unless-debug err
-           (with-slots (summary location) item
-             (let ((eieio-skip-typecheck t))
-               (with-slots (file line column) location
+       (condition-case err
+           ;; WORKAROUND: xref 1.3.2 xref-location changed from defclass to 
cl-defstruct
+           (with-suppressed-warnings (nil) ;; "unknown slot"
+             (let ((summary (if (functionp 'xref-item-summary) 
(xref-item-summary item) (oref item :summary)))
+                   (location (if (functionp 'xref-item-location) 
(xref-item-location item) (oref item :location)))
+                   (eieio-skip-typecheck t)) ;; 'location' may have line, 
column nil
+               (let ((file (if (functionp 'xref-location-file) 
(xref-location-file location) (oref location :file)))
+                     (line (if (functionp 'xref-location-line) 
(xref-location-line location) (oref location :line)))
+                     (column (if (functionp 'xref-location-column)
+                                 (xref-location-column location)
+                               (oref location :column))))
                  (let ((target
                         (wisi-xref-other
                          (wisi-prj-xref prj) prj
diff --git a/wisi.texi b/wisi.texi
index ac1be79..6813c39 100644
--- a/wisi.texi
+++ b/wisi.texi
@@ -369,7 +369,7 @@ Comment lines that are not trailing are indented by 
CODE-INDENT.
 
 @item (label . INDENT)
 If token labels are used in a right hand side, they must be given
-explicitly in the indent arguments, using he lisp ``cons''
+explicitly in the indent arguments, using the lisp ``cons''
 syntax. Labels are normally only used with EBNF grammars, which expand
 into multiple right hand sides, with optional tokens simply left
 out. Explicit labels on the indent arguments allow them to be left out



reply via email to

[Prev in Thread] Current Thread [Next in Thread]