Re: [PATCH] Update emacs indentation instructions.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Brown <lkml@...>
Cc: Linus Torvalds <torvalds@...>, <linux-kernel@...>
Date: Saturday, January 19, 2008 - 9:40 pm

Hi,

David Brown <lkml@davidb.org> writes:


This variable is not defined when emacs starts up.  Best is to always
use a hook.

So I'd suggest either

	(add-hook 'c-mode-hook (lambda () (c-set-style "linux")))

or for the conditional case

	(add-hook 'c-mode-hook
                  (lambda ()
                    (c-set-style
                      (or (and (string-match "/usr/src/linux"
                                             (or (buffer-file-name) ""))
                               "linux")
                          "free-group-style"))))

Perhaps the logic could be a bit more readable :-)

Other than that, good idea to finally remove this ugly recommendation!

	Hannes
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Update emacs indentation instructions., David Brown, (Sat Jan 19, 6:53 pm)
Re: [PATCH] Update emacs indentation instructions., Johannes Weiner, (Sat Jan 19, 9:40 pm)
Re: [PATCH] Update emacs indentation instructions., David Brown, (Sun Jan 20, 12:53 am)