1
0
Fork 0

Compare commits

...

3 commits

Author SHA1 Message Date
Bram Schoenmakers e86008b50b Add badge for MELPA stable 2023-07-02 08:01:03 +02:00
Bram Schoenmakers fdf690011b Fix function name
Didn't see the full function name since I'm using the nameless
package, blindly copied what I saw.
2023-06-21 09:16:37 +02:00
Bram Schoenmakers 7bbce24393 Add support for the saveplace package 2023-06-19 23:02:16 +02:00
2 changed files with 9 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#+begin_export html
<a href="https://melpa.org/#/persist-state"><img alt="MELPA" src="https://melpa.org/packages/persist-state-badge.svg"/></a>
<a href="https://stable.melpa.org/#/persist-state"><img alt="MELPA Stable" src="https://stable.melpa.org/packages/persist-state-badge.svg"/></a>
#+end_export
* Introduction
@ -35,6 +36,7 @@ persist-state supports a number of packages out of the box. For some packages th
- [[https://github.com/radian-software/prescient.el][Prescient.el]]
- recentf
- savehist
- saveplace
* Installation and usage

View file

@ -102,6 +102,11 @@
(when (bound-and-true-p savehist-mode)
(savehist-autosave)))
(defun persist-state--maybe-save-places ()
"Save places (positions in buffers) if the built-in saveplace package is active."
(when (bound-and-true-p save-place-mode)
(save-place-alist-to-file)))
(defvar persist-state-supported-packages-alist
`((bookmark . (:function persist-state--maybe-save-bookmarks))
(desktop . (:function persist-state--maybe-save-desktop))
@ -111,7 +116,8 @@
:label "Prescient.el"
:url "https://github.com/radian-software/prescient.el"))
(recentf . (:function persist-state--maybe-save-recentf))
(savehist . (:function persist-state--maybe-save-savehist)))
(savehist . (:function persist-state--maybe-save-savehist))
(saveplace . (:function persist-state-maybe-save-places)))
"A list of packages supported by persist-state.
Each package is a cons cell with the package name and a plist with: