Fix inconsistent definition and usage of 'calendar-buffer'

* lisp/calendar/calendar.el (calendar-buffer): Define it as a
variable.
* lisp/calendar/diary-lib.el (diary-mark-entries): Set
'calendar-buffer' as a string.  (bug#79994)
This commit is contained in:
Liu Hui 2026-01-21 17:38:17 +08:00 committed by Eli Zaretskii
parent dea8f11c09
commit e1d65b3c22
2 changed files with 2 additions and 2 deletions

View file

@ -1098,7 +1098,7 @@ Otherwise, use symbolic time zones like \"CET\"."
(defconst calendar-first-date-row 3
"First row in the calendar with actual dates.")
(defconst calendar-buffer "*Calendar*"
(defvar calendar-buffer "*Calendar*"
"Name of the buffer used for the calendar.")
(defun calendar-get-buffer ()

View file

@ -1402,7 +1402,7 @@ marks. This is intended to deal with deleted diary entries."
(diary-buffer (find-buffer-visiting diary-file))
;; Record current calendar buffer in case this function is
;; called in a calendar-mode buffer not named `calendar-buffer'.
(calendar-buffer (calendar-get-buffer))
(calendar-buffer (buffer-name (calendar-get-buffer)))
;; Dynamically bound in diary-include-files.
(d-incp (and (boundp 'diary-including) diary-including))
file-glob-attrs temp-buff)