Browse Source

org.el: Fix custom timestamps for date ranges

* org.el (org-activate-dates): Change `org-activate-dates' to activate
custom timestamps for both dates in date ranges. Formerly, only the
second date would be activated. The reason was a misplaced
`if'. Replaced it with `when'. Also added doc comments.

TINYCHANGE
Jan Seeger 7 years ago
parent
commit
1849f391bc
1 changed files with 4 additions and 3 deletions
  1. 4 3
      lisp/org.el

+ 4 - 3
lisp/org.el

@@ -6208,9 +6208,10 @@ by a #."
 			       'keymap org-mouse-map))
     (org-rear-nonsticky-at (match-end 0))
     (when org-display-custom-times
-      (if (match-end 3)
-	  (org-display-custom-time (match-beginning 3) (match-end 3))
-	(org-display-custom-time (match-beginning 1) (match-end 1))))
+      ;; If it's a date range, activate custom time for second date.
+      (when (match-end 3)
+	(org-display-custom-time (match-beginning 3) (match-end 3)))
+      (org-display-custom-time (match-beginning 1) (match-end 1)))
     t))
 
 (defvar-local org-target-link-regexp nil