branch: externals/cursory commit 51b774adcad392645992e34c0b23aa0325dcb11b Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Define helper function to get all preset symbols minus t --- cursory.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cursory.el b/cursory.el index 21330405ea..a13f9cfd8c 100644 --- a/cursory.el +++ b/cursory.el @@ -261,9 +261,13 @@ Saving is done by the `cursory-store-latest-preset' function." (defvar cursory--style-hist '() "Minibuffer history of `cursory--set-cursor-prompt'.") +(defun cursory--get-presets () + "Return the `car' of each named entry in `cursory-presets'." + (delq t (mapcar #'car cursory-presets))) + (defun cursory--preset-p (preset) "Return non-nil if PRESET is one of the named `cursory-presets'." - (let ((presets (delq t (mapcar #'car cursory-presets)))) + (let ((presets (cursory--get-presets))) (memq preset presets))) (defun cursory--get-inherit-name (preset)