]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `defvar` for variables that are not constant
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 7 Feb 2024 16:13:56 +0000 (11:13 -0500)
committerEshel Yaron <me@eshelyaron.com>
Wed, 7 Feb 2024 19:59:54 +0000 (20:59 +0100)
* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive)
(tramp-archive-test-archive):
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-b):
Don't use `defconst` if it's not constant.

(cherry picked from commit cc5d4f15f96f97b6c4eb8b58144d0a0f217d393a)

test/lisp/emacs-lisp/macroexp-resources/vk.el
test/lisp/international/mule-tests.el
test/lisp/net/tramp-archive-tests.el

index 460b7a8e51638adf7e6ae48f2b62196567d0c177..5358bcaeb5c0fd87ab89c9fc33fd3534d43221de 100644 (file)
@@ -25,7 +25,7 @@
   (if (macroexp--dynamic-variable-p var) ''dyn ''lex))
 
 (defvar vk-a 1)
-(defconst vk-b 2)
+(defvar vk-b 2)
 (defvar vk-c)
 
 (defun vk-f1 (x)
index 5c742451a578f6a98dcffc013b385b24e2f1726e..9a80ced55aeef8a60829b6268c51f422226cd3e9 100644 (file)
 
 ;;; Testing `sgml-html-meta-auto-coding-function'.
 
-(defconst sgml-html-meta-pre "<!doctype html><html><head>"
+(defvar sgml-html-meta-pre "<!doctype html><html><head>"
   "The beginning of a minimal HTML document.")
 
-(defconst sgml-html-meta-post "</head></html>"
+(defvar sgml-html-meta-post "</head></html>"
   "The end of a minimal HTML document.")
 
 (defun sgml-html-meta-run (coding-system)
index 978342b1bb1b57a860b05b6381cd2ef396f8ca73..1ca2fa9b9b394b8206ee31af160640c87de51adf 100644 (file)
@@ -77,7 +77,7 @@ A resource file is in the resource directory as per
 `ert-resource-directory'."
       `(expand-file-name ,file (ert-resource-directory)))))
 
-(defconst tramp-archive-test-file-archive (ert-resource-file "foo.tar.gz")
+(defvar tramp-archive-test-file-archive (ert-resource-file "foo.tar.gz")
   "The test file archive.")
 
 (defun tramp-archive-test-file-archive-hexlified ()
@@ -86,7 +86,7 @@ Do not hexlify \"/\".  This hexlified string is used in `file:///' URLs."
   (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars)))
     (url-hexify-string tramp-archive-test-file-archive)))
 
-(defconst tramp-archive-test-archive
+(defvar tramp-archive-test-archive
   (file-name-as-directory tramp-archive-test-file-archive)
   "The test archive.")