summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoost Kremers <joostkremers@fastmail.fm>2017-03-11 23:30:58 +0100
committerJoost Kremers <joostkremers@fastmail.fm>2017-03-11 23:30:58 +0100
commit748d6a179fcbbc4af77c7b96059a66d579f34dc8 (patch)
tree68b02df0cc0afe53d359fc5672a0b4a7227b48b2
parenta529c60c4ca45ac564f624e9d021066213337d6a (diff)
Refactor `parsebib--expand-string'.
-rw-r--r--parsebib.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/parsebib.el b/parsebib.el
index a6ff549..19286a4 100644
--- a/parsebib.el
+++ b/parsebib.el
@@ -179,12 +179,12 @@ 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))
- (cond
- ((string-match "\\`[\"{]\\(.*?\\)[\"}]\\'" str)
- (match-string 1 str))
- (t str)))))
+ (setq str (replace-regexp-in-string "[ \t\n\f]+" " " str))
+ (cond
+ ((gethash str abbrevs))
+ ((string-match "\\`[\"{]\\(.*?\\)[\"}]\\'" str)
+ (match-string 1 str))
+ (t str)))
strings))
;;;;;;;;;;;;;;;;;;;