[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need to unhook a function in Makefile-mode
From: |
Stefan Kamphausen |
Subject: |
Re: Need to unhook a function in Makefile-mode |
Date: |
Thu, 01 Nov 2007 09:18:33 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux) |
Hi,
jgombos <nabble.forum.jog@spamgourmet.com> writes:
> ;; LANGUAGE HOOKS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (add-hook 'c++-mode-hook
> '(lambda ()
> (c-set-style "whitesmith")
> (add-hook 'write-file-hooks 'untabify-buffer)
> ))
> </pre>
> http://www.emacswiki.org/cgi-bin/emacs-en/UntabifyUponSave This article
> suggests a solution, but someone responded to that saying that the
> alternative approach screws up formatting (eg. number of spaces equated with
> a tab). And I don't want to untabify manually (even though tabs are
> highlighted in my view).
well the approach given over there in the wiki makes write-file-hooks
a /buffer local/ hook by calling
(make-local-hook 'write-contents-hooks)
I have been using that code for something like 5-8 years (can't really
remember) and it always did what I wanted. Note however, it was used
in XEmacs and I never hade much code edititing in larger teams (at
least no teams not using that same code, too ;-)
Kind Regards
Stefan
--
Stefan Kamphausen --- http://www.skamphausen.de
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Need to unhook a function in Makefile-mode,
Stefan Kamphausen <=