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

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

[nongnu] elpa/go-mode cbf7274 343/495: x/tools/oracle: add whicherrs que


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode cbf7274 343/495: x/tools/oracle: add whicherrs query mode
Date: Sat, 7 Aug 2021 09:05:44 -0400 (EDT)

branch: elpa/go-mode
commit cbf72745bd54d54be95a8e84e93d7483fa4ca38e
Author: Daniel Morsing <daniel.morsing@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>

    x/tools/oracle: add whicherrs query mode
    
    The whicherrs query mode takes the position of an error and returns the set 
of constants, globals and types visible from within the scope of the error 
being queried.
    It is meant to be used as a shortcut to find out which errors should be 
handled for a given functions call.
    
    LGTM=adonovan
    R=golang-codereviews, dominik.honnef, adonovan
    CC=golang-codereviews
    https://golang.org/cl/167420043
---
 guru_import/cmd/oracle/oracle.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/guru_import/cmd/oracle/oracle.el b/guru_import/cmd/oracle/oracle.el
index 35cd892..f90a5fd 100644
--- a/guru_import/cmd/oracle/oracle.el
+++ b/guru_import/cmd/oracle/oracle.el
@@ -213,6 +213,12 @@ identifier."
   (interactive)
   (go-oracle--run "referrers"))
 
+(defun go-oracle-whicherrs ()
+  "Show globals, constants and types to which the selected
+expression (of type 'error') may refer."
+  (interactive)
+  (go-oracle--run "whicherrs"))
+
 ;; TODO(dominikh): better docstring
 (define-minor-mode go-oracle-mode "Oracle minor mode for go-mode
 



reply via email to

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