X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/42e910349d699ee3f8024371ca1e60e015fc6aa7..eed18bf1fd1162872e196091ab795a773f277e8e:/lisp/org/org-compat.el diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 70c41d53cd..4466b0be80 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))))) @@ -312,8 +312,7 @@ Works on both Emacs and XEmacs." (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." @@ -347,18 +346,8 @@ Works on both Emacs and XEmacs." "Move to column COLUMN. Pass COLUMN and FORCE to `move-to-column'. Pass BUFFER to the XEmacs version of `move-to-column'." - (let* ((with-bracket-link - (save-excursion - (forward-line 0) - (looking-at (concat "^.*" org-bracket-link-regexp)))) - (buffer-invisibility-spec - (cond - ((or (not (derived-mode-p 'org-mode)) - (and with-bracket-link (org-invisible-p2))) - (remove '(org-link) buffer-invisibility-spec)) - (with-bracket-link - (remove t buffer-invisibility-spec)) - (t buffer-invisibility-spec)))) + (let ((buffer-invisibility-spec + (remove '(org-filtered) buffer-invisibility-spec))) (if (featurep 'xemacs) (org-xemacs-without-invisibility (move-to-column column force buffer)) @@ -489,6 +478,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."