]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.el
emacs: Use 'unless' instead of 'when' and 'not'
[notmuch] / test / test-lib.el
index aae9e8333f5f7558b4116b83c5263774a5769782..a12333900801736843d6032db91f071647a0b056 100644 (file)
@@ -81,7 +81,7 @@ invisible text."
   (let (str)
     (while (< start end)
       (let ((next-pos (next-char-property-change start end)))
-       (when (not (invisible-p start))
+       (unless (invisible-p start)
          (setq str (concat str (buffer-substring-no-properties
                                 start next-pos))))
        (setq start next-pos)))
@@ -97,8 +97,8 @@ invisible text."
 (defun orphan-watchdog-check (pid)
   "Periodically check that the process with id PID is still
 running, quit if it terminated."
-  (if (not (test-process-running pid))
-      (kill-emacs)))
+  (unless (test-process-running pid)
+    (kill-emacs)))
 
 (defun orphan-watchdog (pid)
   "Initiate orphan watchdog check."