all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jeff Hartnell <j.j.hartnell@rl.ac.uk>
Subject: Re: indenting and wrapping
Date: Fri, 05 Aug 2005 14:41:18 +0100	[thread overview]
Message-ID: <42F36C7E.8070703@rl.ac.uk> (raw)
In-Reply-To: <9eacjwvce5.fsf@gowron.rz-berlin.mpg.de>

Hi Jochen,
Thanks again for your continuing emails. My problems are solved! Your 
talk about "hooks" sent me off in the right direction (I guess hooks are 
a little snippet of code that gets run for particular file types - 
effectively overriding the defaults).

On reading my .emacs I saw that it was loading /etc/skel/.gnu-emacs 
after checking that ~/.gnu-emacs didn't exist. I copied 
/etc/skel/.gnu-emacs to ~/.gnu-emacs and then I edited the lines


;; Fill-column
;; -----------
;;    Fill-column ist hier auf 78 Charakter gesetzt, nach Wunsch "andern!
(setq-default fill-column 78)
(add-hook 'TeX-mode-hook '(lambda () (setq fill-column 78)))


and also


;;
;; Common to all C modes
;; ---------------------
(add-hook 'c-mode-common-hook
    '(lambda () (c-set-style "linux")
	(c-set-offset 'case-label 4)
	(setq c-basic-offset 4)))


to the values of 72 and 2 respectively.

Now, I have the defaults that I want!

Thanks to you and Marek for your help,
Jeff.



>>I tried putting the lines into a tex file and it works. :-) The
>>problem is that I have a lot of tex files... what I would ideally
>>like is a way to tell emacs to *always* wrap to 72 for tex files by
>>default.
> 
> 
> Use customize to put it into TeX-mode-hook.
> ,----[ C-h v TeX-mode-hook RET ]
> | TeX-mode-hook's value is nil
> | 
> | A hook run in TeX mode buffers.
> | 
> | You can customize this variable.
> | 
> | Defined in `tex'.
> | 
> | [back]
> `----
> Maybe you also want text-mode-hook or similar?
> ,----[ C-h v text-mode-hook RET ]
> | text-mode-hook's value is 
> | (turn-on-auto-fill dirvars-hack-local-variables-before text-mode-hook-identify)
> | 
> | Hook run when entering Text mode.
> | 
> | You can customize this variable.
> | 
> | Defined in `textmodes/text-mode'.
> | 
> | [back]
> `----
> 
> Greetings,
> Jochen

  parent reply	other threads:[~2005-08-05 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <42F09F36.6020803@rl.ac.uk>
     [not found] ` <42F09F36.6020803-Xz5UVyKf4VA@public.gmane.org>
2005-08-03 11:06   ` indenting and wrapping Jochen Küpper
     [not found]     ` <42F32BF9.1000002@rl.ac.uk>
     [not found]       ` <42F32BF9.1000002-Xz5UVyKf4VA@public.gmane.org>
2005-08-05 11:41         ` Jochen Küpper
2005-08-05 12:33           ` Johan Meskens CS3 jmcs3
2005-08-05 13:03             ` Peter Dyballa
2005-08-05 13:41           ` Jeff Hartnell [this message]
     [not found] <mailman.1863.1122460990.20277.help-gnu-emacs@gnu.org>
2005-07-27 11:59 ` Marc Tfardy
2005-07-27 10:14 Jeff Hartnell
     [not found] ` <42E75E91.6050603-Xz5UVyKf4VA@public.gmane.org>
2005-07-28 19:37   ` Jochen Küpper

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=42F36C7E.8070703@rl.ac.uk \
    --to=j.j.hartnell@rl.ac.uk \
    /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.