diff options
authorJoost Kremers <>2017-03-11 23:30:12 +0100
committerJoost Kremers <>2017-03-11 23:30:12 +0100
commita529c60c4ca45ac564f624e9d021066213337d6a (patch)
parenta0ca8b1e362dfae50b70b94e62f26670404ab1e2 (diff)
Update doc string of `parsebib--expand-strings'.
1 files changed, 6 insertions, 1 deletions
diff --git a/parsebib.el b/parsebib.el
index 214a14e..a6ff549 100644
--- a/parsebib.el
+++ b/parsebib.el
@@ -172,7 +172,12 @@ double quotes around field values are removed."
(string-join (nreverse res) " # "))))
(defun parsebib--expand-strings (strings abbrevs)
- "Replace STRINGS with expansions in ABBREVS."
+ "Expand strings in STRINGS using expansions in ABBREVS.
+STRINGS is a list of strings. If a string in STRINGS has an
+expansion in hash table ABBREVS, replace it with its expansion.
+Otherwise, if the string is enclosed in braces {} or double
+quotes \"\", remove the delimiters. In addition, newlines and
+multiple spaces in the string are replaced with a single space."
(mapcar (lambda (str)
(or (gethash str abbrevs)
(progn (setq str (replace-regexp-in-string "[ \t\n\f]+" " " str))