[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106318: Small cal-menu fix for bug#9
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106318: Small cal-menu fix for bug#9976 |
Date: |
Mon, 07 Nov 2011 14:00:54 -0500 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106318
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-07 14:00:54 -0500
message:
Small cal-menu fix for bug#9976
* lisp/calendar/cal-menu.el (cal-menu-set-date-title):
Do nothing if not in a calendar.
modified:
lisp/ChangeLog
lisp/calendar/cal-menu.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-11-07 14:34:02 +0000
+++ b/lisp/ChangeLog 2011-11-07 19:00:54 +0000
@@ -1,3 +1,8 @@
+2011-11-07 Glenn Morris <address@hidden>
+
+ * calendar/cal-menu.el (cal-menu-set-date-title):
+ Do nothing if not in a calendar. (Bug#9976)
+
2011-11-07 Stefan Monnier <address@hidden>
* files.el (find-file): Always use selected-window.
=== modified file 'lisp/calendar/cal-menu.el'
--- a/lisp/calendar/cal-menu.el 2011-01-25 04:08:28 +0000
+++ b/lisp/calendar/cal-menu.el 2011-11-07 19:00:54 +0000
@@ -215,13 +215,15 @@
;; but easymenu does not seem to allow this (?).
;; The ignore-errors is because `documentation' can end up calling
;; this in a non-calendar buffer where displayed-month is unbound. (Bug#3862)
+;; This still has issues - bug#9976, so added derived-mode-p call.
(defun cal-menu-set-date-title (menu)
"Convert date of last event to title suitable for MENU."
- (let ((date (ignore-errors (calendar-cursor-to-date nil last-input-event))))
- (if date
- (easy-menu-filter-return menu (calendar-date-string date t nil))
- (message "Not on a date!")
- nil)))
+ (when (derived-mode-p 'calendar-mode)
+ (let ((date (ignore-errors (calendar-cursor-to-date nil
last-input-event))))
+ (if date
+ (easy-menu-filter-return menu (calendar-date-string date t nil))
+ (message "Not on a date!")
+ nil))))
(easy-menu-define cal-menu-context-mouse-menu nil
"Pop up mouse menu for selected date in the calendar window."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106318: Small cal-menu fix for bug#9976,
Glenn Morris <=