diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-05 23:12:14 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-05 23:12:14 -0800 |
commit | 30660b162860f742a0ade2dc9dc017226eb7289f (patch) | |
tree | e159551b193aadde42a4ca188fcd0691a3d01d7f | |
parent | d78a9fc8069a3ac2198f9b2d2f69386cc5873e60 (diff) | |
download | txr-30660b162860f742a0ade2dc9dc017226eb7289f.tar.gz txr-30660b162860f742a0ade2dc9dc017226eb7289f.tar.bz2 txr-30660b162860f742a0ade2dc9dc017226eb7289f.zip |
tags: implement merge with merge function.
* tags.tl (write-tagfile): Since we can assume that the tags
file is sorted, and the tags coming into this function are
likewise sorted, we can just merge the sorted lists.
Then, we don't have to sort the tags list a second time.
-rwxr-xr-x | tags.tl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -135,10 +135,10 @@ (orig-tags (collect-each ((line lines)) (new orig-tag ident (m^ #/[^\t]*/ line) line line)))) - (set tags (append tags orig-tags))) + (set tags (merge tags orig-tags : .ident))) (path-not-found (e)))) (with-stream (stream (open-file "tags" (if o.append "a" "w"))) - (each ((tag (sort tags : .ident))) + (each ((tag tags)) (put-line tag.(text) stream)))) (let ((o (new tags-opts))) |