From 5ba7d017535b71c9e9908653d46280b0cf10df2a Mon Sep 17 00:00:00 2001 From: Compro Prasad Date: Sun, 1 Dec 2019 21:20:38 +0530 Subject: [PATCH] Replace if with when --- dashboard.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dashboard.el b/dashboard.el index d3fac59e..b55f0ea2 100644 --- a/dashboard.el +++ b/dashboard.el @@ -241,15 +241,14 @@ Optional prefix ARG says how many lines to move; default is one line." "Setup post initialization hooks. If a command line argument is provided, assume a filename and skip displaying Dashboard." - (if (< (length command-line-args) 2 ) - (progn - (add-hook 'after-init-hook (lambda () - ;; Display useful lists of items - (dashboard-insert-startupify-lists))) - (add-hook 'emacs-startup-hook '(lambda () - (switch-to-buffer "*dashboard*") - (goto-char (point-min)) - (redisplay)))))) + (when (< (length command-line-args) 2 ) + (add-hook 'after-init-hook (lambda () + ;; Display useful lists of items + (dashboard-insert-startupify-lists))) + (add-hook 'emacs-startup-hook '(lambda () + (switch-to-buffer "*dashboard*") + (goto-char (point-min)) + (redisplay))))) (provide 'dashboard) ;;; dashboard.el ends here