 
 (use-package ediff
   :config
-  (validate-setq ediff-window-setup-function #'ediff-setup-windows-plain)
-  (validate-setq ediff-split-window-function #'split-window-horizontally)
+  (csetq ediff-window-setup-function #'ediff-setup-windows-plain)
+  (csetq ediff-split-window-function #'split-window-horizontally)
+
+  ;; Automatically highlight first change.
+  (add-hook 'ediff-startup-hook 'ediff-next-difference)
+
   ;; Expand org files when ediffing.
   (add-hook 'ediff-prepare-buffer-hook
             (lambda ()
-              (eq major-mode 'org-mode)
-              (visible-mode 1)  ; default 0
-              (validate-setq truncate-lines nil)  ; no `org-startup-truncated' in hook
-              (validate-setq org-hide-leading-stars t))))
+              (when (eq major-mode 'org-mode)
+                (visible-mode 1)  ; default 0
+                (setq-local truncate-lines nil)  ; no `org-startup-truncated' in hook
+                (setq-local org-hide-leading-stars t)))))
 
 ;; ediff-revision cleanup.
 ;; From http://www.emacswiki.org/emacs/DavidBoon#toc8

(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(when (fboundp 'toggle-scroll-bar) (toggle-scroll-bar -1))

;; Get rid of splash screens.
;; From http://www.emacswiki.org/emacs/EmacsNiftyTricks

        (shell-pop-out)
      (shell-pop-up shell-pop-last-shell-buffer-index)))

  (csetq shell-pop-window-position "full")
  (csetq shell-pop-shell-type '("eshell" "*eshell*" (lambda () (eshell shell-pop-term-shell))))

  (validate-setq shell-pop-shell-type '("eshell" "*eshell*" (lambda () (eshell))))

