[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cursory c9686b2658 2/5: Store the selected preset in a
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cursory c9686b2658 2/5: Store the selected preset in a variable |
Date: |
Sat, 14 Sep 2024 03:58:04 -0400 (EDT) |
branch: externals/cursory
commit c9686b2658b0434e811afccd83fc718806497c2b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Store the selected preset in a variable
---
cursory.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cursory.el b/cursory.el
index da7d7e56a6..1f8f2bd984 100644
--- a/cursory.el
+++ b/cursory.el
@@ -311,6 +311,9 @@ Saving is done by the `cursory-store-latest-preset'
function."
blink-cursor-delay))
(kill-local-variable var)))
+(defvar cursory-last-selected-preset nil
+ "The last value of `cursory-set-preset'.")
+
(defun cursory--set-preset-with-scope (preset &optional local)
"Set PRESET of `cursory-presets' to the global scope.
With optional non-nil LOCAL, set STYLES scoped locally to the
@@ -323,6 +326,7 @@ current buffer."
(blinks (plist-get styles :blink-cursor-blinks))
(interval (plist-get styles :blink-cursor-interval))
(delay (plist-get styles :blink-cursor-delay)))
+ (setq cursory-last-selected-preset preset)
(if local
(setq-local cursor-type type
cursor-in-non-selected-windows type-no-select