emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: Should (buffer-list) ever return killed buffers?


From: Tassilo Horn
Subject: Re: [PATCH] Re: Should (buffer-list) ever return killed buffers?
Date: Mon, 24 May 2021 16:04:04 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Sergey Organov <sorganov@gmail.com> writes:

> OK, here is a patch that fixes the issue:
>
>     lisp/desktop.el: check for killed buffers in desktop-clear
>
> diff --git a/lisp/desktop.el b/lisp/desktop.el
> index fb7c6c79a1..20d9e0f268 100644
> --- a/lisp/desktop.el
> +++ b/lisp/desktop.el
> @@ -706,7 +706,8 @@ if different)."
>                                   "\\)\\'")))
>      (dolist (buffer (buffer-list))
>        (let ((bufname (buffer-name buffer)))
> -     (unless (or (eq (aref bufname 0) ?\s) ;; Don't kill internal buffers
> +     (unless (or (nill bufname)
                     ^^^^

That should most probably be `null'.

> +                 (eq (aref bufname 0) ?\s) ;; Don't kill internal buffers
>                   (string-match-p preserve-regexp bufname))
>         (kill-buffer buffer)))))
>    (delete-other-windows)

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]