(when (sweep-true-p sol)
(cdr sol)))))
+(defun sweep-find-file-at-point (point)
+ "Find file specificed by the Prolog file spec at POINT.
+
+Interactively, POINT is set to the current point."
+ (interactive "d" sweep-mode sweep-top-level-mode)
+ (if-let ((file (sweep-file-at-point point)))
+ (find-file file)
+ (user-error "No file specification found at point!")))
+
(defun sweep-identifier-at-point (&optional point)
(let* ((p (or point (point)))
(beg (save-mark-and-excursion
(sweep-colourise-buffer)
(sweep--set-buffer-module)
(add-hook 'xref-backend-functions #'sweep--xref-backend nil t)
+ (add-hook 'file-name-at-point-functions #'sweep-file-at-point nil t)
(add-hook 'completion-at-point-functions #'sweep-completion-at-point-function nil t))
;;;; Testing:
sweep_handle_file_at_point(_, _, _, _).
-
sweep_identifier_at_point([Contents0, Path, Point], Identifier) :-
setup_call_cleanup(( new_memory_file(H),
insert_memory_file(H, 0, Contents0),