[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/no-purespace b7423633634 2/3: Purecopy removal: Lisp code
From: |
Pip Cet |
Subject: |
scratch/no-purespace b7423633634 2/3: Purecopy removal: Lisp code |
Date: |
Wed, 21 Aug 2024 15:25:08 -0400 (EDT) |
branch: scratch/no-purespace
commit b74236336343fca7ce6b8d78d23fb2f2a170c82d
Author: Pip Cet <pipcet@protonmail.com>
Commit: Pip Cet <pipcet@protonmail.com>
Purecopy removal: Lisp code
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table): Don't
request our hash tables be purecopied. Adjust comment.
* lisp/progmodes/elisp-mode.el (elisp--local-variables-completion-table):
Use 'defconst' rather than 'defvar' now the purespace problem is gone
* lisp/rfn-eshadow.el (file-name-shadow-properties): Remove obsolete
comment.
---
lisp/emacs-lisp/bytecomp.el | 3 +--
lisp/progmodes/elisp-mode.el | 6 +-----
lisp/rfn-eshadow.el | 1 -
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 88167fc7ebd..7e77697b93e 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4640,13 +4640,12 @@ Return (TAIL VAR TEST CASES), where:
cases))))
(setq jump-table (make-hash-table
:test test
- :purecopy t
:size nvalues)))
(setq default-tag (byte-compile-make-tag))
;; The structure of byte-switch code:
;;
;; varref var
- ;; constant #s(hash-table purecopy t data (val1 (TAG1) val2 (TAG2)))
+ ;; constant #s(hash-table data (val1 (TAG1) val2 (TAG2)))
;; switch
;; goto DEFAULT-TAG
;; TAG1
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 9bf6f9217c8..2a18d93f031 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -489,11 +489,7 @@ use of `macroexpand-all' as a way to find the \"underlying
raw code\".")
var))
vars))))))
-(defvar elisp--local-variables-completion-table
- ;; Use `defvar' rather than `defconst' since defconst would purecopy this
- ;; value, which would doubly fail: it would fail because purecopy can't
- ;; handle the recursive bytecode object, and it would fail because it would
- ;; move `lastpos' and `lastvars' to pure space where they'd be immutable!
+(defconst elisp--local-variables-completion-table
(let ((lastpos nil) (lastvars nil))
(letrec ((hookfun (lambda ()
(setq lastpos nil)
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el
index 5cf483bf0b1..c1e0e3da22b 100644
--- a/lisp/rfn-eshadow.el
+++ b/lisp/rfn-eshadow.el
@@ -92,7 +92,6 @@
(sexp :tag "Value")))))
(defcustom file-name-shadow-properties
- ;; FIXME: should we purecopy this?
'(face file-name-shadow field shadow)
"Properties given to the `shadowed' part of a filename in the minibuffer.
Only used when `file-name-shadow-mode' is active.