help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using c++ style comments for c mode


From: Sanjeev Kumar.S
Subject: using c++ style comments for c mode
Date: Sun, 5 Oct 2008 03:28:47 -0700 (PDT)

I already had this in my .emacs file for c mode. So I added another hook
to it to support c++ style comments for C, see at the end. But it still
doesn't work. any suggestions ?

(setq c-default-style "linux-c-mode")
(defun linux-c-mode ()
  "C mode with adjusted defaults for use with the Linux kernel."
  (interactive)
  (c-mode)
  (setq c-indent-level 8)
  (setq c-brace-imaginary-offset 0)
  (setq c-brace-offset -8)
  (setq c-argdecl-indent 8)
  (setq c-label-offset -8)
  (setq c-continued-statement-offset 8)
  (setq indent-tabs-mode nil)
  (setq tab-width 4)
->  (setq comment-start "// ")
->  (setq comment-end " "))

Regards,
Maindoor.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]