|
From: | Tony Harbin |
Subject: | Re: automatic indentation in C,C++ modes |
Date: | Wed, 24 Apr 2002 10:53:55 -0500 |
In my .emacs file, I had 2 lines:
(autoload 'c++-mode "cc-mode" "C++ Editing Mode" t)
(autoload 'c-mode "cc-mode" "C Editing Mode" t)
However, near as I can tell, these did not actually load anything until
a file matching the mode criteria was visited. Any lines referencing
any variables
defined by those modes were not defined in emacs' scope until a file
of the mode type was visited. By then it's too late to affect any
of the variables. By changing
the lines to:
(load "cplus-md.elc")
(load "c-mode.elc")
The variables (especially c-auto-newline...thanks G Anna!)
are now defined
and can be manipulated; in my case, to turn off the auto-indentation
feature:
(setq c-auto-newline nil)
This gets me what I need, but is it wasteful?
[Prev in Thread] | Current Thread | [Next in Thread] |