Updating emacs.d files

This commit is contained in:
Henrik Lissner 2015-04-22 20:48:28 -04:00
parent ec6d152756
commit cb99d818fb
14 changed files with 242 additions and 219 deletions

View file

@ -29,7 +29,7 @@
(auto-compression-mode t) ; Transparently open compressed files
(global-font-lock-mode t) ; Enable syntax highlighting for older emacs
(global-auto-revert-mode 1) ; revert buffers for changed files
(electric-indent-mode -1) ; In case of emacs 24.4
(electric-indent-mode -1) ; In case of emacs >24.4
;;; window layout undo/redo
(winner-mode 1)
@ -145,7 +145,7 @@
;;;; Editor behavior ;;;;;;;;;;;;;;;;
;; spaces instead of tabs
(setq-default indent-tabs-mode nil) ; spaces instead of tabs
(setq-default tab-always-indent nil)
(setq-default tab-always-indent t)
(setq-default tab-width 4)
(setq require-final-newline t)

View file

@ -6,24 +6,13 @@
;;;###autoload
(defun load-dark-theme()
(interactive)
;; (sml/apply-theme 'respectful)
(load-theme *dark-theme t))
;;;###autoload
(defun load-light-theme()
(interactive)
;; (sml/apply-theme 'light)
(load-theme *light-theme t))
;;;###autoload
(defun load-font (font size)
(interactive)
(when window-system
(let ((font-str (concat font "-" (number-to-string size))))
(if (member font (font-family-list))
(set-frame-font font-str t t)
(error "Font %s not installed" font)))))
;;;###autoload
(defun toggle-transparency ()
(interactive)
@ -49,16 +38,4 @@
(if (>= my/cycle-font-i (1- (length *fonts)))
(setq my/cycle-font-i 0)
(cl-incf my/cycle-font-i)))
(let* ((font (nth my/cycle-font-i *fonts))
(font-name (nth 0 font))
(font-size (nth 1 font))
(font-aa (nth 2 font))
(font-line (nth 3 font)))
(unless (member font-name (font-family-list))
(error "Font %s isn't installed" font-name))
(let ((font-str (concat font-name "-" (number-to-string font-size))))
(add-to-list 'default-frame-alist `(font . ,font-str))
(add-to-list 'initial-frame-alist `(font . ,font-str)))
(load-font font-name font-size)
(setq ns-antialias-text font-aa)
(setq-default line-spacing font-line)))
(set-frame-font (nth my/cycle-font-i *fonts)))