mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-22 10:49:19 +00:00
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.
This commit is contained in:
parent
1197b73769
commit
4ef83fbdc9
|
@ -372,15 +372,15 @@ TIME defaults to the current time."
|
||||||
(time-to-seconds (or time (current-time)))
|
(time-to-seconds (or time (current-time)))
|
||||||
(float-time time)))
|
(float-time time)))
|
||||||
|
|
||||||
(defun org-string-match-p (&rest args)
|
(if (fboundp 'string-match-p)
|
||||||
(if (fboundp 'string-match-p)
|
(defalias 'org-string-match-p 'string-match-p)
|
||||||
(apply 'string-match-p args)
|
(defun org-string-match-p (regexp string &optional start)
|
||||||
(save-match-data
|
(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)
|
||||||
(if (fboundp 'looking-at-p)
|
(defalias 'org-looking-at-p 'looking-at-p)
|
||||||
(apply 'looking-at-p args)
|
(defun org-looking-at-p (&rest args)
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(apply 'looking-at args))))
|
(apply 'looking-at args))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue