/bin/emacs-tags

http://github.com/rejeep/emacs · #! · 17 lines · 14 code · 3 blank · 0 comment · 0 complexity · 4e9edc1afa7b7f5adf8f1d087e697f22 MD5 · raw file

  1. #!/usr/bin/env emacs --script
  2. ;; Creates a TAGS file for all .el files in the given path (none path
  3. ;; means ~/.emacs.d) and places it in the current folder.
  4. ;;
  5. ;; Usage:
  6. ;; emacs-tags
  7. ;; emacs-tags path
  8. ;; emacs-tags path1 path2 ...
  9. (require 'find-lisp)
  10. (let ((files) (paths (or argv (list "~/.emacs.d"))))
  11. (dolist (path paths)
  12. (setq files (append files (find-lisp-find-files path "\\.el$"))))
  13. (shell-command (concat "etags " (mapconcat 'identity files " "))))
  14. (message "Successfully created TAGS file")