summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-01-10 17:17:59 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-01-10 17:17:59 +0100
commit19de378a7dcdc0e66e85c707bb371da8e25ac452 (patch)
tree15c2bd582e7a9bfc1642456ef7cf14e19fcbd7a5
parent0f5b2e48def25e31b19105a2612b08c3d6748def (diff)
downloaddotfiles-19de378a7dcdc0e66e85c707bb371da8e25ac452.tar.xz
Fix eager macro-expansion failure during startup
Emacs attempts to expand macros when loading uncompiled files to speed up their execution. Since rx is not loaded during startup, Emacs is not aware of the rx pattern for pcase, and takes it for the rx macro. Since this macro does not understand (let …) forms, it throws an "unknown rx pattern" error, which interrupts macro-expansion and shows a noisy warning.
-rw-r--r--.emacs4
1 files changed, 4 insertions, 0 deletions
diff --git a/.emacs b/.emacs
index 35ab4f8..fc4e0de 100644
--- a/.emacs
+++ b/.emacs
@@ -201,6 +201,10 @@
((derived-mode-p 'magit-mode)
(magit-branch-or-commit-at-point))))
+(eval-when-compile
+ ;; Load rx's pcase pattern.
+ (require 'rx))
+
(defun my/action-stamp-at-point (rev)
(interactive
(list