mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-23 04:53:12 -08:00
Fix cursor position in calendar-generate-window (bug#80069)
* lisp/calendar/calendar.el (calendar-generate-window): Move cursor to today before running calendar-today-visible-hook.
This commit is contained in:
parent
09aad81166
commit
53225d8a3a
1 changed files with 6 additions and 3 deletions
|
|
@ -1450,9 +1450,12 @@ Optional integers MON and YR are used instead of today's date."
|
|||
(calendar-mark-holidays))
|
||||
(unwind-protect
|
||||
(if calendar-mark-diary-entries (diary-mark-entries))
|
||||
(run-hooks (if (calendar-date-is-visible-p today)
|
||||
'calendar-today-visible-hook
|
||||
'calendar-today-invisible-hook)))))
|
||||
(if (not (calendar-date-is-visible-p today))
|
||||
(run-hooks 'calendar-today-invisible-hook)
|
||||
;; Functions in calendar-today-visible-hook may rely on the cursor
|
||||
;; being on today's date.
|
||||
(calendar-cursor-to-visible-date today)
|
||||
(run-hooks 'calendar-today-visible-hook)))))
|
||||
|
||||
(defun calendar-generate (month year)
|
||||
"Generate a three-month Gregorian calendar centered around MONTH, YEAR."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue