From e44fd886f216a352a47882dc4cf3f401dd2fe802 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 14 May 2018 20:35:26 +0200 Subject: [PATCH] Appease byte-compiler-sama --- modules/app/email/+gmail.el | 13 +++++++------ modules/app/twitter/autoload.el | 2 +- modules/app/twitter/config.el | 3 ++- modules/config/default/+bindings.el | 2 +- modules/config/default/config.el | 19 ++++++++++--------- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/modules/app/email/+gmail.el b/modules/app/email/+gmail.el index 7b001223b..9d647b206 100644 --- a/modules/app/email/+gmail.el +++ b/modules/app/email/+gmail.el @@ -16,12 +16,12 @@ (map-put mu4e-marks 'trash (list :char '("d" . "▼") :prompt "dtrash" - :dyn-target (lambda (target msg) (mu4e-get-trash-folder msg)) + :dyn-target (lambda (_target msg) (mu4e-get-trash-folder msg)) :action #'+email--mark-seen)) ;; Refile will be my "archive" function. (map-put mu4e-marks 'refile (list :char '("r" . "▶") :prompt "refile" - :show-target (lambda (target) "archive") + :show-target (lambda (_target) "archive") :action #'+email--mark-seen)) ;; This hook correctly modifies gmail flags on emails when they are marked. @@ -29,8 +29,9 @@ ;; won't properly result in the corresponding gmail action, since the marks ;; are ineffectual otherwise. (defun +email|gmail-fix-flags (mark msg) - (cond ((eq mark 'trash) (mu4e-action-retag-message msg "-\\Inbox,+\\Trash,-\\Draft")) - ((eq mark 'refile) (mu4e-action-retag-message msg "-\\Inbox")) - ((eq mark 'flag) (mu4e-action-retag-message msg "+\\Starred")) - ((eq mark 'unflag) (mu4e-action-retag-message msg "-\\Starred")))) + (pcase mark + (`trash (mu4e-action-retag-message msg "-\\Inbox,+\\Trash,-\\Draft")) + (`refile (mu4e-action-retag-message msg "-\\Inbox")) + (`flag (mu4e-action-retag-message msg "+\\Starred")) + (`unflag (mu4e-action-retag-message msg "-\\Starred")))) (add-hook 'mu4e-mark-execute-pre-hook #'+email|gmail-fix-flags)) diff --git a/modules/app/twitter/autoload.el b/modules/app/twitter/autoload.el index 883390363..97e23eb02 100644 --- a/modules/app/twitter/autoload.el +++ b/modules/app/twitter/autoload.el @@ -62,7 +62,7 @@ that works with the feature/popup module." (with-current-buffer buf (twittering-rerender-timeline-all buf) (setq-local line-spacing 0.2) - (goto-line 0 buf)))) + (goto-char (point-min))))) ;;;###autoload (defun +twitter/ace-link () diff --git a/modules/app/twitter/config.el b/modules/app/twitter/config.el index f5bd6854f..ae40a8e4c 100644 --- a/modules/app/twitter/config.el +++ b/modules/app/twitter/config.el @@ -30,7 +30,8 @@ '((transient) (quit) (select . t))) (defface twitter-divider - `((t (:underline (:color ,(doom-darken 'vertical-bar 0.2))))) + '((((background dark)) (:underline (:color "#141519"))) + (((background light)) (:underline (:color "#d3d3d3")))) "The vertical divider between tweets." :group 'twittering-mode) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index 4d0e3a9d4..6a5fb7b62 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -747,7 +747,7 @@ ;; (when (featurep 'evil-collection) - (defun +config|deal-with-evil-collections-bs (feature keymaps) + (defun +config|deal-with-evil-collections-bs (_feature keymaps) "Unmap keys that conflict with Doom's defaults." (dolist (map keymaps) (evil-define-key '(normal visual motion) map diff --git a/modules/config/default/config.el b/modules/config/default/config.el index aed29b011..f3325d2a4 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -76,15 +76,16 @@ (defvar +default-repeat-forward-key ";") (defvar +default-repeat-backward-key ",") - ;; Makes ; and , the universal repeat-keys in evil-mode - (defmacro do-repeat! (command next-func prev-func) - "Repeat motions with ;/," - (let ((fn-sym (intern (format "+evil*repeat-%s" command)))) - `(progn - (defun ,fn-sym (&rest _) - (define-key evil-motion-state-map +default-repeat-forward-key ',next-func) - (define-key evil-motion-state-map +default-repeat-backward-key ',prev-func)) - (advice-add #',command :before #',fn-sym)))) + (eval-and-compile + ;; Makes ; and , the universal repeat-keys in evil-mode + (defmacro do-repeat! (command next-func prev-func) + "Repeat motions with ;/," + (let ((fn-sym (intern (format "+evil*repeat-%s" (doom-unquote command))))) + `(progn + (defun ,fn-sym (&rest _) + (define-key evil-motion-state-map +default-repeat-forward-key #',next-func) + (define-key evil-motion-state-map +default-repeat-backward-key #',prev-func)) + (advice-add #',command :before #',fn-sym))))) ;; n/N (do-repeat! evil-ex-search-next evil-ex-search-next evil-ex-search-previous)