]> git.eshelyaron.com Git - emacs.git/commitdiff
Support dumping variable aliases.
authorKen Raeburn <raeburn@raeburn.org>
Tue, 30 May 2017 07:21:48 +0000 (03:21 -0400)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:22 +0000 (04:36 -0400)
* lisp/loadup.el: If a variable is an alias, emit a defvaralias
command, and don't process its default value.

lisp/loadup.el

index e3d8dc5a59ac521decdf5e5c551c8253221190fe..d0f954f24aef12dedddd6f71c640276a951b7ef2 100644 (file)
@@ -514,6 +514,9 @@ lost after dumping")))
                    (push `(fset ',s (symbol-function ',(intern (subr-name (symbol-function s))))) cmds))
                (push `(fset ',s ,(macroexp-quote (symbol-function s)))
                      cmds)))
+           (if (not (eq (indirect-variable s) s))
+               (push `(defvaralias ',s ',(indirect-variable s))
+                     cmds))
            (when (and (default-boundp s)
                       (not (macroexp--const-symbol-p s 'any-value))
                       ;; I think we don't need/want these!
@@ -532,8 +535,8 @@ lost after dumping")))
                                      charsets charset-aliases unified-charsets
                                      abbrev-tables abbrev-counter
                                      abbrev-make-cmds abbrev-assign-cmds
-                                     cmds))))
-             ;; FIXME: Handle varaliases!
+                                     cmds)))
+                      (eq (indirect-variable s) s))
              (let ((v (default-value s)))
                (push `(set-default
                        ',s