Subject: bug#5477: 23.1.91; diary-unhide-everything sometimes doesn't

From: Stephen Berman <[email-masked]>
Date: Tue, 26 Jan 2010 22:05:00 +0100

On Tue, 26 Jan 2010 15:21:32 -0500 Glenn Morris <[email-masked]> wrote:

> Stephen Berman wrote:
>
>>   (defun diary-unhide-everything ()
>>     "Show all invisible text in the diary."
>>     (kill-local-variable 'diary-selective-display)
>> !   (save-excursion
>> !     (save-restriction
>> !       (widen)
>> !       (remove-overlays (point-min) (point-max) 'invisible 'diary)))
>>     (kill-local-variable 'mode-line-format))
>
> This seems fine. Is your save-excursion really necessary?

No, it's superfluous, sorry.  That nesting is so common, I didn't stop
to think.  Thanks for the heads up.

Steve Berman

*** /tmp/ediff3766uVW	2010-01-26 21:56:24.000000000 +0100
--- /home/steve/bzr/emacs/quickfixes/lisp/calendar/diary-lib.el	2010-01-26 21:55:19.000000000 +0100
***************
*** 804,810 ****
  (defun diary-unhide-everything ()
    "Show all invisible text in the diary."
    (kill-local-variable 'diary-selective-display)
!   (remove-overlays (point-min) (point-max) 'invisible 'diary)
    (kill-local-variable 'mode-line-format))
  
  (defvar original-date)                  ; bound in diary-list-entries
--- 804,812 ----
  (defun diary-unhide-everything ()
    "Show all invisible text in the diary."
    (kill-local-variable 'diary-selective-display)
!   (save-restriction
!     (widen)
!     (remove-overlays (point-min) (point-max) 'invisible 'diary))
    (kill-local-variable 'mode-line-format))
  
  (defvar original-date)                  ; bound in diary-list-entries