all repos — nixfiles @ 49070269e914f9365766a2c2c1a889e11fbb2ee9

System and user configuration, managed by nix and home-manager

Emacs: fix undefined function warning
Alan Pearce alan@alanpearce.eu
Fri, 29 Nov 2019 11:20:54 +0100
commit

49070269e914f9365766a2c2c1a889e11fbb2ee9

parent

a29fb071248aaeaacb0c808dbb3c0c5adbe4e7ef

1 files changed, 14 insertions(+), 13 deletions(-)

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -85,25 +85,26 @@ mode-line-mule-info nil               mode-line-client nil
               mode-line-remote nil)
 
+(defvar eyebrowse-lighter-default
+  '(:eval (eyebrowse-mode-line-indicator)))
+(defvar moody-replace-eyebrowse-lighter
+  '(:eval (moody-tab (eyebrowse-mode-line-indicator) 1 'up)))
+(defun moody-replace-eyebrowse (&optional reverse)
+  (interactive "P")
+  (if (assoc 'eyebrowse-mode mode-line-misc-info)
+      (setcdr (assoc 'eyebrowse-mode mode-line-misc-info)
+              (list (if reverse
+                        eyebrowse-lighter-default
+                      moody-replace-eyebrowse-lighter)))
+    (push (list 'eyebrowse-mode moody-replace-eyebrowse-lighter)
+          (cdr (last mode-line-misc-info)))))
+
 (use-package moody
   :config (progn
             (setq x-underline-at-descent-line t)
             (moody-replace-mode-line-buffer-identification)
             (moody-replace-vc-mode)
             (with-eval-after-load 'eyebrowse
-              (defvar eyebrowse-lighter-default
-                '(:eval (eyebrowse-mode-line-indicator)))
-              (defvar moody-replace-eyebrowse-lighter
-                '(:eval (moody-tab (eyebrowse-mode-line-indicator) 1 'up)))
-              (defun moody-replace-eyebrowse (&optional reverse)
-                (interactive "P")
-                (if (assoc 'eyebrowse-mode mode-line-misc-info)
-                (setcdr (assoc 'eyebrowse-mode mode-line-misc-info)
-                        (list (if reverse
-                                  eyebrowse-lighter-default
-                                moody-replace-eyebrowse-lighter)))
-                (push (list 'eyebrowse-mode moody-replace-eyebrowse-lighter)
-                      (cdr (last mode-line-misc-info)))))
               (moody-replace-eyebrowse nil))))
 
 (when (eq system-type 'darwin)