From: Mark Wooding Date: Sun, 24 May 2020 03:24:07 +0000 (+0100) Subject: el/dot-emacs.el: Fix phase-separation bug. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/c2f0949bb360b24e136d406c23a4fa522ae38b81 el/dot-emacs.el: Fix phase-separation bug. Previously, the macro would expect the parent style to exist at expansion time, which works at the REPL, but not in the byte compiler. Instead, expand to code to handle inheritance at runtime. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 8ca49a5..75e39a5 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -2001,12 +2001,11 @@ set." (func (intern (concat "mdw-define-c-style/" name-string)))) `(progn (setq ,var - ',(if (null parent) - assocs - (let ((parent-list (symbol-value - (intern (concat "mdw-c-style/" - (symbol-name parent)))))) - (mdw-merge-style-alists assocs parent-list)))) + ,(if (null parent) + `',assocs + (let ((parent-list (intern (concat "mdw-c-style/" + (symbol-name parent))))) + `(mdw-merge-style-alists ',assocs ,parent-list)))) (defun ,func () (c-add-style ,name-string ,var)) (and (featurep 'cc-mode) (,func)) (add-hook 'mdw-define-c-styles-hook ',func)