]> git.eshelyaron.com Git - emacs.git/commitdiff
Dump defvars for special variables only.
authorKen Raeburn <raeburn@raeburn.org>
Wed, 14 Dec 2016 02:49:18 +0000 (21:49 -0500)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:20 +0000 (04:36 -0400)
* 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

index 4de14e9b3c7683976ee1ed8d88e9d5adb22c469b..c5c4c48910b75661085e6539e594453bed179865 100644 (file)
@@ -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)