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:
parent
530c3491e8
commit
c4596c8522
1 changed files with 7 additions and 6 deletions
|
@ -983,13 +983,14 @@ if it can't, it signals an error."
|
||||||
decipher-stats-buffer)
|
decipher-stats-buffer)
|
||||||
;; Create a new buffer if requested:
|
;; Create a new buffer if requested:
|
||||||
(create
|
(create
|
||||||
(let ((stats-name (concat "*" (buffer-name) "*")))
|
(let* ((stats-name (concat "*" (buffer-name) "*"))
|
||||||
|
(buf (get-buffer stats-name)))
|
||||||
(setq decipher-stats-buffer
|
(setq decipher-stats-buffer
|
||||||
(if (eq 'decipher-stats-mode
|
(if (and (bufferp buf)
|
||||||
(buffer-local-value 'major-mode
|
(eq 'decipher-stats-mode
|
||||||
(get-buffer stats-name)))
|
(buffer-local-value 'major-mode buf)))
|
||||||
;; We just lost track of the statistics buffer:
|
buf
|
||||||
(get-buffer stats-name)
|
;; We just lost track of the statistics buffer:
|
||||||
(generate-new-buffer stats-name))))
|
(generate-new-buffer stats-name))))
|
||||||
(with-current-buffer decipher-stats-buffer
|
(with-current-buffer decipher-stats-buffer
|
||||||
(decipher-stats-mode))
|
(decipher-stats-mode))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue