Add magit filenotify.
This commit is contained in:
parent
4aabb24e18
commit
5c0e93488b
15
init.el
15
init.el
@ -193,6 +193,11 @@
|
|||||||
:ensure t
|
:ensure t
|
||||||
:commands magit-status
|
:commands magit-status
|
||||||
:bind (("C-x g" . magit-status))
|
:bind (("C-x g" . magit-status))
|
||||||
|
:init
|
||||||
|
(progn
|
||||||
|
(if (emacs24_4-p)
|
||||||
|
(use-package magit-filenotify :ensure t)
|
||||||
|
(add-hook 'magit-status-mode-hook 'magit-filenotify-mode)))
|
||||||
:config
|
:config
|
||||||
(diminish 'magit-auto-revert-mode))
|
(diminish 'magit-auto-revert-mode))
|
||||||
|
|
||||||
@ -489,6 +494,11 @@
|
|||||||
;; functions
|
;; functions
|
||||||
;; =============================================================================
|
;; =============================================================================
|
||||||
|
|
||||||
|
(defun emacs24_4-p ()
|
||||||
|
(or (and (>= emacs-major-version 24)
|
||||||
|
(>= emacs-minor-version 4))
|
||||||
|
(>= emacs-major-version 25)))
|
||||||
|
|
||||||
(defun sudo-edit (&optional arg)
|
(defun sudo-edit (&optional arg)
|
||||||
"Edit currently visited file as root.
|
"Edit currently visited file as root.
|
||||||
|
|
||||||
@ -678,10 +688,7 @@ buffer is not visiting a file."
|
|||||||
(set-my-font-for-frame nil)
|
(set-my-font-for-frame nil)
|
||||||
(setq hl-line-mode nil))
|
(setq hl-line-mode nil))
|
||||||
|
|
||||||
(if (or
|
(if (emacs24_4-p)
|
||||||
(and (>= emacs-major-version 24)
|
|
||||||
(>= emacs-minor-version 4))
|
|
||||||
(>= emacs-major-version 25))
|
|
||||||
(advice-add 'load-theme :after #'remove-fringe-and-hl-line-mode)
|
(advice-add 'load-theme :after #'remove-fringe-and-hl-line-mode)
|
||||||
(defadvice load-theme (after name activate)
|
(defadvice load-theme (after name activate)
|
||||||
(remove-fringe-and-hl-line-mode)))
|
(remove-fringe-and-hl-line-mode)))
|
||||||
|
Loading…
Reference in New Issue
Block a user