diff options
author | Bastien Guerry <bzg@altern.org> | 2011-03-09 10:56:47 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-03-09 10:56:47 +0100 |
commit | f54814d108aa2efeaef7e9399e0ff634e0c7a643 (patch) | |
tree | 7f84e9c60f8be47ded4c62cf68646dc5616c6451 | |
parent | 4090006ab124dd10698f21f1ee44c913b5faf990 (diff) | |
download | org-mode-f54814d108aa2efeaef7e9399e0ff634e0c7a643.tar.gz |
org-macs.el (org-with-wide-buffer): Bugfix.
* org-macs.el (org-with-wide-buffer): Bugfix: use
`save-excursion' and `save-restriction'.
-rw-r--r-- | lisp/org-macs.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el index e67ddb8..5c1c6d2 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -334,13 +334,11 @@ point nowhere." data))))) (defmacro org-with-wide-buffer (&rest body) - "Execute body while temporarily widening the buffer." - `(let ((beg (point-min)) (end (point-max)) (pos (point))) - (prog2 - (widen) - ,@body - (narrow-to-region beg end) - (goto-char pos)))) + "Execute body while temporarily widening the buffer." + `(save-excursion + (save-restriction + (widen) + ,@body))) (defmacro org-with-limited-levels (&rest body) "Execute BODY with limited number of outline levels." |