emacs-diffs
[Top][All Lists]
Advanced

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

scratch/no-purespace 5b471384d18 18/41: Purecopy removal: Lisp code


From: Stefan Kangas
Subject: scratch/no-purespace 5b471384d18 18/41: Purecopy removal: Lisp code
Date: Thu, 12 Dec 2024 16:57:49 -0500 (EST)

branch: scratch/no-purespace
commit 5b471384d1805bfb9e78314f8cb1f4d09aa378f7
Author: Pip Cet <pipcet@protonmail.com>
Commit: Stefan Kangas <stefankangas@gmail.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 f058fc48cc7..11f2ffa6063 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 2b6d9d2b8bb..c24a1f4672b 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.



reply via email to

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