emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [patch] make 'org-save-outline-visibility' return a useful value


From: Carsten Dominik
Subject: Re: [O] [patch] make 'org-save-outline-visibility' return a useful value
Date: Mon, 2 May 2011 09:44:04 +0200

Hi Paul,

I think this patch is buggy, if only because it introduces an extra
closing parenthesis.

I have applied a different version - please verify that it does
behave as intended.

- Carsten

On Apr 22, 2011, at 5:11 AM, Paul Sexton wrote:

> 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)
> 
> 
> 

- Carsten






reply via email to

[Prev in Thread] Current Thread [Next in Thread]