Commit 4a9897fe authored by Troels Henriksen's avatar Troels Henriksen

Fix running certain functions outside textual-drei-syntax-views.

parent eb07380b
......@@ -370,7 +370,8 @@ macros or similar). If no such form can be found, return NIL."
(defun edit-definition (symbol &optional type)
(let ((all-definitions (find-definitions-for-drei
(get-usable-image (current-syntax))
(get-usable-image (when (syntax-view-p (current-view))
(current-syntax)))
symbol)))
(let ((definitions (if (not type)
all-definitions
......@@ -384,7 +385,8 @@ macros or similar). If no such form can be found, return NIL."
(goto-definition symbol definitions))))))
(defun goto-definition (name definitions)
(push (list (offset (point)) (current-view)) *find-definition-stack*)
(when (point-mark-view-p (current-view))
(push (list (offset (point)) (current-view)) *find-definition-stack*))
(cond ((null (cdr definitions))
(let* ((def (car definitions))
(xref (make-xref def)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment