                      `(function ,fn)
                    `(lambda (&rest _) ,@args)))
         (dolist (hook hooks)
-          (push (cond ((eq hook-fn 'remove-hook)
-                       `(remove-hook ',hook ,fn ,local-p))
-                      (t
-                       `(add-hook ',hook ,fn ,append-p ,local-p)))
+          (push (if (eq hook-fn 'remove-hook)
+                    `(remove-hook ',hook ,fn ,local-p)
+                  `(add-hook ',hook ,fn ,append-p ,local-p))
                 forms)))
       `(progn ,@(nreverse forms)))))
 

       (cl-pushnew ',(cons keyword fn) doom-settings :test #'eq :key #'car))))

(defmacro set! (keyword &rest values)
  "Set an option defined by `def-setting!'. Skip if doesn't exist."
  (declare (indent defun))
  (unless values
    (error "Empty set! for %s" keyword))

  (if (listp exp) exp (list exp)))

(defun doom-resolve-vim-path (file-name)
  "Take a path and resolve any vim-like filename modifiers in it. On top of the
classical vim modifiers, this adds support for:

  %:P   Resolves to `doom-project-root'.

