1 ;; 01-vars-sy.el --- Various variables
3 ;; Copyright (C) 2007 - 2020 Steve Youngs
5 ;; Author: Steve Youngs <steve@sxemacs.org>
6 ;; Maintainer: Steve Youngs <steve@sxemacs.org>
7 ;; Created: <2007-12-02>
8 ;; Time-stamp: <Sunday Mar 8, 2020 11:17:00 steve>
9 ;; Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
10 ;; HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/01-vars-sy.html>
11 ;; Git Repo: git clone https://git.sxemacs.org/syinit
12 ;; Keywords: init, compile
14 ;; This file is part of SYinit
16 ;; Redistribution and use in source and binary forms, with or without
17 ;; modification, are permitted provided that the following conditions
20 ;; 1. Redistributions of source code must retain the above copyright
21 ;; notice, this list of conditions and the following disclaimer.
23 ;; 2. Redistributions in binary form must reproduce the above copyright
24 ;; notice, this list of conditions and the following disclaimer in the
25 ;; documentation and/or other materials provided with the distribution.
27 ;; 3. Neither the name of the author nor the names of any contributors
28 ;; may be used to endorse or promote products derived from this
29 ;; software without specific prior written permission.
31 ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
32 ;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33 ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
34 ;; DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
35 ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
38 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
40 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
41 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 ;; This init file sets up a few miscelaneous variables and whatnot.
46 ;; If anything has to be loaded very early in the boot up I'll put
47 ;; it in here because this file is loaded first.
52 ;; The HTML version of this file was created with Hrvoje Niksic's
53 ;; htmlize.el which is part of the XEmacs "text-modes" package.
62 ;:*=======================
63 ;:* Keep garbage collection out of my way.
65 (setq gc-cons-threshold 50000000)
68 ;:*=======================
69 ;:* Set default font (I do this in vars-sy.el because it is called first)
71 '(default bold bold-italic italic)
72 "List symbols for default fonts.")
76 (remove-specifier (face-font font) 'global '(x default) nil))
80 (set-face-font 'default
82 "-xos4-terminus-medium-r-*-*-*-150-*-*-*-*-iso8859-*")
86 "-xos4-terminus-bold-r-*-*-*-150-*-*-*-*-iso8859-*")
88 (set-face-font 'bold-italic
90 "-*-times-bold-i-*-*-*-140-*-*-*-*-iso8859-*")
92 (set-face-font 'italic
94 "-*-times-medium-i-*-*-*-140-*-*-*-*-*-*")
95 'global '(x default)))
97 ;:*=======================
99 ;; A lot of the time I'm running some very unstable code. So I set
100 ;; this quite high so I can catch all the help-lossage messages.
101 (setq view-lossage-message-count 1000)
103 ;:*=======================
104 ;:* SXEmacs has a sane filename for custom-file
105 (unless (featurep 'sxemacs)
107 (expand-file-name "custom-steve.el" user-init-directory))
108 (load-file custom-file))
110 ;:*=======================
111 ;:* Set the default font
114 'face "-*-Terminus-medium-r-*-*-*-140-*-*-*-*-iso8859-*")
116 ;:*=======================
117 ;:* Stuff. Lots of stuff...
120 buffers-menu-grouping-function
121 'group-buffers-menu-by-mode-then-alphabetically
122 buffers-menu-sort-function
123 'sort-buffers-menu-by-mode-then-alphabetically
124 buffers-menu-submenus-for-groups-p t
127 get-frame-for-buffer-default-instance-limit nil
128 mouse-yank-at-point t
129 next-line-add-newlines nil
131 require-final-newline t
132 teach-extended-commands-p t
133 teach-extended-commands-timeout 5
134 temp-buffer-show-function 'show-temp-buffer-in-current-frame
137 (defvar gnus-directory (paths-construct-path
138 (list (user-home-directory) "Gnus"))
141 (defvar message-directory (paths-construct-path
142 (list (user-home-directory) "Gnus"))
146 ;:*=======================
148 ;(unless (fboundp 'ucs-to-char)
149 (when (featurep '(and mule mule-ucs-autoloads))
150 ;; Order is important here
153 (require 'un-define))
154 (and (coding-system-p (find-coding-system 'utf-8))
155 (setq-default buffer-file-coding-system
157 (find-coding-system 'utf-8)))))
160 ;:*=======================
161 ;:* Fix #'run-at-time
162 ;; You get an `args-out-of-range' error if you try to set a #'run-at-time
163 ;; to go off in the past. That's not as silly as it sounds, think of
164 ;; things you want to run once per day. At some point the 'time' will be
165 ;; in the past for the current day.
166 (or (featurep 'timer-funcs)
167 (require 'timer-funcs))
169 (defadvice run-at-time (before future-run-at-time first activate)
170 "If TIME is in the past, set it for tomorrow."
172 (let ((tspec (timer-parse-time time)))
177 (itimer-time-difference tspec (current-time))))
179 (setq time (+ time 86400))))))))
181 ;:*=======================
182 ;:* Here because sometimes... order important it is
185 ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
186 (message "variables initialiased")