Loads more updates -- large assortment of stuffs
[syinit] / 01-vars-sy.el
index 7318ec3..18d8127 100644 (file)
@@ -1,14 +1,14 @@
-;; 00-vars-sy.el --- Various variables   -*- Emacs-Lisp -*-
+;; 01-vars-sy.el --- Various variables
 
-;; Copyright (C) 2007 - 2013 Steve Youngs
+;; Copyright (C) 2007 - 2020 Steve Youngs
 
 ;;     Author: Steve Youngs <steve@sxemacs.org>
 ;; Maintainer: Steve Youngs <steve@sxemacs.org>
 ;;    Created: <2007-12-02>
-;; Time-stamp: <Friday Aug 16, 2013 09:34:34 steve>
+;; Time-stamp: <Sunday Mar  8, 2020 11:17:00 steve>
 ;;   Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
-;;   HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/00-vars-sy.html>
-;;   Git Repo: git clone http://git.sxemacs.org/syinit
+;;   HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/01-vars-sy.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
 ;;   Keywords: init, compile
 
 ;; This file is part of SYinit
 ;;     
 
 ;;; Code:
+
+;:*=======================
+;:* Keep garbage collection out of my way.
+;;
+(setq gc-cons-threshold 50000000)
+
+
 ;:*=======================
 ;:* Set default font (I do this in vars-sy.el because it is called first)
 (defvar sydeffaces
 
 ;:*=======================
 ;:* Set the default font
-(set-face-property 'default 'face "-*-Terminus-medium-r-*-*-*-140-*-*-*-*-iso8859-*")
+(set-face-property
+ 'default
+ 'face "-*-Terminus-medium-r-*-*-*-140-*-*-*-*-iso8859-*")
 
 ;:*=======================
 ;:* Stuff. Lots of stuff...
 
 (setq-default
- buffers-menu-grouping-function 'group-buffers-menu-by-mode-then-alphabetically
- buffers-menu-sort-function 'sort-buffers-menu-by-mode-then-alphabetically
+ buffers-menu-grouping-function
+ 'group-buffers-menu-by-mode-then-alphabetically
+ buffers-menu-sort-function
+ 'sort-buffers-menu-by-mode-then-alphabetically
  buffers-menu-submenus-for-groups-p t
  case-fold-search t
  case-replace t
   "Gnus directory.")
    
 (defvar message-directory (paths-construct-path 
-                       (list (user-home-directory) "Gnus"))
+                          (list (user-home-directory) "Gnus"))
   "Gnus directory.")
+
+
+;:*=======================
+;:* Unicode shit
+;(unless (fboundp 'ucs-to-char)
+(when (featurep '(and mule mule-ucs-autoloads))
+  ;; Order is important here
+  (progn
+    (require 'tae)
+    (require 'un-define))
+  (and (coding-system-p (find-coding-system 'utf-8))
+       (setq-default buffer-file-coding-system
+                    (coding-system-name
+                     (find-coding-system 'utf-8)))))
+;)
+
+;:*=======================
+;:* Fix #'run-at-time
+;;  You get an `args-out-of-range' error if you try to set a #'run-at-time
+;;  to go off in the past.  That's not as silly as it sounds, think of
+;;  things you want to run once per day.  At some point the 'time' will be
+;;  in the past for the current day.
+(or (featurep 'timer-funcs)
+    (require 'timer-funcs))
+
+(defadvice run-at-time (before future-run-at-time first activate)
+  "If TIME is in the past, set it for tomorrow."
+  (when (stringp time)
+    (let ((tspec (timer-parse-time time)))
+      (if tspec
+         (progn
+           (setq time
+                 (ceiling
+                  (itimer-time-difference tspec (current-time))))
+           (if (< time 0)
+               (setq time (+ time 86400))))))))
    
+;:*=======================
+;:* Here because sometimes... order important it is
+(require 'ffi-wand)
+
 ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
 (message "variables initialiased")