[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [patch] make 'org-save-outline-visibility' return a useful value
From: |
Paul Sexton |
Subject: |
[O] [patch] make 'org-save-outline-visibility' return a useful value |
Date: |
Fri, 22 Apr 2011 03:11:45 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
The macro 'org-save-outline-visibility' in org-macs.el seems like
it should return the value of the last statement in its body (like
save-excursion and save-restriction do). Instead it discards this
value and returns nothing useful.
The macro is only used in 2 places in the org sources, and its
return value is ignored in both. I feel it would be more useful if
it returned the value of the last expression in its body. A patch
to this effect is attached.
Paul
--- C:/Users/paul/org-macs.el Fri Apr 22 14:57:07 2011
+++ C:/Users/paul/org-macs-new.el Fri Apr 22 14:56:51 2011
@@ -325,8 +325,9 @@
(declare (indent 1))
`(let ((data (org-outline-overlay-data ,use-markers)))
(unwind-protect
+ (prog1
(progn
- ,@body
+ ,@body)
(org-set-outline-overlay-data data))
(when ,use-markers
(mapc (lambda (c)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] [patch] make 'org-save-outline-visibility' return a useful value,
Paul Sexton <=