From a656309fcddbd1fd0a62c0a994d4da097a1adbee Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 9 Oct 2020 17:10:44 +0000 Subject: modules/emacs: fix recent customisations I need to remember to start up a fresh Emacs and everything looks okay after changing init.el. Both of these don't work if they're evaluated too early, and dired-listing-switches wasn't being interpreted as a variable reference, but as a stringp. --- modules/workstation/emacs/init.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/workstation/emacs/init.el b/modules/workstation/emacs/init.el index d15b25168172..4c480b86f094 100644 --- a/modules/workstation/emacs/init.el +++ b/modules/workstation/emacs/init.el @@ -26,12 +26,14 @@ (add-to-list 'auto-mode-alist '("\\.quirks\\'" . conf-unix-mode)) ;;; CC Mode ;;; -;; Default to kernel style. -(add-to-list 'c-default-style '(other . "linux")) +(with-eval-after-load 'cc-styles + ;; Default to kernel style. + (add-to-list 'c-default-style '(other . "linux"))) ;;; Dired ;;; -(setq dired-listing-switches - (combine-and-quote-strings '(dired-listing-switches "-h"))) +(with-eval-after-load 'dired + (setq dired-listing-switches + (combine-and-quote-strings `(,dired-listing-switches "-h")))) ;;; Direnv ;;; (direnv-mode) -- cgit 1.4.1