 ;; simple name in frame title
 (setq frame-title-format '("%b – Doom Emacs"))
 ;; relegate tooltips to echo area only
-(tooltip-mode -1)
+(if (boundp 'tooltip-mode) (tooltip-mode -1))
 ;; a good indicator that Emacs isn't frozen
 (add-hook 'doom-init-ui-hook #'blink-cursor-mode)
 ;; Make `next-buffer', `other-buffer', etc. ignore unreal buffers.

;;
;; Built-in packages

;; show typed keystrokes in minibuffer
(defun doom|enable-ui-keystrokes ()  (setq echo-keystrokes 0.02))
(defun doom|disable-ui-keystrokes () (setq echo-keystrokes 0))

  (add-to-list 'kill-buffer-query-functions #'doom|protect-fallback-buffer nil #'eq)
  (add-to-list 'kill-buffer-query-functions #'doom|protect-visible-buffer  nil #'eq)
  (add-hook 'after-change-major-mode-hook #'doom|highlight-non-default-indentation)
  (run-hook-wrapped 'doom-init-ui-hook #'doom-try-run-hook))

(add-hook 'emacs-startup-hook #'doom|init-ui)
