diff options
Diffstat (limited to 'lisp/org/org-compat.el')
-rw-r--r-- | lisp/org/org-compat.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 90380a8806c..447505ceafb 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -295,7 +295,7 @@ Works on both Emacs and XEmacs." (setq mark-active t) (when (and (boundp 'transient-mark-mode) (not transient-mark-mode)) - (setq transient-mark-mode 'lambda)) + (set (make-local-variable 'transient-mark-mode) 'lambda)) (when (boundp 'zmacs-regions) (setq zmacs-regions t))))) @@ -411,12 +411,8 @@ Pass BUFFER to the XEmacs version of `move-to-column'." (when focus-follows-mouse (set-mouse-position frame (1- (frame-width frame)) 0))))) -(defun org-float-time (&optional time) - "Convert time value TIME to a floating point number. -TIME defaults to the current time." - (if (featurep 'xemacs) - (time-to-seconds (or time (current-time))) - (float-time time))) +(defalias 'org-float-time + (if (featurep 'xemacs) 'time-to-seconds 'float-time)) ;; `user-error' is only available from 24.2.50 on (unless (fboundp 'user-error) @@ -478,6 +474,11 @@ LIMIT." (looking-at (concat "\\(?:" regexp "\\)\\'"))))) (not (null pos))))) +(defalias 'org-font-lock-ensure + (if (fboundp 'org-font-lock-ensure) + #'font-lock-ensure + (lambda (_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. With two arguments, return floor and remainder of their quotient." |