summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-07-07 02:05:24 +0530
committerArun Isaac2022-07-07 02:26:07 +0530
commit79ff40694a28834e581f3c108d343a90dcd5ecbe (patch)
treea4d9d4df356b6bc07589b794268fb63f2690f7ff
parentce731958fa24752850ad669a50c04fe2a1348aa5 (diff)
downloadtissue-79ff40694a28834e581f3c108d343a90dcd5ecbe.tar.gz
tissue-79ff40694a28834e581f3c108d343a90dcd5ecbe.tar.lz
tissue-79ff40694a28834e581f3c108d343a90dcd5ecbe.zip
issue: Rename hashtable-append! to hashtable-prepend!.
Even hashtable-append! was prepending, not appending. We change its name to suit. * tissue/issue.scm (hashtable-append!): Rename to hashtable-prepend!. (file-details): Call hashtable-prepend! instead of hashtable-append!.
-rw-r--r--tissue/issue.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm
index 4c9ca84..4ff06f8 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -253,8 +253,8 @@ object representing a list of search results."
,@snippet))
(list)))))
-(define (hashtable-append! hashtable key new-values)
- "Append NEW-VALUES to the list of values KEY is associated to in
+(define (hashtable-prepend! hashtable key new-values)
+ "Prepend NEW-VALUES to the list of values KEY is associated to in
HASHTABLE. Deduplicate the resulting list if necessary. If KEY is not
associated to any value in HASHTABLE, assume it is associated to the
empty list."
@@ -338,11 +338,11 @@ gemtext file."
;; their keys.
(for-each (match-lambda
(((or 'assign 'assigned) . values)
- (hashtable-append! result 'assigned
- (map (cut resolve-alias <> (%aliases))
- values)))
+ (hashtable-prepend! result 'assigned
+ (map (cut resolve-alias <> (%aliases))
+ values)))
(((or 'keywords 'severity 'status 'priority 'tags 'type) . values)
- (hashtable-append! result 'keywords values))
+ (hashtable-prepend! result 'keywords values))
(_ #t))
alist)))
;; A more fuzzy heuristic to find keywords
@@ -362,9 +362,9 @@ gemtext file."
"testing" "later" "documentation"
"help" "closed")))
(comma-split (string-remove-prefix "* " line))))
- (hashtable-append! result 'keywords
- (comma-split
- (string-remove-prefix "* " line))))
+ (hashtable-prepend! result 'keywords
+ (comma-split
+ (string-remove-prefix "* " line))))
;; The first level one heading is the
;; title.
((string-prefix? "# " line)