|
From: | Juri Linkov |
Subject: | bug#46374: Regression: erronous calls to PRED switch major-mode of unrelated modified buffers |
Date: | Mon, 30 Aug 2021 10:28:36 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> This means we need to invent some ad-hoc format to distinguish between > these cases. For example, to create a lexically-bound predicate > at the beginning, it could be called with e.g. > > (save-some-buffers t '(eval . save-some-buffers-root)) > > and defcustom will look like: > > (defcustom save-some-buffers-default-predicate nil > :type '(choice (const :tag "Default" nil) > (function :tag "Only in subdirs of root" > (eval . save-some-buffers-root)) > (function :tag "Custom function")) Or maybe simply '(save-some-buffers-root): (defcustom save-some-buffers-default-predicate nil :type '(choice (const :tag "Default" nil) (function :tag "Only in subdirs of root" (save-some-buffers-root)) Then the following two calls both will have exactly the same effect: (save-some-buffers t '(save-some-buffers-root)) (save-some-buffers t (save-some-buffers-root))
[Prev in Thread] | Current Thread | [Next in Thread] |