diff options
| author | Stefan Monnier | 2024-02-07 11:13:56 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2024-02-07 11:13:56 -0500 |
| commit | cc5d4f15f96f97b6c4eb8b58144d0a0f217d393a (patch) | |
| tree | b0ae56f9a390aa62a2609d172db17db2e009b2f8 /test | |
| parent | b068725d40dd1ab918178b3cbca7b5672037210f (diff) | |
| download | emacs-cc5d4f15f96f97b6c4eb8b58144d0a0f217d393a.tar.gz emacs-cc5d4f15f96f97b6c4eb8b58144d0a0f217d393a.zip | |
Use `defvar` for variables that are not constant
* 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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/macroexp-resources/vk.el | 2 | ||||
| -rw-r--r-- | test/lisp/international/mule-tests.el | 4 | ||||
| -rw-r--r-- | test/lisp/net/tramp-archive-tests.el | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/lisp/emacs-lisp/macroexp-resources/vk.el b/test/lisp/emacs-lisp/macroexp-resources/vk.el index 460b7a8e516..5358bcaeb5c 100644 --- a/test/lisp/emacs-lisp/macroexp-resources/vk.el +++ b/test/lisp/emacs-lisp/macroexp-resources/vk.el | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | (if (macroexp--dynamic-variable-p var) ''dyn ''lex)) | 25 | (if (macroexp--dynamic-variable-p var) ''dyn ''lex)) |
| 26 | 26 | ||
| 27 | (defvar vk-a 1) | 27 | (defvar vk-a 1) |
| 28 | (defconst vk-b 2) | 28 | (defvar vk-b 2) |
| 29 | (defvar vk-c) | 29 | (defvar vk-c) |
| 30 | 30 | ||
| 31 | (defun vk-f1 (x) | 31 | (defun vk-f1 (x) |
diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el index 5c742451a57..9a80ced55ae 100644 --- a/test/lisp/international/mule-tests.el +++ b/test/lisp/international/mule-tests.el | |||
| @@ -96,10 +96,10 @@ | |||
| 96 | 96 | ||
| 97 | ;;; Testing `sgml-html-meta-auto-coding-function'. | 97 | ;;; Testing `sgml-html-meta-auto-coding-function'. |
| 98 | 98 | ||
| 99 | (defconst sgml-html-meta-pre "<!doctype html><html><head>" | 99 | (defvar sgml-html-meta-pre "<!doctype html><html><head>" |
| 100 | "The beginning of a minimal HTML document.") | 100 | "The beginning of a minimal HTML document.") |
| 101 | 101 | ||
| 102 | (defconst sgml-html-meta-post "</head></html>" | 102 | (defvar sgml-html-meta-post "</head></html>" |
| 103 | "The end of a minimal HTML document.") | 103 | "The end of a minimal HTML document.") |
| 104 | 104 | ||
| 105 | (defun sgml-html-meta-run (coding-system) | 105 | (defun sgml-html-meta-run (coding-system) |
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 978342b1bb1..1ca2fa9b9b3 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el | |||
| @@ -77,7 +77,7 @@ A resource file is in the resource directory as per | |||
| 77 | `ert-resource-directory'." | 77 | `ert-resource-directory'." |
| 78 | `(expand-file-name ,file (ert-resource-directory))))) | 78 | `(expand-file-name ,file (ert-resource-directory))))) |
| 79 | 79 | ||
| 80 | (defconst tramp-archive-test-file-archive (ert-resource-file "foo.tar.gz") | 80 | (defvar tramp-archive-test-file-archive (ert-resource-file "foo.tar.gz") |
| 81 | "The test file archive.") | 81 | "The test file archive.") |
| 82 | 82 | ||
| 83 | (defun tramp-archive-test-file-archive-hexlified () | 83 | (defun tramp-archive-test-file-archive-hexlified () |
| @@ -86,7 +86,7 @@ Do not hexlify \"/\". This hexlified string is used in `file:///' URLs." | |||
| 86 | (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars))) | 86 | (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars))) |
| 87 | (url-hexify-string tramp-archive-test-file-archive))) | 87 | (url-hexify-string tramp-archive-test-file-archive))) |
| 88 | 88 | ||
| 89 | (defconst tramp-archive-test-archive | 89 | (defvar tramp-archive-test-archive |
| 90 | (file-name-as-directory tramp-archive-test-file-archive) | 90 | (file-name-as-directory tramp-archive-test-file-archive) |
| 91 | "The test archive.") | 91 | "The test archive.") |
| 92 | 92 | ||