summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernt Hansen <bernt@norang.ca>2014-06-15 02:50:07 (GMT)
committer Nicolas Goaziou <mail@nicolasgoaziou.fr>2014-06-15 07:27:16 (GMT)
commit61e06a038adc302922c338c6a1956bc51d7bf95d (patch)
treee7a1f68c80345497d24e5e77ae70eafa21e6c399
parent3a1e6a3c3aa07a030edcc7a9bb75b4b153c07e59 (diff)
downloadorg-mode-61e06a038adc302922c338c6a1956bc51d7bf95d.zip
org-mode-61e06a038adc302922c338c6a1956bc51d7bf95d.tar.gz
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.
-rw-r--r--lisp/org-macs.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index ddd6e2e..96265ec 100644
--- a/lisp/org-macs.el
+++ b/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)