Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active April 11, 2021 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sogaiu/8c47f5d472daad7c2e8015abd3e2cab8 to your computer and use it in GitHub Desktop.
Save sogaiu/8c47f5d472daad7c2e8015abd3e2cab8 to your computer and use it in GitHub Desktop.
(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 (ctags.io), in the project
directory of raylib, try: \"ctags -e -R .\""
(interactive)
(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