浏览代码

org.el: set `org-ts-what' correctly in `org-at-timestamp-p'.

(org-at-timestamp-p): set `org-ts-what' in a way that point will be
considered to be "on the bracket" whether it is really on it or right
after it.

Thanks to Matt Lundin for reporting this and to Nicolas Goaziou for
discussion about this.
Bastien Guerry 13 年之前
父节点
当前提交
e01ce26c0b
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lisp/org.el

+ 4 - 1
lisp/org.el

@@ -15586,7 +15586,10 @@ With prefix ARG, change that many days."
 	 (setq org-ts-what
 	      (cond
 	       ((= pos (match-beginning 0))         'bracket)
-	       ((= pos (1- (match-end 0)))          'bracket)
+	       ;; Point is considered to be "on the bracket" whether
+	       ;; it's really on it or right after it.
+	       ((or (= pos (1- (match-end 0)))
+                    (= pos (match-end 0)))          'bracket)
 	       ((org-pos-in-match-range pos 2)      'year)
 	       ((org-pos-in-match-range pos 3)      'month)
 	       ((org-pos-in-match-range pos 7)      'hour)