]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: set context to (factor-current-vocab), in case it's a word defined
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 25 May 2016 21:00:45 +0000 (23:00 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 25 May 2016 21:00:45 +0000 (23:00 +0200)
in the current buffer

misc/fuel/fuel-xref.el

index 043908a16640d3fea5ff05bd039d0bcddd89f6ed..7e7aadfb34f303e7bd9cfeb8a09ac997ad6e88b2 100644 (file)
@@ -152,7 +152,10 @@ cursor at the first ocurrence of the used word."
   (fuel-popup--display (current-buffer)))
 
 (defun fuel-xref--callers (word)
-  (fuel-xref--eval<x--y> (list :quote word) 'fuel-callers-xref ""))
+  (fuel-xref--eval<x--y>
+   (list :quote word)
+   'fuel-callers-xref
+   (factor-current-vocab)))
 
 (defun fuel-xref--show-callers (word)
   (let ((res (fuel-xref--callers word)))
@@ -164,7 +167,10 @@ cursor at the first ocurrence of the used word."
   (mapcar 'cadar (fuel-xref--callers word)))
 
 (defun fuel-xref--show-callees (word)
-  (let ((res (fuel-xref--eval<x--y> (list :quote word) 'fuel-callees-xref "")))
+  (let ((res (fuel-xref--eval<x--y>
+              (list :quote word)
+              'fuel-callees-xref
+              (factor-current-vocab))))
     (with-current-buffer (fuel-xref--buffer)
       (setq fuel-xref--word nil)
       (fuel-xref--display-word-groups word "used by" res))))
@@ -258,7 +264,7 @@ With prefix argument, force reload of vocabulary list."
   "Show a list of words in current file.
 With prefix argument, ask for the vocab."
   (interactive "P")
-  (let ((vocab (or (and (not arg) (factor-find-in))
+  (let ((vocab (or (and (not arg) (factor-current-vocab))
                    (fuel-completion--read-vocab nil))))
     (when vocab
       (fuel-xref--show-vocab-words vocab))))