cmake-ide-set-compiler-flags doesn't set company-c-headers-path-system correctly
Opened this issue · 1 comments
The function cmake-ide-set-compiler-flags
doesn't seem to set the company-c-headers-path-system
variable correctly. For example, if I execute the following in *scratch*
(after loading cmake-ide
and company-c-headers
):
(cmake-ide-set-compiler-flags (current-buffer) () () '("/foo" "/bar"))
(describe-variable 'company-c-headers-path-system)
then I get
company-c-headers-path-system is a variable defined in ‘company-c-headers.el’.
Its value is (("/foo" "/bar") "/usr/include/" "/usr/local/include/")
Original value was
("/usr/include/" "/usr/local/include/")
Note that the first element of the variable is a nested list, which isn't what company-c-headers
expects. This causes an error to occur when, for example, one starts to insert a new include statement and company-c-headers
functionality is triggered.
Fortunately it's pretty easy to fix -- all that's required is a slight tweak to the code inside cmake-ide-set-compiler-flags
, specifically in the when
-clause predicated upon (featurep 'company-c-headers)
. I can submit a pull request (with supporting unit test) if you want.
Thanks for looking into this and analysing the issue. Yes, please submit a PR.