branch: externals/cursory commit e5f99c9743e5e904a9f1cd203adb6da869058839 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@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....@contrapunctus.net%3E#%3c87pmksoyv6....@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: