1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Provide compatibility function for `activate-mark'

* org-exp.el (org-export): Use new compatibility function
  `org-activate-mark'.
* org-compat.el (org-activate-mark): New function. Provide
  `activate-mark' if not present (e.g. Emacs22).

Emacs 22 misses this function. Defun copied from Emac23's
`active-mark' but removed reference to customization variable
`select-active-regions' which is not present in Emacs22.
This commit is contained in:
David Maus 2011-05-29 20:50:18 +02:00
parent 48d970a916
commit e47fcaae35
2 changed files with 10 additions and 1 deletions

View File

@ -247,6 +247,15 @@ Works on both Emacs and XEmacs."
(> (point) (region-beginning)))
(exchange-point-and-mark)))
;; Emacs 22 misses `activate-mark'
(if (fboundp 'activate-mark)
(defalias 'org-activate-mark 'activate-mark)
(defun org-activate-mark ()
(when (mark t)
(setq mark-active t)
(unless transient-mark-mode
(setq transient-mark-mode 'lambda)))))
;; Invisibility compatibility
(defun org-remove-from-invisibility-spec (arg)

View File

@ -1031,7 +1031,7 @@ Pressing `1' will switch between these two options."
(set-process-sentinel p 'org-export-process-sentinel)
(message "Background process \"%s\": started" p))
;; background processing not requested, or not possible
(if subtree-p (progn (org-mark-subtree) (activate-mark)))
(if subtree-p (progn (org-mark-subtree) (org-activate-mark)))
(call-interactively (nth 1 ass))
(when (and bpos (get-buffer-window cbuf))
(let ((cw (selected-window)))