diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-05 23:46:01 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-05 23:46:01 -0800 |
commit | 265b369cf8e0efca7ba2eb864affc330dc8b2077 (patch) | |
tree | 027618c3947a46771416d43964ac3b7eafa4d17a | |
parent | 35942b81d12cb587d10a8cbf82d20e2b93bc48f7 (diff) | |
download | txr-265b369cf8e0efca7ba2eb864affc330dc8b2077.tar.gz txr-265b369cf8e0efca7ba2eb864affc330dc8b2077.tar.bz2 txr-265b369cf8e0efca7ba2eb864affc330dc8b2077.zip |
tags: handle option struct slots with more care
* tags.tl (collect-tags): In proccessing a
define-option-struct, don't record a tag for a
long or short option that is nil. Each option definition
defines only one slot. If both a long and short option are
present (non-nil), then the long option names the slot.
-rwxr-xr-x | tags.tl | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -101,8 +101,10 @@ (let ((struct-name (cadr obj))) (add (ntag struct-tag struct-name)) (each ((obj (cdddr obj))) - (add (ntag slot-tag (car obj) struct-name)) - (add (ntag slot-tag (cadr obj) struct-name))))) + (tree-bind (short long . rest) obj + (cond + (long (add (ntag slot-tag long struct-name))) + (short (add (ntag slot-tag short struct-name)))))))) ((defstruct) (let ((struct-obj obj) (struct-name (tree-case (cadr obj) |