diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-31 22:05:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-31 22:05:46 -0700 |
commit | 3dc90b98773c3f3c23b2699ef7487e976710de7f (patch) | |
tree | 7d09f71ef29bcac733fc1179d7e79d44b403e8b3 | |
parent | 5142f130d3cf163607cfab05d40a762f4c5e3fd5 (diff) | |
download | txr-3dc90b98773c3f3c23b2699ef7487e976710de7f.tar.gz txr-3dc90b98773c3f3c23b2699ef7487e976710de7f.tar.bz2 txr-3dc90b98773c3f3c23b2699ef7487e976710de7f.zip |
tags: fix warnings using @(mdo ...).
* libtags.txr: Use @(mdo) for defining variables and
structures, so this is done as libtags.txr is parsed.
The remaining top-level actions are split off in a
separate @(do ...) placed later.
-rwxr-xr-x | libtags.txr | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libtags.txr b/libtags.txr index f41f5e4b..3410c8c9 100755 --- a/libtags.txr +++ b/libtags.txr @@ -1,5 +1,5 @@ #!/usr/bin/env txr -@(do +@(mdo ;; TODO ;; #. etags support (update to new hash table format, etc.). ;; #. Remove obsolete symbols (flip, etc.). @@ -65,14 +65,6 @@ (defvarl emacs) (defvarl verbose) - (let ((o (new libtags-opts))) - o.(getopts *args*) - (set output (cond (o.output o.output) - (o.emacs "TAGS") - (t "tags"))) - (set emacs o.emacs) - (set verbose o.verbose)) - (defvarl ix-tags (hash :equal-based)) ;; FIXME Rename to sym-vars? (defvarl var-syms (hash :equal-based)) @@ -83,7 +75,7 @@ ;; actual function. (when oldkey (del [ix-tags oldkey])) - (upd [ix-tags newkey] (append @1 (list tag)))) + (upd [ix-tags newkey] (append (sys:var 1) (list tag)))) (defun qualify-sym (sym pkg) (join (casequal pkg @@ -99,6 +91,14 @@ (mequal fun "op_error" "op_meta_error" "op_qquote_error" "op_unquote_error"))) +@(do + (let ((o (new libtags-opts))) + o.(getopts *args*) + (set output (cond (o.output o.output) + (o.emacs "TAGS") + (t "tags"))) + (set emacs o.emacs) + (set verbose o.verbose))) @(bind var_s #/\w[\w\d]*_s/) @(bind cident #/\w[\w\d]*/) @(bind regfun #/reg_(op|mac|fun)/) |