From e406e2cb63de0fbed14df5c44aa70f22c9fc05ed Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 1 Nov 2015 14:32:40 -0500 Subject: emacs: Update config. --- dotfiles/.emacs.d/init.el | 35 +++++++++++++++++++++++++++++++---- 1 file 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"))) @@ -89,6 +94,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) -- cgit v1.2.3