emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/cursory e5f99c9743 1/2: Simplify sample config for sett


From: ELPA Syncer
Subject: [elpa] externals/cursory e5f99c9743 1/2: Simplify sample config for setting a preset
Date: Thu, 5 May 2022 10:57:24 -0400 (EDT)

branch: externals/cursory
commit e5f99c9743e5e904a9f1cd203adb6da869058839
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Simplify sample config for setting a preset
    
    I implemented the same change for my 'fontaine' package which is similar
    to 'cursory' in this regard.
    
    Thanks to Christopher League for the original idea over at the fontaine
    mailing list:
    
<https://lists.sr.ht/~protesilaos/fontaine/%3C87sfpop0dm.fsf@contrapunctus.net%3E#%3C87pmksoyv6.fsf@contrapunctus.net%3E>
---
 README.org | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index d79f778108..a6dd83bec7 100644
--- a/README.org
+++ b/README.org
@@ -164,13 +164,8 @@ Remember to read the doc string of each of these variables 
or functions.
 
 (setq cursory-latest-state-file (locate-user-emacs-file 
"cursory-latest-state"))
 
-(cursory-restore-latest-preset)
-
-;; Set `cursory-recovered-preset' or fall back to desired style from
-;; `cursory-presets'.
-(if cursory-recovered-preset
-    (cursory-set-preset cursory-recovered-preset)
-  (cursory-set-preset 'bar))
+;; Set last preset or fall back to desired style from `cursory-presets'.
+(cursory-set-preset (or (cursory-restore-latest-preset) 'bar))
 
 ;; The other side of `cursory-restore-latest-preset'.
 (add-hook 'kill-emacs-hook #'cursory-store-latest-preset)
@@ -190,7 +185,8 @@ Cursory is meant to be a collective effort.  Every bit of 
help matters.
 
 + Author/maintainer :: Protesilaos Stavrou.
 
-+ Contributions to the code or manual :: Philip Kaludercic, Stefan Monnier.
++ Contributions to the code or manual :: Christopher League, Philip
+  Kaludercic, Stefan Monnier.
 
 * GNU Free Documentation License
 :PROPERTIES:



reply via email to

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