commit 453bf2f9827b9604302fedd0091d422496c0322e Spenser Truex <truex@equwal.com> 2025-09-04 23:42:45 -0700 New format for config files
README | 6 +++++- config/local.conf | 1 + config/root.conf | 1 + tag-gen.lisp | 5 +++-- 4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/README b/README index 0dc2f3a..476e3f0 100644 --- a/README +++ b/README @@ -24,9 +24,13 @@ Signature: tags.conf needs to contain this kind of format: + +"/path/to/ctags/program" + (("<directory>" ("<ext>"...)) ...) -See examples in config-examples. Configuration is **mandatory** for the program to work. +See examples in config-examples. Configuration is **mandatory** for the +program to work. The format is just read with the lisp reader. For example: (("/home/jose/.emacs.d" ("el")) diff --git a/config/local.conf b/config/local.conf index 7b4e313..c5dcf22 100644 --- a/config/local.conf +++ b/config/local.conf @@ -1,3 +1,4 @@ +"/usr/bin/ctags" (("/home/username/.emacs.d" ("el")) ("/home/username/src/sf/sbcl/sbcl" ("lisp" "c")) ("/home/username/src/savannah/emacs" ("el" "c")) diff --git a/config/root.conf b/config/root.conf index 604f796..1f02a80 100644 --- a/config/root.conf +++ b/config/root.conf @@ -1 +1,2 @@ +"/usr/bin/ctags" (("/usr/include" ("c" "h"))) diff --git a/tag-gen.lisp b/tag-gen.lisp index ef4c75c..d9a7626 100644 --- a/tag-gen.lisp +++ b/tag-gen.lisp @@ -48,7 +48,8 @@ (extensions (caar tags) (cadar tags)) (tag-gen (cdr tags) tag-program)))) -(defun main (conf tag-program &rest argv) +(defun main (conf &rest argv) (declare (ignorable argv)) (with-open-file (s conf :direction :input) - (tag-gen (read s) (unix-namestring tag-program)))) + (let ((tag-program (read s))) + (tag-gen (read s) (unix-namestring tag-program)))))