bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28412: 26.0.50; Let save-some-buffers accept write-contents-function


From: Eric Abrahamsen
Subject: bug#28412: 26.0.50; Let save-some-buffers accept write-contents-functions
Date: Mon, 18 Sep 2017 13:53:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Mon, Sep 18, 2017 at 3:12 PM Eric Abrahamsen <eric@ericabrahamsen.net> 
> wrote:
>
>  Also, there don't appear to be any built-in functions or regexps for
>  dealing with "hidden" buffers, I'm assuming:
>
>  (not (string-prefix-p " " (buffer-name buffer)))
>
>  is okay?
>
> That crossed my mind too. So I had started looking for its existing 
> implementation, and found this in buff-menu.el inside list-buffers--refresh 
> function:
>
>     (string= (substring name 0 1) " ")
>
> I was wondering if that should be wrapped into a function like 
> buffer-internal-p (based on the many docstrings like below in buff-menu.el: 
> "By default, the Buffer Menu lists all buffers except those whose names start 
> with a space
> (which are for internal use)."). Having a function like this would be better 
> than having that logic implemented in different ways in the emacs core.
>
> I just don't know the best place to put this function definition. Eli?

It might be nice to have something like:

(defsubst buffer-internal-p (buf)
  (eq (aref (buffer-name buf) 0) ?\s))





reply via email to

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