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.
This commit is contained in:
Pip Cet 2024-08-21 19:13:23 +00:00 committed by Stefan Kangas
parent a54ff8c18f
commit 5b471384d1
3 changed files with 2 additions and 8 deletions

View file

@ -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

View file

@ -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)

View file

@ -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.