help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to turn off conf-mode


From: Peter Dyballa
Subject: Re: How to turn off conf-mode
Date: Wed, 12 Dec 2007 21:50:04 +0100


Am 12.12.2007 um 07:49 schrieb Robert L Knighten:

The problem is that it is not just one file, and the files are neither named
nor constructed by me.

I think the relevant dotted pair in auto-mode-alist is

("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode)

but I don't know what to do about it. I don't want to simply override this
without understanding what else this will affect.


In my Emacsen .out files are not listed in the set of files for which conf-mode should be applied. Or, to be more exact: this is my interpretation of the lines and I cannot make .out files open in conf- mode. So it's likely that you add something. To find out when it happens

        1.) launch GNU Emacs with --no-init-file and open such a .out file

        2.) launch GNU Emacs with --no-site-file and open such a .out file

In case 1 your personal .emacs or default.el is not loaded, only the system's ones. In case 2 the system's init file(s) is (are) not loaded, only your personal one.

If in case 1 the .out file is opened in conf-mode, then the system's init file(s) set(s) it. If in case 2 the .out file is opened in conf-mode, then your personal init file sets it. If in case 1 and in case 2 the .out file is opened in conf-mode, then both are polluted and you should launch GNU Emacs with -Q!

If your personal init file sets it, then it's easy to correct the setting: delete the statement! If your system's init file(s) set(s) it, then it's also easy to correct the setting in your personal init file: remove the mapping from the alist:

        (remove '("<whatever>" . conf-mode) auto-mode-alist)


BTW, the reg-exp you're citation tells (most probably):

        .cfg, .conf, .cnf, .config files are opened in conf-mode.

I don't understand the \\(?:\\.[a-zA-Z0-9._-]+\\) part – can it really stand for *any* extension? If it's really that, then remove the line cited from auto-mode-alist and add it in a changed form with the reg-exp part I don't understand:

(add-to-list 'auto-mode-alist '("[/.]c\\(?:on\\)?f\\(?:i?g\\)\\'". conf-mode))

--
Mit friedvollen Grüßen

  Pete

This is a signature virus.  Add me to your signature and help me to live






reply via email to

[Prev in Thread] Current Thread [Next in Thread]