X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/9e69cb054d5c124bdf913c82453518ac4d9d6d53..ab422c4d6899b1442cb6954c1829c1fb656b006c:/lisp/calendar/cal-menu.el diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 877be9556f..c58eecbdc0 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -1,7 +1,6 @@ ;;; cal-menu.el --- calendar functions for menu bar and popup menu support -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 2001-2013 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Lara Rios @@ -53,7 +52,7 @@ ["Insert Anniversary" diary-insert-anniversary-entry] ["Insert Block" diary-insert-block-entry] ["Insert Cyclic" diary-insert-cyclic-entry] - ("Insert Baha'i" + ("Insert Bahá'í" ["One time" diary-bahai-insert-entry] ["Monthly" diary-bahai-insert-monthly-entry] ["Yearly" diary-bahai-insert-yearly-entry]) @@ -128,7 +127,7 @@ ["Astronomical Date" calendar-astro-goto-day-number] ["Hebrew Date" calendar-hebrew-goto-date] ["Persian Date" calendar-persian-goto-date] - ["Baha'i Date" calendar-bahai-goto-date] + ["Bahá'í Date" calendar-bahai-goto-date] ["Islamic Date" calendar-islamic-goto-date] ["Julian Date" calendar-julian-goto-date] ["Chinese Date" calendar-chinese-goto-date] @@ -216,13 +215,15 @@ is non-nil." ;; 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." @@ -236,10 +237,11 @@ is non-nil." ;; These did not work if called without calendar window selected. ("Prepare LaTeX buffer" ["Daily (1 page)" cal-tex-cursor-day] - ["Weekly (1 page)" cal-tex-cursor-week] - ["Weekly (2 pages)" cal-tex-cursor-week2] - ["Weekly (other style; 1 page)" cal-tex-cursor-week-iso] - ["Weekly (yet another style; 1 page)" cal-tex-cursor-week-monday] + ["Weekly (1 page, with hours)" cal-tex-cursor-week] + ["Weekly (2 pages, with hours)" cal-tex-cursor-week2] + ["Weekly (1 page, no hours)" cal-tex-cursor-week-iso] + ["Weekly (1 page, with hours, different style)" cal-tex-cursor-week-monday] + ["Weekly (2 pages, no hours)" cal-tex-cursor-week2-summary] ["Monthly" cal-tex-cursor-month] ["Monthly (landscape)" cal-tex-cursor-month-landscape] ["Yearly" cal-tex-cursor-year] @@ -281,5 +283,8 @@ is non-nil." (provide 'cal-menu) -;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9 +;; Local Variables: +;; coding: utf-8 +;; End: + ;;; cal-menu.el ends here