emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/raeburn-startup fd03b6b 07/43: Dump defvars for sp


From: Ken Raeburn
Subject: [Emacs-diffs] scratch/raeburn-startup fd03b6b 07/43: Dump defvars for special variables only.
Date: Mon, 31 Jul 2017 02:10:58 -0400 (EDT)

branch: scratch/raeburn-startup
commit fd03b6b4b9898efa0257194e32b149222fcc1f24
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>

    Dump defvars for special variables only.
    
    * lisp/loadup.el: Don't generate a defvar unless the variable is
    special.  Do include an initializer, otherwise defvar is a no-op.
---
 lisp/loadup.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 4de14e9..c5c4c48 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -535,7 +535,10 @@ lost after dumping")))
                              ol))
                          (v (macroexp-quote v))))
                      cmds)
-               (push `(defvar ,s) cmds)))
+               (if (special-variable-p s)
+                   ;; A dummy initializer is needed for defvar to mark
+                   ;; the variable as special.
+                   (push `(defvar ,s 0) cmds))))
            (when (symbol-plist s)
              (push `(setplist ',s ',(symbol-plist s)) cmds))
            (when (get s 'face-defface-spec)



reply via email to

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