From: Tony Harbin <tharbin@hiwaay.net>
Subject: Re: automatic indentation in C,C++ modes
Date: Wed, 24 Apr 2002 10:53:55 -0500 [thread overview]
Message-ID: <3CC6D513.B5BE078A@hiwaay.net> (raw)
In-Reply-To: m3znzv41i0.fsf@wobble.eth.net
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
Thanks to all who helped with this. I finally found the answer.
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?
[-- Attachment #2: Type: text/html, Size: 1029 bytes --]
prev parent reply other threads:[~2002-04-24 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-12 22:56 automatic indentation in C,C++ modes Tony Harbin
2002-04-13 1:06 ` Greg Hill
2002-04-15 16:51 ` Tony Harbin
2002-04-15 18:47 ` Greg Hill
2002-04-19 17:30 ` Tony Harbin
2002-04-22 17:08 ` Emacs as web server Greg Hill
2002-04-23 2:01 ` automatic indentation in C,C++ modes G Anna
2002-04-24 15:53 ` Tony Harbin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CC6D513.B5BE078A@hiwaay.net \
--to=tharbin@hiwaay.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.