Fix mode-line string width in diary view
Bug#78957 * lisp/calendar/calendar.el (calendar-in-read-only-buffer): Select the buffer window because, for example, `calendar-set-mode-line' needs it.
This commit is contained in:
parent
5140e317b7
commit
2846dd8842
1 changed files with 14 additions and 11 deletions
|
|
@ -1161,17 +1161,20 @@ MON defaults to `displayed-month'. YR defaults to `displayed-year'."
|
|||
First creates or erases BUFFER as needed. Leaves BUFFER read-only,
|
||||
with disabled undo. Leaves point at `point-min', displays BUFFER."
|
||||
(declare (indent 1) (debug t))
|
||||
`(progn
|
||||
(set-buffer (get-buffer-create ,buffer))
|
||||
(or (derived-mode-p 'special-mode) (special-mode))
|
||||
(setq buffer-read-only nil
|
||||
buffer-undo-list t)
|
||||
(erase-buffer)
|
||||
(display-buffer ,buffer)
|
||||
,@body
|
||||
(goto-char (point-min))
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-read-only t)))
|
||||
(let ((window (gensym)))
|
||||
`(progn
|
||||
(set-buffer (get-buffer-create ,buffer))
|
||||
(or (derived-mode-p 'special-mode) (special-mode))
|
||||
(setq buffer-read-only nil
|
||||
buffer-undo-list t)
|
||||
(erase-buffer)
|
||||
(let ((,window (display-buffer ,buffer)))
|
||||
(when ,window
|
||||
(with-selected-window ,window
|
||||
,@body
|
||||
(goto-char (point-min)))))
|
||||
(set-buffer-modified-p nil)
|
||||
(setq buffer-read-only t))))
|
||||
|
||||
;; The following are in-line for speed; they can be called thousands of times
|
||||
;; when looking up holidays or processing the diary. Here, for example, are
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue