Macros now prefixed with @, instead of suffixed with !

This commit is contained in:
Henrik Lissner 2017-02-09 04:22:08 -05:00
parent ec694649db
commit 6c06aa0ce7
26 changed files with 265 additions and 247 deletions

View file

@ -45,8 +45,8 @@
;; show typed keystrokes in minibuffer
(setq echo-keystrokes 0.02)
;; ...but hide them while isearch is active
(add-hook! isearch-mode (setq echo-keystrokes 0))
(add-hook! isearch-mode-end (setq echo-keystrokes 0.02))
(@add-hook isearch-mode (setq echo-keystrokes 0))
(@add-hook isearch-mode-end (setq echo-keystrokes 0.02))
;; A minor mode for toggling the mode-line
(defvar doom--hidden-modeline-format nil
@ -90,7 +90,7 @@ disabled.")
(foreground-color . ,doom-ui-default-foreground))
default-frame-alist))
;; no fringe in the minibuffer
(add-hook! (emacs-startup minibuffer-setup)
(@add-hook (emacs-startup minibuffer-setup)
(set-window-fringes (minibuffer-window) 0 0 nil)))
@ -101,7 +101,7 @@ disabled.")
;; I modified the built-in `hideshow' package to enable itself when needed. A
;; better, more vim-like code-folding plugin would be the `origami' plugin, but
;; until certain breaking bugs are fixed in it, I won't switch over.
(use-package! hideshow ; built-in
(@use-package hideshow ; built-in
:commands (hs-minor-mode hs-toggle-hiding hs-already-hidden-p)
:init
(defun doom*autoload-hideshow ()
@ -110,7 +110,7 @@ disabled.")
(advice-add 'evil-toggle-fold :before 'doom*autoload-hideshow))
;; Show uninterrupted indentation markers with some whitespace voodoo.
(package! highlight-indent-guides
(@package highlight-indent-guides
:commands highlight-indent-guides-mode
:config
(setq highlight-indent-guides-method 'character)
@ -152,7 +152,7 @@ file."
(set-buffer-modified-p nil))
nil)
(add-hook! highlight-indent-guides-mode
(@add-hook highlight-indent-guides-mode
(if highlight-indent-guides-mode
(progn
(doom|inject-trailing-whitespace)
@ -161,44 +161,44 @@ file."
(delete-trailing-whitespace))))
;; Some modes don't adequately highlight numbers, therefore...
(package! highlight-numbers :commands highlight-numbers-mode)
(@package highlight-numbers :commands highlight-numbers-mode)
;; Line highlighting
(use-package! hl-line ; built-in
:config
(@use-package hl-line ; built-in
:init
;; stickiness doesn't play nice with emacs 25+
(setq hl-line-sticky-flag nil
global-hl-line-sticky-flag nil))
;; Line number column. A faster (or equivalent, in the worst case) line number
;; plugin than the built-in `linum'.
(package! nlinum
(@package nlinum
:commands nlinum-mode
:preface (defvar nlinum-format "%4d ")
:init
(add-hook!
(@add-hook
(markdown-mode prog-mode scss-mode web-mode conf-mode groovy-mode
nxml-mode snippet-mode php-mode)
'nlinum-mode)
:config
;; Optimization: calculate line number column width beforehand
(add-hook! nlinum-mode
(@add-hook nlinum-mode
(setq nlinum--width (length (save-excursion (goto-char (point-max))
(format-mode-line "%l")))))
;; Disable nlinum explicitly before making a frame, otherwise nlinum throws
;; linum face errors that prevent the frame from spawning.
(add-hook! '(before-make-frame-hook after-make-frame-functions)
(@add-hook '(before-make-frame-hook after-make-frame-functions)
(nlinum-mode -1)))
;; Helps us distinguish stacked delimiter pairs. Especially in parentheses-drunk
;; languages like Lisp.
(package! rainbow-delimiters
(@package rainbow-delimiters
:commands rainbow-delimiters-mode
:config (setq rainbow-delimiters-max-face-count 3)
:init
(add-hook! (emacs-lisp-mode lisp-mode js-mode css-mode c-mode-common)
(@add-hook (emacs-lisp-mode lisp-mode js-mode css-mode c-mode-common)
'rainbow-delimiters-mode))
(provide 'core-ui)