From f70c9ebb71751a67365a665d8bb46b2925732aad Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 Jun 2018 14:21:35 +0200 Subject: [PATCH] Fix void-symbol errors in compilation buffers Occurs when :lang ruby is enabled, because the rspec-mode package autoloads an advice, but not the advice function. Still, it seems silly to do this advice before the package is loaded, so we disable it. --- modules/lang/ruby/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index d9c8566ae..cce232a60 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -83,6 +83,13 @@ environment variables." (("class" "def" "while" "do" "module" "for" "until") () "end") ;; Rake (("task" "namespace") () "end"))) + + ;; This package autoloads this advice, but does not autoload the advice + ;; function, causing void-symbol errors when using the compilation buffer + ;; (even for things unrelated to ruby/rspec). Even if the function were + ;; autoloaded, it seems silly to add this advice before rspec-mode is loaded, + ;; so remove it anyway! + (advice-remove 'compilation-buffer-name 'rspec-compilation-buffer-name-wrapper) :config (remove-hook 'ruby-mode-hook #'rspec-enable-appropriate-mode) (map! :map (rspec-mode-map rspec-verifiable-mode-map)