1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00

Fix a regression in 'decipher-digram-list'

* lisp/play/decipher.el (decipher-stats-buffer): Don't assume the
statistics buffer always exists.  (Bug#54443)
This commit is contained in:
Eli Zaretskii 2022-03-18 13:54:46 +02:00
parent 530c3491e8
commit c4596c8522

View File

@ -983,13 +983,14 @@ if it can't, it signals an error."
decipher-stats-buffer)
;; Create a new buffer if requested:
(create
(let ((stats-name (concat "*" (buffer-name) "*")))
(let* ((stats-name (concat "*" (buffer-name) "*"))
(buf (get-buffer stats-name)))
(setq decipher-stats-buffer
(if (eq 'decipher-stats-mode
(buffer-local-value 'major-mode
(get-buffer stats-name)))
;; We just lost track of the statistics buffer:
(get-buffer stats-name)
(if (and (bufferp buf)
(eq 'decipher-stats-mode
(buffer-local-value 'major-mode buf)))
buf
;; We just lost track of the statistics buffer:
(generate-new-buffer stats-name))))
(with-current-buffer decipher-stats-buffer
(decipher-stats-mode))