Add HTML versions of my init files
[website] / SYinits / 03-c-mode.html
diff --git a/SYinits/03-c-mode.html b/SYinits/03-c-mode.html
new file mode 100644 (file)
index 0000000..ad72bf1
--- /dev/null
@@ -0,0 +1,211 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!-- Created by htmlize-1.34 in css mode. -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <title>03-c-mode.el</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <meta name="author" content="Steve Youngs" />
+    <meta name="owner" content="steve@sxemacs.org" />
+    <style type="text/css">
+    <!--
+      body {
+        color: #ffffff;
+        background-color: #000000;
+      }
+      .comment {
+        /* font-lock-comment-face */
+        color: #87ceeb;
+      }
+      .doc-string {
+        /* font-lock-doc-string-face */
+        color: #32cd32;
+      }
+      .function-name {
+        /* font-lock-function-name-face */
+        color: #ffff00;
+        font-weight: bold;
+      }
+      .keyword {
+        /* font-lock-keyword-face */
+        color: #fa8072;
+      }
+      .reference {
+        /* font-lock-reference-face */
+        color: #40e0d0;
+      }
+      .string {
+        /* font-lock-string-face */
+        color: #00cd00;
+      }
+      .variable-name {
+        /* font-lock-variable-name-face */
+        color: #ffdab9;
+      }
+
+      a {
+        color: #FF0000;
+        background-color: inherit;
+        font: inherit;
+        font-weight: bold;
+        text-decoration: underline;
+      }
+      a:hover {
+        color: #FFFFFF;
+        background-color: #FD00FD;
+        text-decoration: underline;
+      }
+      .img a:hover {
+        background-color: #000000;
+        text-decoration: none;
+      }
+    -->
+    </style>
+  </head>
+  <body>
+    <pre>
+<span class="comment">;; 03-c-mode.el --- Set up C mode
+</span>
+<span class="comment">;; Copyright (C) 2007 - 2020 Steve Youngs
+</span>
+<span class="comment">;;     Author: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
+;; Maintainer: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
+;;    Created: &lt;2007-12-02&gt;
+;; Time-stamp: &lt;Thursday Apr  9, 2020 06:45:27 steve&gt;
+;;   Download: &lt;<a href="https://downloads.sxemacs.org/SYinits/">https://downloads.sxemacs.org/SYinits/</a>&gt;
+;;   HTMLised: &lt;<a href="https://www.sxemacs.org/SYinits/03-c-mode.html">https://www.sxemacs.org/SYinits/03-c-mode.html</a>&gt;
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+</span>
+<span class="comment">;; This file is part of SYinit
+</span>
+<span class="comment">;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</span>
+<span class="comment">;;; Commentary:
+;;   This sets up my C programming styles.  Note, too, that with this
+;;   setup I am able to have different styles for different projects.
+;;   It is a little kludgy, but it works.
+</span>
+<span class="comment">;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+</span>
+<span class="comment">;;; Todo:
+;;
+;;     
+</span>
+<span class="comment">;;; Code:
+;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
+;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Defaults
+</span>(setq c-comment-leader "<span class="doc-string">  </span>")
+(setq c-default-style
+      '((c-mode . "<span class="string">linux</span>")
+        (c++-mode . "<span class="string">linux</span>")
+        (java-mode . "<span class="string">java</span>")
+        (python-mode . "<span class="string">python</span>")
+        (other . "<span class="string">gnu</span>")))
+
+<span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
+;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Special style for Linux source files
+</span>(<span class="keyword">defun</span> <span class="function-name">linux-c-mode</span> ()
+  "<span class="doc-string">C mode with adjusted defaults for use with the Linux kernel.
+
+Key-bindings:
+\\{c-mode-map}</span>"
+  (c-mode)
+  (c-set-style "<span class="string">linux</span>")
+  (setq mode-name "<span class="string">Linux/C</span>"))
+
+(add-to-list
+ 'auto-mode-alist '("<span class="string">^.*/linux.*/.*\\.[ch]$</span>" . linux-c-mode))
+
+<span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
+;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> C style for XEmacs core source files
+</span>(<span class="keyword">defun</span> <span class="function-name">xemacs-c-mode</span> ()
+  "<span class="doc-string">C mode with adjusted defaults for use with XEmacs core sources.
+
+Key-bindings:
+\\{c-mode-map}</span>"
+  (c-mode)
+  (c-set-style "<span class="string">gnu</span>")
+  (setq mode-name "<span class="string">XE/C</span>"))
+
+(add-to-list
+ 'auto-mode-alist '("<span class="string">^.*/xemacs.*/.*\\.[ch]$</span>" . xemacs-c-mode))
+
+<span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
+;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> C style for SXEmacs core source files
+</span>(<span class="keyword">defvar</span> <span class="variable-name">c-enable-xemacs-performance-kludge-p</span>)
+(<span class="keyword">defun</span> <span class="function-name">sxemacs-c-mode</span> ()
+  "<span class="doc-string">C mode with adjusted defaults for use with SXEmacs core sources.
+
+Key-bindings:
+\\{c-mode-map}</span>"
+  (c-mode)
+  (c-set-style "<span class="string">linux</span>")
+  (setq mode-name "<span class="string">SXE/C</span>")
+  (make-variable-buffer-local 'c-enable-xemacs-performance-kludge-p)
+  (setq c-enable-xemacs-performance-kludge-p t))
+
+(add-to-list
+ 'auto-mode-alist '("<span class="string">^.*/sxemacs.*/.*\\.[ch]$</span>" . sxemacs-c-mode))
+
+<span class="comment">;</span><span class="comment"><span class="reference">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</span></span><span class="comment">
+</span>(message "<span class="doc-string">C mode initialised.</span>")
+</pre>
+  <!--  SXEmacs Logo -->
+    <div class="img">
+      <a href="https://www.sxemacs.org/" target="_parent">
+       <img style="padding:0px 5px 0px 0px;border:0;width:88px;height:31px"
+         src="/Images/cbsx.png"
+         title="This page was created entirely in SXEmacs"
+         alt="Created with SXEmacs" />
+      </a>
+<!--  End SXEmacs Logo -->
+<!--  Valid XHTML 1.0 -->
+      <a href="http://validator.w3.org/check?uri=https%3a%2f%2fwww.sxemacs.org%2fSYinits%2f03-c-mode.html" target="_blank">
+       <img style="padding:0px 5px 0px 10px;border:0;width:88px;height:31px"
+         src="/Images/valid-xhtml10.png"
+         title="Valid XHTML 1.0 Transitional!"
+         alt="Valid XHTML 1.0 Transitional!" />
+      </a>
+    </div>
+<!--  End Valid XHTML 1.0 -->
+
+    <h6>Copyright &#169; 2020 Steve Youngs<br />
+     Verbatim copying and distribution is permitted in any medium,
+    providing this notice is preserved.<br />
+<!-- hhmts start -->
+Last modified: Wed Apr 15 18:11:21 AEST 2020
+<!-- hhmts end -->
+   </h6>
+
+</body>
+</html>