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

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

bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffe


From: Eli Zaretskii
Subject: bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores)
Date: Fri, 17 Jul 2020 09:38:28 +0300

> From: "Philip K." <philip@warpmail.net>
> Cc: 42386@debbugs.gnu.org
> Date: Fri, 17 Jul 2020 00:22:56 +0200
> 
>  Each condition is either a regular expression matching a buffer
> -name, or a predicate function that takes a buffer object as
> -argument and returns non-nil if it matches.  Buffers that match
> -any of the conditions will not be killed."
> -  :type '(repeat (choice regexp function))
> +name, a predicate function that takes a buffer object as argument
> +and returns non-nil if it matches, or a symbol that prevents
> +buffers from being killed, if it equals buffer's major mode.

This is better, but I think you will be able to make it better yet if
you divide that long sentence into several ones.  Like this:

  Buffers that match any of the conditions will not be killed.
  Each condition can be one of the following:

   - a regular expression, to match against the buffer's name;
   - a predicate function...
   ...

> +                   (lambda (c)
> +                     (cond ((stringp c)
> +                            (string-match-p c (buffer-name buf)))
> +                           ((and (not (memq c project-kill-buffers-ignores))
> +                                 (functionp c))

Once again, I don't think I understand why you need the memq part.

Thanks.





reply via email to

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