diff options
author | David Maus <dmaus@ictsoc.de> | 2012-02-08 20:09:48 +0100 |
---|---|---|
committer | David Maus <dmaus@ictsoc.de> | 2012-02-08 20:09:48 +0100 |
commit | c9a510cf8ea5e9e6701a20f6f795eb4fc17dc95a (patch) | |
tree | 1d17a07ad81e69b250cfb130eb57dc2ac3c711a9 | |
parent | a561b3b77e922db5f059778e7b22171be05947b9 (diff) | |
download | org-mode-c9a510cf8ea5e9e6701a20f6f795eb4fc17dc95a.tar.gz |
Moved `org-in-clocktable-p' from org-clock.el to org.el
* org-clock.el (org-in-clocktable-p): Moved to org.el.
* org.el (org-in-clocktable-p): New function. Moved from org-clock.el
Fixes a bug reported by suvayu ali in
<CAMXnza2W9VSJ2d-dDmsByNmTVgxnt1Onp=J5S=TsFEi8MOVNtg@mail.gmail.com>.
`org-context' depends on the function but org.el does not depend on
org-clock.el.
-rw-r--r-- | lisp/org-clock.el | 11 | ||||
-rw-r--r-- | lisp/org.el | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 6211ae4..a1df776 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1763,17 +1763,6 @@ buffer and update it." (org-combine-plists org-clock-clocktable-default-properties props)))) (org-update-dblock)) -(defun org-in-clocktable-p () - "Check if the cursor is in a clocktable." - (let ((pos (point)) start) - (save-excursion - (end-of-line 1) - (and (re-search-backward "^[ \t]*#\\+BEGIN:[ \t]+clocktable" nil t) - (setq start (match-beginning 0)) - (re-search-forward "^[ \t]*#\\+END:.*" nil t) - (>= (match-end 0) pos) - start)))) - (defun org-day-of-week (day month year) "Returns the day of the week as an integer." (nth 6 diff --git a/lisp/org.el b/lisp/org.el index 4d3d804..882a41c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19335,6 +19335,17 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (eval form) (error (format "%%![Error: %s]" error)))) +(defun org-in-clocktable-p () + "Check if the cursor is in a clocktable." + (let ((pos (point)) start) + (save-excursion + (end-of-line 1) + (and (re-search-backward "^[ \t]*#\\+BEGIN:[ \t]+clocktable" nil t) + (setq start (match-beginning 0)) + (re-search-forward "^[ \t]*#\\+END:.*" nil t) + (>= (match-end 0) pos) + start)))) + (defun org-in-commented-line () "Is point in a line starting with `#'?" (equal (char-after (point-at-bol)) ?#)) |