summary refs log tree commit diff stats
path: root/user/emacs/init.el
diff options
context:
space:
mode:
authorAlan Pearce2023-04-23 19:10:30 +0200
committerAlan Pearce2023-04-23 19:10:30 +0200
commitf00b112fe8d3bcbae2c419d6fb3a98e88424d665 (patch)
tree9142e2ae6a83b83405e9cddc450921f003773a57 /user/emacs/init.el
parent58f56db988eb929d4f1a55987d3200f9bdd78175 (diff)
downloadnixfiles-f00b112fe8d3bcbae2c419d6fb3a98e88424d665.tar.lz
nixfiles-f00b112fe8d3bcbae2c419d6fb3a98e88424d665.tar.zst
nixfiles-f00b112fe8d3bcbae2c419d6fb3a98e88424d665.zip
emacs: fix read error when opening helpful buffers
helpful tries to find sources, which could be gzipped.  In this case,
there needs to be a `file-name-handler` to decompress the file.  I
wasn't correctly saving the initial value of `file-name-handler-alist`
in my configuration (the default includes a gzip handler).
Diffstat (limited to 'user/emacs/init.el')
-rw-r--r--user/emacs/init.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 96e089dc..c24b4311 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1,5 +1,6 @@
 ;;; init --- user init file  -*- lexical-binding: t; -*-
 (eval '(setq inhibit-startup-echo-area-message "alan"))
+(defvar default-file-name-handler-alist file-name-handler-alist)
 (setq gc-cons-threshold most-positive-fixnum
       gc-cons-percentage 0.6
       file-name-handler-alist nil)
@@ -12,7 +13,6 @@
 (add-hook 'minibuffer-exit-hook #'set-default-gc-cons)
 (add-hook 'after-init-hook #'set-default-gc-cons)
 
-(defvar default-file-name-handler-alist file-name-handler-alist)
 (defun restore-file-name-handler-alist ()
   (setq file-name-handler-alist default-file-name-handler-alist))
 (add-hook 'emacs-startup-hook #'restore-file-name-handler-alist)