bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#3862: 23.1.50; error calling `documentation' on calendar-mode


From: Glenn Morris
Subject: bug#3862: 23.1.50; error calling `documentation' on calendar-mode
Date: Thu, 16 Jul 2009 21:02:39 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

> In the present case, there's a subtle bug in the :filter of the
> calendar-mode-map (more specially in the menu-bar part of the map).

Could you explain what the bug is? The error is coming from
cal-menu-set-date-title in a mouse-binding, which calls
calendar-cursor-to-date.

This has always assumed it is called from a calendar buffer, which
seems reasonable, and gives an error if it is not.

Also, why does C-h f calendar-mode work fine?


On a related note, I notice that the Emacs 22 behaviour, where it
displays an explicit error message "Not on a date" if called in the
calendar with point not a date, has been lost - now it is just silent.
I would like to get this back, but I can't figure out the Easymenu-Way
to do it.


Anyway, the following hack will suppress the original issue.


*** calendar.el 8 Jul 2009 02:48:13 -0000       1.283
--- calendar.el 17 Jul 2009 00:53:33 -0000
***************
*** 1811,1816 ****
--- 1811,1817 ----
    (with-current-buffer
        (if event (window-buffer (posn-window (event-start event)))
          (current-buffer))
+     (or (boundp 'displayed-month) (error "Not on a date!"))
      (save-excursion
        (and event (setq event (event-start event))
             (goto-char (posn-point event)))





reply via email to

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