summaryrefslogtreecommitdiff
path: root/dotfiles/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.emacs.d/init.el')
-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)