From d77b7c6c7b6184ace641c28de0da2df496136011 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Sun, 22 Jun 2014 09:43:58 +0400 Subject: [PATCH] Backport commit 9c3883b from Emacs master branch * lisp/org-mouse.el (org-mouse-do-remotely): Prefer point-marker to copy-marker of point. * lisp/ob-core.el (org-babel-insert-result): Prefer point-min-marker and point-max-marker. Conflicts: lisp/org-mouse.el --- lisp/ob-core.el | 4 ++-- lisp/org-mouse.el | 4 ++-- lisp/org-table.el | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index a6ffcc48b..c995b6ea4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2043,8 +2043,8 @@ code ---- the results are extracted in the syntax of the source t info hash indent))) (results-switches (cdr (assoc :results_switches (nth 2 info)))) - (visible-beg (copy-marker (point-min))) - (visible-end (copy-marker (point-max))) + (visible-beg (point-min-marker)) + (visible-end (point-max-marker)) ;; When results exist outside of the current visible ;; region of the buffer, be sure to widen buffer to ;; update them. diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 74046c73f..718f34667 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -1008,7 +1008,7 @@ This means, between the beginning of line and the point." (let ((endmarker (with-current-buffer buffer (org-end-of-subtree nil t) (unless (eobp) (forward-char 1)) - (copy-marker (point))))) + (point-marker)))) (org-with-remote-undo buffer (with-current-buffer buffer (widen) @@ -1018,7 +1018,7 @@ This means, between the beginning of line and the point." (and (outline-next-heading) (org-flag-heading nil))) ; show the next heading (org-back-to-heading) - (setq marker (copy-marker (point))) + (setq marker (point-marker)) (goto-char (max (point-at-bol) (- (point-at-eol) anticol))) (funcall command) (message "_cmd: %S" org-mouse-cmd) diff --git a/lisp/org-table.el b/lisp/org-table.el index 1b6a4089f..8c9a83d88 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3183,9 +3183,9 @@ with the prefix ARG." (save-excursion ;; Insert a temporary formula at right after the table (goto-char (org-table-TBLFM-begin)) - (setq s (set-marker (make-marker) (point))) + (setq s (point-marker)) (insert (concat formula "\n")) - (setq e (set-marker (make-marker) (point))) + (setq e (point-marker)) ;; Recalculate the table (beginning-of-line 0) ; move to the inserted line (skip-chars-backward " \r\n\t")