Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
emacs -Q -L . -l dispwatch-test.el --batch -f ert-run-tests-batch-and-exit
1 change: 1 addition & 0 deletions dispwatch-test.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;;; dispwatch-test.el --- Unit tests -*- Lisp-Interaction-Mode; lexical-binding: t -*-

(require 'cl)
(require 'dispwatch)

(defun count-dispwatch-timers ()
(count-if (lambda (x)
Expand Down
11 changes: 5 additions & 6 deletions dispwatch.el
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ checked every `dispwatch-interval' seconds and if a change is
observed, the hook functions in `dispwatch-display-change-hooks'
with the new display resolution."

nil ;; The initial value.
"dispwatch" ;; The indicator for the mode line.
nil ;; The minor mode bindings.
:group 'dispwatch
:init-value nil ;; The initial value.
:lighter "dispwatch" ;; The indicator for the mode line.
:group 'dispwatch
:after-hook (if dispwatch-mode
(dispwatch--enable)
(dispwatch--disable)))
(dispwatch--enable)
(dispwatch--disable)))

(defun dispwatch--enable ()
"Enable display reconfiguration detection."
Expand Down