[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: |
Thu, 16 Jul 2020 18:14:17 +0300 |
> From: "Philip K." <philip@warpmail.net>
> Date: Thu, 16 Jul 2020 10:47:43 +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 protecting buffers
> +of certain major modes.
The part you added to the doc string is unclear: how can a symbol
"protect buffers of certain major modes"? (I think I can guess what
you mean, but readers of doc strings should be guessing.)
> - ((functionp c)
> + ((and (symbolp c)
> + (provided-mode-derived-p
> + (buffer-local-value 'major-mode buf)
> + c)))
> + ((and (not (symbolp c))
> + (functionp c))
> (funcall c buf))))
Is this logic correct and reliable? A function is a symbol, and there
could be symbols that have both a function cell and a variable cell --
how does this cope with that?
And why do you require a function not to be a symbol? I'm probably
missing something.
Thanks.
- bug#42386: [PATCH] Handle symbols in project-kill-buffers-ignores, Philip K., 2020/07/16
- Message not available
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/16
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores),
Eli Zaretskii <=
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/16
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/16
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Eli Zaretskii, 2020/07/16
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/16
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Eli Zaretskii, 2020/07/17
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/17
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Eli Zaretskii, 2020/07/17
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/17
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Eli Zaretskii, 2020/07/17
- bug#42386: Acknowledgement ([PATCH] Handle symbols in project-kill-buffers-ignores), Philip K., 2020/07/17