next (+ from (* n inc)))))
(nreverse seq)))))
+;; `set-transient-map' is only in Emacs >= 24.4
+(defalias 'org-set-transient-map
+ (if (fboundp 'set-transient-map)
+ 'set-transient-map
+ 'set-temporary-overlay-map))
+
;; Region compatibility
(defvar org-ignore-region nil
(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)))))
(defun org-in-invisibility-spec-p (arg)
"Is ARG a member of `buffer-invisibility-spec'?"
(if (consp buffer-invisibility-spec)
- (member arg buffer-invisibility-spec)
- nil))
+ (member arg buffer-invisibility-spec)))
(defmacro org-xemacs-without-invisibility (&rest body)
"Turn off extents with invisibility while executing BODY."
(org-xemacs-without-invisibility (indent-line-to column))
(indent-line-to column)))
-(defun org-move-to-column (column &optional force buffer ignore-invisible)
- (let ((buffer-invisibility-spec ignore-invisible))
+(defun org-move-to-column (column &optional force buffer)
+ "Move to column COLUMN.
+Pass COLUMN and FORCE to `move-to-column'.
+Pass BUFFER to the XEmacs version of `move-to-column'."
+ (let ((buffer-invisibility-spec
+ (remove '(org-filtered) buffer-invisibility-spec)))
(if (featurep 'xemacs)
- (org-xemacs-without-invisibility (move-to-column column force buffer))
+ (org-xemacs-without-invisibility
+ (move-to-column column force buffer))
(move-to-column column force))))
(defun org-get-x-clipboard-compat (value)
(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."