summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-11-01 14:32:40 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-11-01 14:32:40 -0500
commite406e2cb63de0fbed14df5c44aa70f22c9fc05ed (patch)
tree8f3fa881ede6ff5bde43a40f9e50c515afbdc213
parent2d7877f656d3054c267e83f733f5225d2f928776 (diff)
emacs: Update config.
-rw-r--r--dotfiles/.emacs.d/init.el35
1 files changed, 31 insertions, 4 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el
index c349040..5714a39 100644
--- a/dotfiles/.emacs.d/init.el
+++ b/dotfiles/.emacs.d/init.el
@@ -14,14 +14,19 @@
(declare (indent 1))
`(when (require ,package nil t) ,@body))
+(defun home-file (file-name)
+ "Prefix FILE-NAME with the current home directory."
+ (concat (getenv "HOME") file-name))
+
;;;
;;; Packages
;;;
(add-to-list 'load-path
- (concat (getenv "HOME") "/.guix-profile/share/emacs/site-lisp"))
-(add-to-list 'load-path
- (concat (getenv "HOME") "/Code/guix/emacs"))
+ (home-file "/.guix-profile/share/emacs/site-lisp"))
+;; (add-to-list 'load-path
+;; (home-file "/.guix-profile/share/emacs/site-lisp/guix.d/typo-1.1"))
+(add-to-list 'load-path (home-file "/Code/guix/emacs"))
(when-require 'guix-init
(setf guix-dot-program (concat (getenv "HOME") "/.guix-profile/bin/dot")))
@@ -90,6 +95,16 @@
(require 'dired-x)
;;;
+;;; TRAMP
+;;;
+
+(when-require 'tramp-sh
+ ;; Include the current path for the system to TRAMP's remote path.
+ ;; This is necessary for GuixSD, where the usual /usr/bin,
+ ;; /usr/local/bin, etc. do not exist.
+ (push 'tramp-own-remote-path tramp-remote-path))
+
+;;;
;;; Battery
;;;
@@ -236,6 +251,9 @@ might be bad."
(show-paren-mode t)
+;; Use scheme-mode for Skribe documents.
+(add-to-list 'auto-mode-alist '("\\.skr$" . scheme-mode))
+
(defmacro use-mode-for-lisp (mode)
`(progn
(add-hook 'emacs-lisp-mode-hook (lambda () (,mode t)))
@@ -243,6 +261,15 @@ might be bad."
(add-hook 'lisp-interaction-mode-hook (lambda () (,mode t)))
(add-hook 'scheme-mode-hook (lambda () (,mode t)))))
+(when-require 'skribe
+ ;; Activate Skribe minor mode on .skr files.
+ (add-hook 'scheme-mode-hook
+ (lambda ()
+ (when (string-match "\\.skr$" (buffer-file-name))
+ (skribe-mode t)
+ (when-require 'typo
+ (typo-mode t))))))
+
(when-require 'rainbow-delimiters
(use-mode-for-lisp rainbow-delimiters-mode))
@@ -464,7 +491,7 @@ indentation."
(notmuch-search-next-thread))))
(setf send-mail-function 'smtpmail-send-it
- smtpmail-smtp-server "mail.fsf.org"
+ smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-stream-type 'starttls)