Merge branch 'develop' of https://github.com/hlissner/doom-emacs into latexRefactor

This commit is contained in:
Patrick Elliott 2018-07-13 12:51:50 +02:00
commit 614c49f43f
9 changed files with 37 additions and 30 deletions

View file

@ -337,20 +337,16 @@ it exists."
(when (funcall fn doom-auto-accept)
(doom-reload-package-autoloads)))
(defun doom--server-reload-autoloads ()
(message "Reloading your current Emacs session\n")
(message "If this hangs, it is safe to abort the process here")
(server-eval-at
server-name
`(dolist (file '(,doom-autoload-file ,doom-package-autoload-file))
(load-file (byte-compile-dest-file file)))))
(defun doom--warn-refresh-session ()
(message "Detected a running Emacs session.\n")
(message "Use `M-x doom/reload' for changes to take effect."))
(defun doom--server-load (&rest files)
(defun doom--do-load (&rest files)
(if (and noninteractive (not (daemonp)))
(progn
(require 'server)
(when (server-running-p)
(add-hook 'kill-emacs-hook #'doom--server-reload-autoloads)))
(add-hook 'kill-emacs-hook #'doom--warn-refresh-session)))
(dolist (file files)
(load-file (byte-compile-dest-file file)))))
@ -592,7 +588,7 @@ modified."
(print! (green "✓ Clean up autoloads")))
;; Byte compile it to give the file a chance to reveal errors.
(doom--byte-compile-file doom-autoload-file)
(doom--server-load doom-autoload-file)
(doom--do-load doom-autoload-file)
t)))
@ -667,7 +663,7 @@ This should be run whenever your `doom!' block or update your packages."
(doom--cleanup-package-autoloads)
(print! (green "✓ Removed load-path/auto-mode-alist entries"))))
(doom--byte-compile-file doom-package-autoload-file)
(doom--server-load doom-package-autoload-file)
(doom--do-load doom-package-autoload-file)
t))

View file

@ -17,6 +17,7 @@ indentation settings or not. This should be set by editorconfig if it
successfully sets indent_style/indent_size.")
(setq-default
large-file-warning-threshold 30000000
vc-follow-symlinks t
;; Save clipboard contents into kill-ring before replacing them
save-interprogram-paste-before-kill t

View file

@ -215,7 +215,7 @@ immediately runs it on the current candidate (ending the ivy session)."
;; Used by `counsel-M-x'
(setq amx-save-file (concat doom-cache-dir "/smex-items"))
(setq amx-save-file (concat doom-cache-dir "amx-items"))
;;

View file

@ -1,13 +1,5 @@
;;; emacs/vc/config.el -*- lexical-binding: t; -*-
(defvar +vc-auto-hydra-smerge t
"When entering `smerge-mode' automatically open associated hydra.")
;;
;; Plugins
;;
;; `git-timemachine'
(after! git-timemachine
;; Sometimes I forget `git-timemachine' is enabled in a buffer, so instead of

View file

@ -395,13 +395,15 @@ with `org-cycle')."
(unless (eq this-command 'org-shifttab)
(save-excursion
(org-beginning-of-line)
(when (org-at-heading-p)
(when (or (not arg)
(outline-invisible-p (line-end-position)))
(outline-toggle-children)
(unless (outline-invisible-p (line-end-position))
(org-cycle-hide-drawers 'subtree))
t)))))
(when (and (org-at-heading-p)
(or org-cycle-open-archived-trees
(not (member org-archive-tag (org-get-tags))))
(or (not arg)
(outline-invisible-p (line-end-position))))
(outline-toggle-children)
(unless (outline-invisible-p (line-end-position))
(org-cycle-hide-drawers 'subtree))
t))))
;;;###autoload
(defun +org|remove-occur-highlights ()

View file

@ -41,6 +41,19 @@ load everything.")
(def-package! magit-blame :after git-timemachine)
(def-package! magit-todos
:after magit
:config
(setq magit-todos-require-colon nil)
;; `magit-todos-mode' defines keybinds on activation, so it's better to just
;; do this manually:
(magit-add-section-hook 'magit-status-sections-hook
#'magit-todos--insert-todos
'magit-insert-staged-changes
'append)
(define-key magit-todos-section-map "j" nil))
(def-package! magithub
:after magit
:preface

View file

@ -4,5 +4,6 @@
(when (package! magit)
(package! magit-gitflow)
(package! magithub)
(package! magit-todos)
(when (featurep! :feature evil +everywhere)
(package! evil-magit)))

View file

@ -24,7 +24,8 @@ modes, this function does nothing.
Otherwise it builds `prettify-code-symbols-alist' according to
`+pretty-code-symbols-alist' for the current major-mode."
(unless (or (eq major-mode 'fundamental-mode)
(derived-mode-p 'special-mode 'comint-mode 'eshell-mode 'term-mode))
(eq (get major-mode 'mode-class) 'special)
(derived-mode-p 'comint-mode 'eshell-mode 'term-mode))
(when (or (eq +pretty-code-enabled-modes t)
(if (eq (car +pretty-code-enabled-modes) 'not)
(not (memq major-mode (cdr +pretty-code-enabled-modes)))

View file

@ -48,8 +48,9 @@ to the right fringe.")
(ignore (git-gutter))))
(add-hook 'doom-escape-hook #'+version-control|update-git-gutter t)
;; update git-gutter when using these commands
(add-hook 'magit-post-refresh-hook #'+version-control|update-git-gutter)
;; update git-gutter when using magit commands
(advice-add #'magit-stage-file :after #'+version-control|update-git-gutter)
(advice-add #'magit-unstage-file :after #'+version-control|update-git-gutter)
;; subtle diff indicators in the fringe
(when +vc-gutter-default-style