lkml.org 
[lkml]   [1996]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: <sigh> Coding Style doc: Let me try again
On Wed, 24 Jul 1996, Arthur D. Jerijian wrote:

> Hi,
>
> Apparently, my last message didn't make it to the linux-kernel
> list. <sigh> I've noticed in the Documentation/CodingStyle document
> that the LISP stuff required to getting Emacs to auto-indent C code
> is no longer correct as of Emacs 19.31. Apparently, the cc-mode.el
> stuff has been enhanced in the newer Emacs versions, causing
> incompatibilities with old cc-mode configuration settings. In fact,
> I even saw a little bit of documentation for cc-mode in the latest
> version of Emacs for Windows NT.
> Since I'm not an ELISP expert, a well-knowing hacker might want
> to fix this particular problem in the CodingStyle doc.

This one I use:

;----------------------------------------------------------------
; kernel hacking

(defun linux-kernel-compile ()
(interactive "")
(save-some-buffers 0)
(compile "cd /usr/src/linux; make zImage modules")
(other-window 1)
(goto-char (point-max))
(other-window 1))

(defun linux-c-mode ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(c-mode)
(setq c-basic-offset 8)
(define-key c-mode-map "\C-c\C-c" 'linux-kernel-compile))

(setq auto-mode-alist (cons '("/usr/src/kernel/.*\\.[ch]$" . linux-c-mode)
auto-mode-alist))



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.050 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site