Skip to content

Instantly share code, notes, and snippets.

@sarg
Created March 29, 2020 19:04
Show Gist options
  • Save sarg/a73b5821cf16879ed02b9066ef8b7c4e to your computer and use it in GitHub Desktop.
Save sarg/a73b5821cf16879ed02b9066ef8b7c4e to your computer and use it in GitHub Desktop.
Make geiser find guix package definitions
(defun geiser-edit--goto-line-guix (symbol line)
(unless (numberp line)
(goto-char (point-min))
(when (re-search-forward
(rx (seq "(define-public"
(one-or-more " ")
symbol-start (literal (format "%s" symbol)) symbol-end))
nil t)
(goto-char (match-beginning 0)))))
(advice-add
'geiser-edit--goto-line :before-until #'geiser-edit--goto-line-guix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment