Regenerate my html, pkgs, and misc init file htmls
[website] / SYinits / 01-vars.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <!-- Created by htmlize-1.34 in css mode. -->
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5   <head>
6     <title>01-vars.el</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8     <meta name="author" content="Steve Youngs" />
9     <meta name="owner" content="steve@sxemacs.org" />
10     <style type="text/css">
11     <!--
12       body {
13         color: #ffffff;
14         background-color: #000000;
15       }
16       .comment {
17         /* font-lock-comment-face */
18         color: #87ceeb;
19       }
20       .doc-string {
21         /* font-lock-doc-string-face */
22         color: #32cd32;
23       }
24       .function-name {
25         /* font-lock-function-name-face */
26         color: #ffff00;
27         font-weight: bold;
28       }
29       .keyword {
30         /* font-lock-keyword-face */
31         color: #fa8072;
32       }
33       .reference {
34         /* font-lock-reference-face */
35         color: #40e0d0;
36       }
37       .string {
38         /* font-lock-string-face */
39         color: #00cd00;
40       }
41       .variable-name {
42         /* font-lock-variable-name-face */
43         color: #ffdab9;
44       }
45
46       a {
47         color: #FF0000;
48         background-color: inherit;
49         font: inherit;
50         font-weight: bold;
51         text-decoration: underline;
52       }
53       a:hover {
54         color: #FFFFFF;
55         background-color: #FD00FD;
56         text-decoration: underline;
57       }
58       .img a:hover {
59         background-color: #000000;
60         text-decoration: none;
61       }
62     -->
63     </style>
64   </head>
65   <body>
66     <pre>
67 <span class="comment">;; 01-vars.el --- Various variables
68 </span>
69 <span class="comment">;; Copyright (C) 2007 - 2020 Steve Youngs
70 </span>
71 <span class="comment">;;     Author: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
72 ;; Maintainer: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
73 ;;    Created: &lt;2007-12-02&gt;
74 ;; Time-stamp: &lt;Thursday Apr  9, 2020 06:38:48 steve&gt;
75 ;;   Download: &lt;<a href="https://downloads.sxemacs.org/SYinits/">https://downloads.sxemacs.org/SYinits/</a>&gt;
76 ;;   HTMLised: &lt;<a href="https://www.sxemacs.org/SYinits/01-vars.html">https://www.sxemacs.org/SYinits/01-vars.html</a>&gt;
77 ;;   Git Repo: git clone https://git.sxemacs.org/syinit
78 ;;   Keywords: init, compile
79 </span>
80 <span class="comment">;; This file is part of SYinit
81 </span>
82 <span class="comment">;; Redistribution and use in source and binary forms, with or without
83 ;; modification, are permitted provided that the following conditions
84 ;; are met:
85 ;;
86 ;; 1. Redistributions of source code must retain the above copyright
87 ;;    notice, this list of conditions and the following disclaimer.
88 ;;
89 ;; 2. Redistributions in binary form must reproduce the above copyright
90 ;;    notice, this list of conditions and the following disclaimer in the
91 ;;    documentation and/or other materials provided with the distribution.
92 ;;
93 ;; 3. Neither the name of the author nor the names of any contributors
94 ;;    may be used to endorse or promote products derived from this
95 ;;    software without specific prior written permission.
96 ;;
97 ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
98 ;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
99 ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
100 ;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
101 ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
102 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
103 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
104 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
105 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
106 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
107 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108 </span>
109 <span class="comment">;;; Commentary:
110 ;;
111 ;;   This init file sets up a few miscelaneous variables and whatnot.
112 ;;   If anything has to be loaded very early in the boot up I'll put
113 ;;   it in here because this file is loaded first.
114 ;;
115 </span>
116 <span class="comment">;;; Credits:
117 ;;
118 ;;   The HTML version of this file was created with Hrvoje Niksic's
119 ;;   htmlize.el which is part of the XEmacs "text-modes" package.
120 ;;
121 </span>
122 <span class="comment">;;; Todo:
123 ;;
124 ;;     
125 </span>
126 <span class="comment">;;; Code:
127 </span>
128 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
129 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Keep garbage collection out of my way.
130 ;;
131 </span>(setq gc-cons-threshold 50000000)
132
133
134 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
135 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Set default font
136 </span>(<span class="keyword">defvar</span> <span class="variable-name">sydeffaces</span>
137   '(default bold bold-italic italic)
138   "<span class="doc-string">List symbols for default fonts.</span>")
139
140 (mapc
141  #'(<span class="keyword">lambda</span> (font)
142      (remove-specifier (face-font font) 'global '(x default) nil))
143  sydeffaces)
144
145 (<span class="keyword">progn</span>
146   (set-face-font 'default
147                  (make-font-instance
148                   "<span class="string">-xos4-terminus-medium-r-*-*-*-150-*-*-*-*-iso8859-*</span>")
149                  'global '(x default))
150   (set-face-font 'bold
151                  (make-font-instance
152                   "<span class="string">-xos4-terminus-bold-r-*-*-*-150-*-*-*-*-iso8859-*</span>")
153                  'global '(x default))
154   (set-face-font 'bold-italic
155                  (make-font-instance
156                   "<span class="string">-*-times-bold-i-*-*-*-140-*-*-*-*-iso8859-*</span>")
157                  'global '(x default))
158   (set-face-font 'italic
159                  (make-font-instance
160                   "<span class="string">-*-times-medium-i-*-*-*-140-*-*-*-*-*-*</span>")
161                  'global '(x default)))
162
163 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
164 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Lossage Messages
165 ;; A lot of the time I'm running some very unstable code.  So I set
166 ;; this quite high so I can catch all the help-lossage messages.
167 </span>(setq view-lossage-message-count 1000)
168
169 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
170 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> SXEmacs has a sane filename for custom-file
171 </span>(<span class="keyword">unless</span> (<span class="keyword">featurep</span> '<span class="reference">sxemacs</span>)
172   (setq custom-file
173         (expand-file-name "<span class="string">custom-steve.el</span>" user-init-directory))
174   (load-file custom-file))
175
176 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
177 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Set the default font
178 </span>(set-face-property
179  'default
180  'face "<span class="doc-string">-*-Terminus-medium-r-*-*-*-140-*-*-*-*-iso8859-*</span>")
181
182 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
183 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Stuff. Lots of stuff...
184 </span>
185 (setq-default
186  buffers-menu-grouping-function
187  'group-buffers-menu-by-mode-then-alphabetically
188  buffers-menu-sort-function
189  'sort-buffers-menu-by-mode-then-alphabetically
190  buffers-menu-submenus-for-groups-p t
191  case-fold-search t
192  case-replace t
193  get-frame-for-buffer-default-instance-limit nil
194  mouse-yank-at-point t
195  next-line-add-newlines nil
196  overwrite-mode nil
197  require-final-newline t
198  teach-extended-commands-p t
199  teach-extended-commands-timeout 5
200  temp-buffer-show-function 'show-temp-buffer-in-current-frame
201  zmacs-regions t)
202
203 (<span class="keyword">defvar</span> <span class="variable-name">gnus-directory</span> (paths-construct-path 
204                         (list (user-home-directory) "<span class="string">Gnus</span>"))
205   "<span class="doc-string">Gnus directory.</span>")
206    
207 (<span class="keyword">defvar</span> <span class="variable-name">message-directory</span> (paths-construct-path 
208                            (list (user-home-directory) "<span class="string">Gnus</span>"))
209   "<span class="doc-string">Gnus directory.</span>")
210
211
212 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
213 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Unicode shit
214 ;(unless (fboundp 'ucs-to-char)
215 </span>(<span class="keyword">when</span> (<span class="keyword">featurep</span> '(and mule mule-ucs-autoloads))
216   <span class="comment">;; Order is important here
217 </span>  (<span class="keyword">progn</span>
218     (<span class="keyword">require</span> '<span class="reference">tae</span>)
219     (<span class="keyword">require</span> '<span class="reference">un-define</span>)
220     (set-coding-priority-list '(utf-8))
221     (set-coding-category-system 'utf-8 'utf-8))
222   (and (coding-system-p (find-coding-system 'utf-8))
223        (setq-default buffer-file-coding-system
224                      (coding-system-name
225                       (find-coding-system 'utf-8)))))
226
227 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
228 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Fix #'run-at-time
229 ;;  You get an `</span><span class="comment"><span class="reference">args-out-of-range</span></span><span class="comment">' error if you try to set a #'run-at-time
230 ;;  to go off in the past.  That's not as silly as it sounds, think of
231 ;;  things you want to run once per day.  At some point the 'time' will be
232 ;;  in the past for the current day.
233 </span>(or (<span class="keyword">featurep</span> '<span class="reference">timer-funcs</span>)
234     (<span class="keyword">require</span> '<span class="reference">timer-funcs</span>))
235
236 (<span class="keyword">defadvice</span> <span class="function-name">run-at-time</span> (before future-run-at-time first activate)
237   "<span class="doc-string">If TIME is in the past, set it for tomorrow.</span>"
238   (<span class="keyword">when</span> (stringp time)
239     (<span class="keyword">let</span> ((tspec (timer-parse-time time)))
240       (<span class="keyword">if</span> tspec
241           (<span class="keyword">progn</span>
242             (setq time
243                   (ceiling
244                    (itimer-time-difference tspec (current-time))))
245             (<span class="keyword">if</span> (&lt; time 0)
246                 (setq time (+ time 86400))))))))
247    
248 <span class="comment">;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
249 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Here because sometimes... order important it is
250 </span>(<span class="keyword">require</span> '<span class="reference">ffi-wand</span>)
251
252 <span class="comment">;</span><span class="comment"><span class="reference">:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*</span></span><span class="comment">
253 </span>(message "<span class="doc-string">variables initialiased</span>")
254 </pre>
255   <!--  SXEmacs Logo -->
256     <div class="img">
257       <a href="https://www.sxemacs.org/" target="_parent">
258         <img style="padding:0px 5px 0px 0px;border:0;width:88px;height:31px"
259           src="/Images/cbsx.png"
260           title="This page was created entirely in SXEmacs"
261           alt="Created with SXEmacs" />
262       </a>
263 <!--  End SXEmacs Logo -->
264 <!--  Valid XHTML 1.0 -->
265       <a href="http://validator.w3.org/check?uri=https%3a%2f%2fwww.sxemacs.org%2fSYinits%2f01-vars.html" target="_blank">
266        <img style="padding:0px 5px 0px 10px;border:0;width:88px;height:31px"
267           src="/Images/valid-xhtml10.png"
268           title="Valid XHTML 1.0 Transitional!"
269           alt="Valid XHTML 1.0 Transitional!" />
270       </a>
271     </div>
272 <!--  End Valid XHTML 1.0 -->
273
274     <h6>Copyright &#169; 2020 Steve Youngs<br />
275      Verbatim copying and distribution is permitted in any medium,
276     providing this notice is preserved.<br />
277 <!-- hhmts start -->
278 Last modified: Wed Apr 15 18:12:00 AEST 2020
279 <!-- hhmts end -->
280    </h6>
281
282 </body>
283 </html>