diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2011-05-02 09:42:11 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2011-05-02 09:42:11 +0200 |
commit | d8625e809f6291aaddebf605b05c54a023ee402e (patch) | |
tree | 572260a806ee3bf5d6e8e65503822486b5169641 | |
parent | 71400037f32d25e5c0702725bfadc41545626e30 (diff) | |
download | org-mode-d8625e809f6291aaddebf605b05c54a023ee402e.tar.gz |
Make `org-save-outline-visibility' macro return a useful value
Modified from a patch by Paul Sexton
-rw-r--r-- | lisp/org-macs.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 2c927f4..df3c2e6 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -323,16 +323,18 @@ but it also means that the buffer should stay alive during the operation, because otherwise all these markers will point nowhere." (declare (indent 1)) - `(let ((data (org-outline-overlay-data ,use-markers))) + `(let ((data (org-outline-overlay-data ,use-markers)) + rtn) (unwind-protect (progn - ,@body + (setq rtn (progn ,@body)) (org-set-outline-overlay-data data)) (when ,use-markers (mapc (lambda (c) (and (markerp (car c)) (move-marker (car c) nil)) (and (markerp (cdr c)) (move-marker (cdr c) nil))) - data))))) + data))) + rtn)) (defmacro org-with-wide-buffer (&rest body) "Execute body while temporarily widening the buffer." |