From c2f0949bb360b24e136d406c23a4fa522ae38b81 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 24 May 2020 04:24:07 +0100 Subject: [PATCH] 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. --- el/dot-emacs.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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) -- 2.11.0