]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-compat.el
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
[gnu-emacs] / lisp / org / org-compat.el
index 9c92903314a505a6405438aa0da9c0a4180753e4..2e35c0982ea5d66a0c3b15d68052c759438743c1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; org-compat.el --- Compatibility code for Org-mode
 
-;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2016 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
@@ -34,8 +34,6 @@
 
 (require 'org-macs)
 
-(declare-function w32-focus-frame "term/w32-win" (frame))
-
 ;; The following constant is for backward compatibility.  We do not use
 ;; it in org-mode, because the Byte compiler evaluates (featurep 'xemacs)
 ;; at compilation time and can therefore optimize code better.
@@ -241,7 +239,7 @@ ignored in this case."
   (or window (selected-window)))
 
 (defun org-number-sequence (from &optional to inc)
-  "Call `number-sequence or emulate it."
+  "Call `number-sequence' or emulate it."
   (if (fboundp 'number-sequence)
       (number-sequence from to inc)
     (if (or (not to) (= from to))
@@ -411,13 +409,16 @@ Pass BUFFER to the XEmacs version of `move-to-column'."
         (when focus-follows-mouse
           (set-mouse-position frame (1- (frame-width frame)) 0)))))
 
-(defalias 'org-float-time
-  (if (featurep 'xemacs) 'time-to-seconds 'float-time))
+(define-obsolete-function-alias 'org-float-time 'float-time "25.2")
 
 ;; `user-error' is only available from 24.2.50 on
 (unless (fboundp 'user-error)
   (defalias 'user-error 'error))
 
+;; ‘format-message’ is available only from 25 on
+(unless (fboundp 'format-message)
+  (defalias 'format-message 'format))
+
 (defmacro org-no-popups (&rest body)
   "Suppress popup windows.
 Let-bind some variables to nil around BODY to achieve the desired
@@ -475,9 +476,9 @@ LIMIT."
       (not (null pos)))))
 
 (defalias 'org-font-lock-ensure
-  (if (fboundp 'org-font-lock-ensure)
+  (if (fboundp 'font-lock-ensure)
       #'font-lock-ensure
-    (lambda (_beg _end) (font-lock-fontify-buffer))))
+    (lambda (&optional _beg _end) (font-lock-fontify-buffer))))
 
 (defun org-floor* (x &optional y)
   "Return a list of the floor of X and the fractional part of X.