after-save-hook set to diary-redraw-calendar when calendar buffer was previously marked

Jeff Miller jmiller at cablespeed.com
Tue Jul 10 18:59:31 EDT 2007


Dr. Volker Zell writes:
 > Hi
 > 
 > I recently upgraded the calendar package from 1.23 to 1.32 (xemacs
 > versions) which seems to be more or less in sync with the latest

It should be very close. 

 > package from emacs-22.1. There is a new function
 > 'diary-redraw-calendar'.
 > 
 > Whenever I save a file the previously marked calendar buffer will
 > be remarked, which on my machine takes about 2 annoying
 > seconds. Checking the after-save-hook variable, shows that
 > diary-redraw-calendar is set unconditionally after first marking
 > diary entries.
 > 
 > Latest emacs doesn't show this behaviour. Steps to reproduce:
 > 
 > Start with xemacs -q  (21.4.20)
 > 
 > M-x calendar
 > M-x mark-diary-entries
 > M-x describe-variable
 > ->after-save-hook       => (diary-redraw-calendar)
 > 
 > 
 > Start with emacs -q (Latest 22.1)
 > 
 > M-x calendar
 > M-x mark-diary-entries
 > M-x describe-variable
 > ->after-save hook       => nil

Another annoying difference between Emacs and XEmacs.  Diary-mode is
what adds (diary-redraw-calendar) to after-save-hook.  It's being
added with the "local" option set to t.  In Emacs, this causes the the
hook to become buffer local.  In XEmacs, this option only has an
effect if the hook is already buffer-local.  Otherwise, it's added to
the global hook.  I've added a call to make-hook-local to correct
this.

Jeff 


-- 
Jeff Miller
jmiller at cablespeed.com



More information about the XEmacs-Beta mailing list