Skip to content

Instantly share code, notes, and snippets.

@c02y
Created March 26, 2019 14:05
Show Gist options
  • Save c02y/2845a69db01184c5932ba79cc0816abc to your computer and use it in GitHub Desktop.
Save c02y/2845a69db01184c5932ba79cc0816abc to your computer and use it in GitHub Desktop.
highlight-changes tweak
(if (daemonp)
;; for emacs --deamon, highlight-change doesn't work with daemon
(add-hook 'after-make-frame-functions
(lambda (frame)
(select-frame frame)
(bind-keys*
("C-h C-b" . diff-buffer-with-file)
("C-h C-v" . highlight-changes-visible-mode)
("M-<f1>" . highlight-changes-previous-change)
("M-<f2>" . highlight-changes-next-change))
(global-highlight-changes-mode t)
;; initial invisible, use C-h C-v to toggle the highlight of changes
(setq highlight-changes-visibility-initial-state nil)))
(bind-keys*
("C-h C-b" . diff-buffer-with-file)
("C-h C-v" . highlight-changes-visible-mode)
("M-<f1>" . highlight-changes-previous-change)
("M-<f2>" . highlight-changes-next-change))
(global-highlight-changes-mode t)
;; initial invisible, use C-h C-v to toggle the highlight of changes
(setq highlight-changes-visibility-initial-state nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment