On Sun, Apr 12, 2020 at 03:04:39PM -0500, Steven Lembark wrote:
> 
> When I edit files with '.c' in them I end up in cmode.
> Annoying thing is that this inlcudes "*.conf" files.
> 
> To the best of my recollection the only places that should put 
> me in C mode are:
> 
>     set c-suffixes '\.([ch]\|xs)$'
> 
>     define-majormode c
>     remove-submode c cindent
>     ~with define-submode c
>         suffixes '\.[ch]$'
>         notabinsert
>         tabstop=4
>         shiftwidth=4
>     ~endwith
> 
> (note that I last looked at this a few decades ago when most of
> my work was in C... recollection is fuzzy).
> 
> i.e., edit with C format for strings endin in ".c", ".h", and ".xs"
> a.k.a. m{ [.] ( [ch]|xs ) $}x.
> 
> Q: Why would these get caught on "*.conf" basenames?

It shouldn't.  But you can (part of) the trace by doing
        vile -D *.conf

and looking at the [Trace] buffer.

For instance, running that in /etc (where I've a few .conf files),
I see these lines:

** opened /etc/adduser.conf for read
matched preamble of adduser.conf
...inferred majormode conf

while in another directory, I might see matches by suffix:

** opened /usr/build/vile/vile/perl.xs for read
matched suffix of perl.xs
...inferred majormode xs

(showing all of the comparisons is a different matter - the compile-time
debug trace would show _that_).

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to