Explorar o código

org-macs: Remove restriction when locating markers

* org-macs.el: Remove restriction when locating markers

Allows org-with-point-at to locate point outside the current
restriction.
Bernt Hansen %!s(int64=10) %!d(string=hai) anos
pai
achega
61e06a038a
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      lisp/org-macs.el

+ 3 - 3
lisp/org-macs.el

@@ -154,9 +154,9 @@ We use a macro so that the test can happen at compilation time."
     `(let ((,mpom ,pom))
        (save-excursion
 	 (if (markerp ,mpom) (set-buffer (marker-buffer ,mpom)))
-	 (save-excursion
-	   (goto-char (or ,mpom (point)))
-	   ,@body)))))
+	 (org-with-wide-buffer
+	  (goto-char (or ,mpom (point)))
+	  ,@body)))))
 (def-edebug-spec org-with-point-at (form body))
 (put 'org-with-point-at 'lisp-indent-function 1)