summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-12-23 06:58:26 +0100
committerBastien Guerry <bzg@altern.org>2013-12-23 06:58:26 +0100
commitfc3857b3102aa3443d509eee04bf22eaa7bd8c59 (patch)
tree51196dfceef50e77411955ccd6755937db4d3fa0
parenta7417ffcdba4f0b1c3ff9516a7464b0c3a629383 (diff)
downloadorg-mode-fc3857b3102aa3443d509eee04bf22eaa7bd8c59.tar.gz
Small rewrite of the previous commit.
Use `regexp-opt' instead of `regexp-quote'.
-rw-r--r--lisp/org-habit.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 1eb5160..8c02849 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -200,15 +200,11 @@ This list represents a \"habit\" for the rest of this module."
(count 0))
(unless reversed (goto-char end))
(while (and (< count maxdays)
- (funcall
- search
- (format "- State \"%s\".*\\[\\([^]]+\\)\\]"
- (concat "\\("
- (mapconcat 'regexp-quote
- org-done-keywords "\\|") "\\)"))
- limit t))
+ (funcall search (format "- State \"%s\".*\\[\\([^]]+\\)\\]"
+ (regexp-opt org-done-keywords))
+ limit t))
(push (time-to-days
- (org-time-string-to-time (match-string-no-properties 2)))
+ (org-time-string-to-time (match-string-no-properties 1)))
closed-dates)
(setq count (1+ count))))
(list scheduled sr-days deadline dr-days closed-dates))))