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

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

[elpa] externals/persist 01e5001da9 4/4: Merge branch 'indent' into 'mas


From: ELPA Syncer
Subject: [elpa] externals/persist 01e5001da9 4/4: Merge branch 'indent' into 'master'
Date: Sun, 7 Jan 2024 09:58:21 -0500 (EST)

branch: externals/persist
commit 01e5001da9fbe2dd7dc085f28be43ec4f4be886e
Merge: ec0b42318c 764a872fcb
Author: Stefan <monnier@iro.umontreal.ca>
Commit: Stefan <monnier@iro.umontreal.ca>

    Merge branch 'indent' into 'master'
    
    Indent persist-defvar the same as defvar
    
    See merge request phillord/persist!2
---
 persist.el   | 17 ++++++++++-------
 persist.texi | 22 +++++++++++-----------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/persist.el b/persist.el
index e43171459e..d3f369b020 100644
--- a/persist.el
+++ b/persist.el
@@ -41,6 +41,7 @@
 ;; variables.
 
 ;;; Code:
+
 (defvar persist--directory-location
   (locate-user-emacs-file "persist")
   "The location of persist directory.")
@@ -63,14 +64,14 @@ variable is not set to the value.")
        persist--directory-location)))
 
 (defun persist--defvar-1 (symbol location)
-  "Set symbol up for persistance."
+  "Set symbol up for persistence."
   (when location
     (persist-location symbol location))
   (persist-symbol symbol (symbol-value symbol))
   (persist-load symbol))
 
 (defmacro persist-defvar (symbol initvalue docstring &optional location)
-  "Define SYMBOL as a persistant variable and return SYMBOL.
+  "Define SYMBOL as a persistent variable and return SYMBOL.
 
 This form is nearly equivalent to `defvar', except that the
 variable persists between Emacs sessions.
@@ -85,7 +86,9 @@ DOCSTRING need to be given."
 
   ;; Don't support 2-arity calls either because we are lazy and
   ;; because if you want to persist it, you want to doc it.
-  (declare (debug (symbolp form stringp &optional form)) (doc-string 3))
+  (declare (debug (symbolp form stringp &optional form))
+           (doc-string 3)
+           (indent defun))
   ;; Define inside progn so the byte compiler sees defvar
   `(progn
      (defvar ,symbol ,initvalue ,docstring)
@@ -103,7 +106,7 @@ to persist a variable, you will normally need to call
   (put symbol 'persist-location (expand-file-name directory)))
 
 (defun persist-symbol (symbol &optional initvalue)
-  "Make SYMBOL a persistant variable.
+  "Make SYMBOL a persistent variable.
 
 If non-nil, INITVALUE is the value to which SYMBOL will be set if
 `persist-reset' is called.  Otherwise, the INITVALUE will be the
@@ -123,7 +126,7 @@ to load a previously saved location."
       (put symbol 'persist-default (persist-copy-tree initvalue t)))))
 
 (defun persist--persistant-p (symbol)
-  "Return non-nil if SYMBOL is a persistant variable."
+  "Return non-nil if SYMBOL is a persistent variable."
   (get symbol 'persist))
 
 (defun persist-save (symbol)
@@ -133,7 +136,7 @@ Normally, it should not be necessary to call this 
explicitly, as
 variables persist automatically when Emacs exits."
   (unless (persist--persistant-p symbol)
     (error (format
-            "Symbol %s is not persistant" symbol)))
+            "Symbol %s is not persistent" symbol)))
   (let ((symbol-file-loc (persist--file-location symbol)))
     (if (persist-equal (symbol-value symbol)
                        (persist-default symbol))
@@ -182,7 +185,7 @@ This does not remove any saved value of SYMBOL."
         (remove symbol persist--symbols)))
 
 (defun persist--save-all ()
-  "Save all persistant symbols."
+  "Save all persistent symbols."
   (mapc 'persist-save persist--symbols))
 
 ;; Save on kill-emacs-hook anyway
diff --git a/persist.texi b/persist.texi
index 8cb17a7383..fcc7c6ef01 100644
--- a/persist.texi
+++ b/persist.texi
@@ -1,10 +1,10 @@
 \input texinfo
 @setfilename persist.info
-@settitle persist persistant variables
+@settitle persist persistent variables
 
 @dircategory Emacs
 @direntry
-* Persist: (persist).  Persistant variables for Emacs.
+* Persist: (persist).  Persistent variables for Emacs.
 @end direntry
 
 @copying
@@ -29,7 +29,7 @@ and modified without restriction.
 @end copying
 
 @titlepage
-@title Persist -- Persistant Variables for Emacs
+@title Persist -- Persistent Variables for Emacs
 @author by Phillip Lord
 @page
 @insertcopying
@@ -38,9 +38,9 @@ and modified without restriction.
 @contents
 
 @node Top
-@top Persist -- Persistant Variables for Emacs
+@top Persist -- Persistent Variables for Emacs
 
-Perist is a library for making variables persistant; that it, their
+Perist is a library for making variables persistent; that it, their
 state can be changed from the default and the new value will remain even
 after Emacs has been closed and restarted.
 
@@ -68,7 +68,7 @@ not support the lower arity versions of @code{defvar}. Both an
 (persist-defvar my-persistant-variable 10
    "A variable of no purpose.
    
-This variable is persistant between sessions")
+This variable is persistent between sessions")
 @end group
 @end example
 
@@ -79,15 +79,15 @@ This variable is persistant between sessions")
 
 @defmac persist-defvar (var initvalue docstring) body@dots{}
 This macro is equivalent to @code{defvar} and can be used to make a
-variable persistant.
+variable persistent.
 @end defmac
 
 @defun persist-symbol (symbol &optional initvalue)
-This function takes @code{symbol} for an existing, non-persistant variable
-and makes it persistant. If @code{initvalue} is not given, then the
+This function takes @code{symbol} for an existing, non-persistent variable
+and makes it persistent. If @code{initvalue} is not given, then the
 current value is used. For package developers, @code{persist-defvar}
-would generally be prefered; this function might be useful for making
-third-party variables persistant.
+would generally be preferred; this function might be useful for making
+third-party variables persistent.
 @end defun
 
 @example



reply via email to

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