all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Recent changes to Calendar/Diary
Date: Mon, 19 Sep 2005 11:49:28 -0400	[thread overview]
Message-ID: <jwv8xxtrre4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d5n5xj9x.fsf@pacem.orebokech.com> (Romain Francoise's message of "Mon, 19 Sep 2005 15:46:18 +0200")

>> 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	other threads:[~2005-09-19 15:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13  6:32 Recent changes to Calendar/Diary Romain Francoise
2005-09-13 15:05 ` Stefan Monnier
2005-09-16 16:04 ` Stefan Monnier
2005-09-16 16:51   ` Romain Francoise
2005-09-19 13:24     ` Stefan Monnier
2005-09-19 13:46       ` Romain Francoise
2005-09-19 15:49         ` Stefan Monnier [this message]
2005-09-19 16:05           ` Romain Francoise
2005-09-19 17:41             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8xxtrre4.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.