Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(defun lookup-raylib-for-jaylib ()
"Lookup C raylib definition for jaylib construct.
Requires TAGS file be built first for raylib.
To build the TAGS file with Universal Ctags (, in the project
directory of raylib, try: \"ctags -e -R .\""
(when-let ((name (thing-at-point 'symbol :no-properties)))
(let* ((parts (split-string name "-"))
(caps (mapcar #'capitalize parts))
(old-tags-file-path tags-file-name))
;; XXX: not sure if this is good enough for restoring
(visit-tags-table (expand-file-name "~/src/raylib/TAGS"))
(xref-find-definitions (string-join caps))
(visit-tags-table old-tags-file-path))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment