emacs-devel
[Top][All Lists]
Advanced

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

Re: Recent changes to Calendar/Diary


From: Stefan Monnier
Subject: Re: Recent changes to Calendar/Diary
Date: Mon, 19 Sep 2005 11:49:28 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> Hmm.... curious ... I'll take yet another look,
> Note that I installed a change yesterday to that effect.

I think it hides the actual problem.
A `save-excursion' around `with-current-buffer' is just very weird.

What happens if you revert your patch and apply the one below instead?


        Stefan


--- calendar.el 12 sep 2005 17:27:05 -0400      1.176
+++ calendar.el 19 sep 2005 11:45:08 -0400      
@@ -2900,8 +2900,8 @@
 MARK is a single-character string, a list of face attributes/values, or a face.
 MARK defaults to `diary-entry-marker'."
   (if (calendar-date-is-legal-p date)
+      (with-current-buffer calendar-buffer
       (save-excursion
-        (set-buffer calendar-buffer)
         (calendar-cursor-to-visible-date date)
         (let ((mark (or (and (stringp mark) (= (length mark) 1) mark) ; 
single-char
                         (and (listp mark) (> (length mark) 0) mark) ; attr list
@@ -2936,7 +2940,7 @@
                 ;; Apply the font aspects
                 (apply 'set-face-attribute temp-face nil mark)
                 (overlay-put
-                 (make-overlay (1- (point)) (1+ (point))) 'face 
temp-face))))))))
+                   (make-overlay (1- (point)) (1+ (point))) 'face 
temp-face)))))))))
 
 (defun calendar-star-date ()
   "Replace the date under the cursor in the calendar window with asterisks.




reply via email to

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