From fc99d577fa38212f853e70ce08aef5ae317dea0e Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 2 Jul 2018 09:37:00 +0200 Subject: [PATCH] Mark company-clang-arguments as a safe local variable --- customizations.el | 7 +------ init.el | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/customizations.el b/customizations.el index 740ff82..b1ab5f2 100644 --- a/customizations.el +++ b/customizations.el @@ -166,12 +166,7 @@ yasnippet zone-nyan zygospore))) - '(safe-local-variable-values - (quote - ((company-clang-arguments "-I.." "-I/usr/include/libsecret-1" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-I/usr/include/gtk-3.0" "-I/usr/include/pango-1.0" "-I/usr/include/fribidi" "-I/usr/include/cairo" "-I/usr/include/pixman-1" "-I/usr/include/freetype2" "-I/usr/include/libpng16" "-I/usr/include/uuid" "-I/usr/include/harfbuzz" "-I/usr/include/gdk-pixbuf-2.0" "-I/usr/include/gio-unix-2.0/" "-I/usr/include/libdrm" "-I/usr/include/atk-1.0" "-I/usr/include/at-spi2-atk/2.0" "-I/usr/include/at-spi-2.0" "-I/usr/include/dbus-1.0" "-I/usr/lib64/dbus-1.0/include" "-I/usr/include/libsoup-2.4" "-I/usr/include/libxml2" "-I/usr/include/json-glib-1.0") - (company-clang-arguments "-I.." "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-I/usr/include/gtk-3.0" "-I/usr/include/pango-1.0" "-I/usr/include/fribidi" "-I/usr/include/cairo" "-I/usr/include/pixman-1" "-I/usr/include/freetype2" "-I/usr/include/libpng16" "-I/usr/include/uuid" "-I/usr/include/harfbuzz" "-I/usr/include/gdk-pixbuf-2.0" "-I/usr/include/gio-unix-2.0/" "-I/usr/include/libdrm" "-I/usr/include/atk-1.0" "-I/usr/include/at-spi2-atk/2.0" "-I/usr/include/at-spi-2.0" "-I/usr/include/dbus-1.0" "-I/usr/lib64/dbus-1.0/include" "-I/usr/include/libsoup-2.4" "-I/usr/include/libxml2" "-I/usr/include/json-glib-1.0") - (company-clang-arguments) - (bug-reference-bug-regexp . "#\\(?2:[0-9]+\\)")))) + '(safe-local-variable-values (quote ((bug-reference-bug-regexp . "#\\(?2:[0-9]+\\)")))) '(scroll-margin 2) '(sgml-basic-offset 4) '(show-trailing-whitespace t) diff --git a/init.el b/init.el index c57776e..cccbe96 100644 --- a/init.el +++ b/init.el @@ -317,11 +317,18 @@ (list sml/pre-id-separator) mode-line-rest)))) +(defun nil-orlist-of-strings-p (var) + "Return t if VAR is either nil or a list holding only strings." + (or (null var) + (not (null (delq nil + (mapcar (lambda (x) (and (stringp x) x)) var)))))) + (use-package company :config (setq company-idle-delay nil company-frontends '(company-pseudo-tooltip-frontend company-echo-metadata-frontend)) + (put 'company-clang-arguments 'safe-local-variable #'nil-or-list-of-strings-p) (global-company-mode)) (use-package helm-company