summaryrefslogtreecommitdiff
path: root/lisp/org/org-compat.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-compat.el')
-rw-r--r--lisp/org/org-compat.el22
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index 324464803f2..452a261fd1b 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -6,7 +6,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 7.3
+;; Version: 7.4
;;
;; This file is part of GNU Emacs.
;;
@@ -372,15 +372,15 @@ TIME defaults to the current time."
(time-to-seconds (or time (current-time)))
(float-time time)))
-(defun org-string-match-p (&rest args)
- (if (fboundp 'string-match-p)
- (apply 'string-match-p args)
+(if (fboundp 'string-match-p)
+ (defalias 'org-string-match-p 'string-match-p)
+ (defun org-string-match-p (regexp string &optional start)
(save-match-data
- (apply 'string-match args))))
+ (funcall 'string-match regexp string start))))
-(defun org-looking-at-p (&rest args)
- (if (fboundp 'looking-at-p)
- (apply 'looking-at-p args)
+(if (fboundp 'looking-at-p)
+ (defalias 'org-looking-at-p 'looking-at-p)
+ (defun org-looking-at-p (&rest args)
(save-match-data
(apply 'looking-at args))))
@@ -418,6 +418,12 @@ LIMIT."
(looking-at (concat "\\(?:" regexp "\\)\\'")))))
(not (null pos)))))
+(defun org-floor* (x &optional y)
+ "Return a list of the floor of X and the fractional part of X.
+With two arguments, return floor and remainder of their quotient."
+ (let ((q (floor x y)))
+ (list q (- x (if y (* y q) q)))))
+
(provide 'org-compat)
;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe