summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2010-10-29 13:28:31 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2010-11-04 12:30:38 +0100
commit4ef83fbdc99979f6bfef40b234c76b2e34e89379 (patch)
tree5ce4759151ae8351b1e1d2ed0b3f8a778199f74b
parent1197b73769fb4855c2785cd2f2a3f1b36408a7e1 (diff)
downloadorg-mode-4ef83fbdc99979f6bfef40b234c76b2e34e89379.tar.gz
org-compat: defalias string-match-p and looking-at-p rather than defun
Signed-off-by: Julien Danjou <julien@danjou.info> * lisp/org-compat.el: Create defalias for `string-match-p' and looking-at-p.
-rw-r--r--lisp/org-compat.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index d55a83e..aa3177f 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -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))))