Minor refactor, across the board

Do you see the board? Now look at the other side. That's how far this
refactor extends.

Yes.
This commit is contained in:
Henrik Lissner 2018-06-18 15:02:24 +02:00
parent f6c7c13634
commit ca2c8b5a45
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
10 changed files with 31 additions and 29 deletions

View file

@ -275,7 +275,7 @@ If INIT-FILE is non-nil, profile that instead of USER-INIT-FILE."
init-file init-file
esup-server-port esup-server-port
esup-depth) esup-depth)
"--eval=(run-hooks 'after-init-hook 'emacs-startup-hook 'window-setup-hook)"))) "--eval=(doom|run-all-startup-hooks)")))
(when esup-run-as-batch-p (when esup-run-as-batch-p
(setq process-args (append process-args '("--batch")))) (setq process-args (append process-args '("--batch"))))
(setq esup-child-process (apply #'start-process process-args))) (setq esup-child-process (apply #'start-process process-args)))

View file

@ -232,7 +232,7 @@ live server (if one is found) to tell it to run this function.
If called from an interactive session, tries to reload autoloads files (if If called from an interactive session, tries to reload autoloads files (if
necessary), reinistalize doom (via `doom-initialize') and reloads your private necessary), reinistalize doom (via `doom-initialize') and reloads your private
init.el and config.el. Then runs `doom-reload-hook'." init.el and config.el. Then runs `doom-reload-hook'."
(interactive) (interactive "P")
(require 'core-dispatcher) (require 'core-dispatcher)
(cond ((and noninteractive (not (daemonp))) (cond ((and noninteractive (not (daemonp)))
(require 'server) (require 'server)

View file

@ -89,8 +89,7 @@ variable for an explanation of the defaults (in comments). See
(after! wgrep (after! wgrep
;; A wrapper that invokes `wgrep-mark-deletion' across lines you use ;; A wrapper that invokes `wgrep-mark-deletion' across lines you use
;; `evil-delete' in wgrep buffers. ;; `evil-delete' in wgrep buffers.
(define-key! wgrep-mode-map (define-key wgrep-mode-map [remap evil-delete] #'+evil-delete))
[remap evil-delete] #'+evil-delete))
;; replace native folding commands ;; replace native folding commands
(define-key! 'global (define-key! 'global

View file

@ -27,7 +27,7 @@ these properties:
;;;###autodef ;;;###autodef
(defun set-file-templates! (&rest templates) (defun set-file-templates! (&rest templates)
"Like `doom--set:file-template', but register many file templates at once." "Like `set-file-templates!', but register many file templates at once."
(after! (:when (boundp '+file-templates-alist)) (after! (:when (boundp '+file-templates-alist))
(setq +file-templates-alist (append (list templates) +file-templates-alist)))) (setq +file-templates-alist (append (list templates) +file-templates-alist))))

View file

@ -56,7 +56,8 @@ load everything.")
;; more so. ;; more so.
(advice-add #'magithub-settings--format-magithub.enabled (advice-add #'magithub-settings--format-magithub.enabled
:override #'+magit*hub-settings--format-magithub.enabled)) :override #'+magit*hub-settings--format-magithub.enabled))
(magithub-feature-autoinject +magit-hub-features)) (when +magit-hub-features
(magithub-feature-autoinject +magit-hub-features)))
(def-package! magit-gitflow (def-package! magit-gitflow
@ -66,8 +67,9 @@ load everything.")
(def-package! evil-magit (def-package! evil-magit
:when (featurep! :feature evil +everywhere) :when (featurep! :feature evil +everywhere)
:after magit :after magit
:init (setq evil-magit-state 'normal :init
evil-magit-use-z-for-folds t) (setq evil-magit-state 'normal
evil-magit-use-z-for-folds t)
:config :config
(define-key! magit-mode-map (define-key! magit-mode-map
(kbd "M-1") nil (kbd "M-1") nil

View file

@ -55,17 +55,18 @@
(add-hook 'window-configuration-change-hook #'+doom-modeline|set-selected-window) (add-hook 'window-configuration-change-hook #'+doom-modeline|set-selected-window)
(add-hook 'doom-after-switch-window-hook #'+doom-modeline|set-selected-window) (add-hook 'doom-after-switch-window-hook #'+doom-modeline|set-selected-window)
(if (not (boundp 'after-focus-change-function)) (with-no-warnings
(progn (if (not (boundp 'after-focus-change-function))
(add-hook 'focus-in-hook #'+doom-modeline|set-selected-window) (progn
(add-hook 'focus-out-hook #'+doom-modeline|unset-selected-window)) (add-hook 'focus-in-hook #'+doom-modeline|set-selected-window)
(defun +doom-modeline|refresh-frame () (add-hook 'focus-out-hook #'+doom-modeline|unset-selected-window))
(setq +doom-modeline-current-window nil) (defun +doom-modeline|refresh-frame ()
(cl-loop for frame in (frame-list) (setq +doom-modeline-current-window nil)
if (eq (frame-focus-state frame) t) (cl-loop for frame in (frame-list)
return (setq +doom-modeline-current-window (frame-selected-window frame))) if (eq (frame-focus-state frame) t)
(force-mode-line-update)) return (setq +doom-modeline-current-window (frame-selected-window frame)))
(add-function :after after-focus-change-function #'+doom-modeline|refresh-frame)) (force-mode-line-update))
(add-function :after after-focus-change-function #'+doom-modeline|refresh-frame)))
;; ;;

View file

@ -40,7 +40,7 @@
:quit 'current :select t) :quit 'current :select t)
(after! winner (after! winner
(cl-pushnew neo-buffer-name winner-boring-buffers)) (add-to-list 'winner-boring-buffers neo-buffer-name))
;; The cursor always sits at bol. `+neotree*fix-cursor' and ;; The cursor always sits at bol. `+neotree*fix-cursor' and
;; `+neotree*indent-cursor' change that behavior, so that the cursor is always ;; `+neotree*indent-cursor' change that behavior, so that the cursor is always

View file

@ -1,13 +1,5 @@
;;; ui/popup/autoload/popup.el -*- lexical-binding: t; -*- ;;; ui/popup/autoload/popup.el -*- lexical-binding: t; -*-
(defvar +popup--populate-wparams (not EMACS26+))
(defvar +popup--inhibit-transient nil)
(defvar +popup--inhibit-select nil)
(defvar +popup--old-display-buffer-alist nil)
(defvar +popup--remember-last t)
(defvar +popup--last nil)
(defvar-local +popup--timer nil)
(defun +popup--remember (windows) (defun +popup--remember (windows)
"Remember WINDOWS (a list of windows) for later restoration." "Remember WINDOWS (a list of windows) for later restoration."
(cl-assert (cl-every #'windowp windows) t) (cl-assert (cl-every #'windowp windows) t)

View file

@ -24,6 +24,14 @@ Modifying this has no effect, unless done before ui/popup loads.")
"Size of the margins to give popup windows. Set this to nil to disable margin "Size of the margins to give popup windows. Set this to nil to disable margin
adjustment.") adjustment.")
(defvar +popup--populate-wparams (not EMACS26+))
(defvar +popup--inhibit-transient nil)
(defvar +popup--inhibit-select nil)
(defvar +popup--old-display-buffer-alist nil)
(defvar +popup--remember-last t)
(defvar +popup--last nil)
(defvar-local +popup--timer nil)
;; ;;
;; Global modes ;; Global modes

View file

@ -289,7 +289,7 @@ Use the :iosevka property to enable (or disable) it regardless.")
(tail (cdr l))) (tail (cdr l)))
(cond ((not (consp l)) '()) (cond ((not (consp l)) '())
((not (consp tail)) (list head)) ((not (consp tail)) (list head))
((cons head (cons nil (+pretty-code--icon-to-char tail))))))) ((cons head (cons glue (+pretty-code--icon-to-char tail)))))))
;;;###autodef ;;;###autodef
(defun set-pretty-symbols! (modes &rest plist) (defun set-pretty-symbols! (modes &rest plist)