emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch] make 'org-save-outline-visibility' return a useful value
@ 2011-04-22  3:11 Paul Sexton
  2011-05-02  7:44 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Sexton @ 2011-04-22  3:11 UTC (permalink / raw)
  To: emacs-orgmode

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-02  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-22  3:11 [patch] make 'org-save-outline-visibility' return a useful value Paul Sexton
2011-05-02  7:44 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).