Eli Zaretskii writes: > Stefan, > > Thanks for adding this function. However, the method it uses to find > the include directories is incorrect and unportable. On most systems > it will produce the default "/usr/include", which is most probably > wrong. > > The way to ask GCC to show the list of directories where it looks for > header files is like this: > > (call-process "gcc" nil BUFFER nil "-v" "-E" "-") > > and then look in BUFFER for text that begins with "#include <...> > search starts here:" and ends with "End of search list." What's > in-between is the list of include directories, one directory per line, > which GCC searches for header file, in the order it searches them. Thanks for helping improve this. How about the attached patch?