You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/03/23 12:45:31 UTC
cvs commit: jakarta-turbine/docs code-standards.html
dlr 01/03/23 03:45:31
Modified: docs code-standards.html
Log:
Added a apache-jakarta-mode for X/Emacs and the appropriate setup hooks.
Revision Changes Path
1.21 +17 -12 jakarta-turbine/docs/code-standards.html
Index: code-standards.html
===================================================================
RCS file: /home/cvs/jakarta-turbine/docs/code-standards.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- code-standards.html 2001/03/21 20:41:30 1.20
+++ code-standards.html 2001/03/23 11:45:28 1.21
@@ -280,7 +280,7 @@
</div>
<hr noshade="true" size="1" />
<p>
-Emacs users might appreciate this in their .emacs file...
+X/Emacs users might appreciate this in their .emacs file.
</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
@@ -292,20 +292,25 @@
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
-;; Persuade indention to insert tabs only in Makefile or Outline mode, and to
-;; use a reasonable width.
-(setq indent-tabs-mode nil
- tab-width 4)
+(defun apache-jakarta-mode ()
+ "The Java mode specialization for Apache Jakarta projects."
+ (if (not (assoc "apache-jakarta" c-style-alist))
+ ;; Define the Apache Jakarta cc-mode style.
+ (c-add-style "apache-jakarta" '("java" (indent-tabs-mode . nil))))
-;; Set the amount of offset used by the '+' and '-' symbols in
-;; c-offsets-alist.
-(setq c-basic-offset 4)
+ (c-set-style "apache-jakarta")
+ (c-set-offset 'substatement-open 0 nil)
+ (setq mode-name "Apache Jakarta")
-;; Convince Emacs to indent properly (braces flush with start of block).
-(c-set-offset 'substatement-open 0 nil)
+ ;; Turn on syntax highlighting when X is running.
+ (if (boundp 'window-system)
+ (progn (setq font-lock-support-mode 'lazy-lock-mode)
+ (font-lock-mode t))))
-;; Turn on syntax highlighting when X is running.
-(if (boundp 'window-system) (font-lock-mode-on))
+;; Activate Jakarta mode.
+(if (fboundp 'jde-mode)
+ (add-hook 'jde-mode-hook 'apache-jakarta-mode)
+ (add-hook 'java-mode-hook 'apache-jakarta-mode))
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org