summaryrefslogtreecommitdiff
path: root/elisp/geiser-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-edit.el')
-rw-r--r--elisp/geiser-edit.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index e63a91b..55106d3 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -142,6 +142,20 @@ or following links in error buffers.")
(geiser-edit--make-location 'error file line col)
'help-echo "Go to error location"))
+(defconst geiser-edit--default-file-rx
+ "^\\([^<>:\n\"]+\\):\\([0-9]+\\):\\([0-9]+\\)")
+
+(defun geiser-edit--buttonize-files (&optional rx)
+ (let ((rx (or rx geiser-edit--default-file-rx)))
+ (save-excursion
+ (while (re-search-forward rx nil t)
+ (geiser-edit--make-link (match-beginning 1)
+ (match-end 1)
+ (match-string 1)
+ (match-string 2)
+ (match-string 3)
+ 'window)))))
+
;;; Commands: