From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: seberino@spawar.navy.mil (Christian Seberino) Newsgroups: gmane.emacs.help Subject: .emacs can only turn on auto-fill for text-mode *not* c-mode!?!? Date: 7 Jan 2003 17:56:00 -0800 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1041993847 28265 80.91.224.249 (8 Jan 2003 02:44:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 02:44:07 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18W6CL-0007Lb-00 for ; Wed, 08 Jan 2003 03:44:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18W5WC-00075j-04 for gnu-help-gnu-emacs@m.gmane.org; Tue, 07 Jan 2003 21:00:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 128.49.22.159 Original-X-Trace: posting.google.com 1041990960 18524 127.0.0.1 (8 Jan 2003 01:56:00 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 8 Jan 2003 01:56:00 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:108719 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5247 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5247 This works great in .emacs for text mode... (setq default-major-mode 'text-mode) (add-hook 'text-mode-hook 'turn-on-auto-fill) However, this does *not* work for c-mode... (add-hook 'c-mode-hook 'turn-on-auto-fill) *Why*? I modified c-mode this way... (defun cs-c-mode() (c-mode) (c-set-style "K&R") (setq c-basic-offset 3) (turn-on-font-lock) (local-set-key "\C-d" 'cs-kill-line)) Will that affect this problem?? I tried adding (turn-on-auto-fill) to this defun with no success. Chris