branch: elpa/nix-mode commit aaf2b741fb9eb5ecef6c65682546cd485700042c Author: Tristan Cacqueray <tdeca...@redhat.com> Commit: Tristan Cacqueray <tdeca...@redhat.com>
nix-shell: skip non-default packages integration This change enables nix-shell to work when woman or irony-mode is not active, otherwise it is failing with: Symbol’s value as variable is void: irony-additional-clang-options --- nix-shell.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix-shell.el b/nix-shell.el index 1a996e3891..e8b5c8d21f 100644 --- a/nix-shell.el +++ b/nix-shell.el @@ -179,11 +179,13 @@ The DRV file to use." (add-to-list 'exec-path bin) (setq-local eshell-path-env (format "%s:%s" bin eshell-path-env)) - (add-to-list 'woman-manpath man) + (when (boundp 'woman-manpath) + (add-to-list 'woman-manpath man)) (add-to-list 'ffap-c-path include) (add-to-list 'Man-header-file-path include) - (add-to-list 'irony-additional-clang-options - (format "-I%s" include)))) + (when (boundp 'irony-additional-clang-options) + (add-to-list 'irony-additional-clang-options + (format "-I%s" include))))) (when (bound-and-true-p flycheck-mode) (flycheck-buffer))