Skip to content

Instantly share code, notes, and snippets.

@PhilHudson
Created July 18, 2012 15:30
Show Gist options
  • Save PhilHudson/3136942 to your computer and use it in GitHub Desktop.
Save PhilHudson/3136942 to your computer and use it in GitHub Desktop.
rebuild_tags
#!/bin/sh
if [ "x${OSTYPE}x" = "xcygwinx" ]; then
ETAGS='etags -L'
ETAGS_INCLUDE_FILE_SWITCH='--etags-include'
elif [ "x${OSTYPE}x" = "xlinuxx" ]; then
ETAGS='etags -L'
ETAGS_INCLUDE_FILE_SWITCH='--etags-include'
else
ETAGS='etags'
ETAGS_INCLUDE_FILE_SWITCH='--include'
fi
cd "${HOME}/.emacs.d/lisp/"
find . ! -name '.#*.el' -name '*.el' -o -name '*.el.gz' | $ETAGS -
cd "${HOME}/.emacs.d/"
etags "$ETAGS_INCLUDE_FILE_SWITCH"=./lisp/TAGS *.el
@PhilHudson
Copy link
Author

Creates a TAGS file in ~/.emacs.d/lisp, then another TAGS file in .emacs.d which references (includes) the other one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment