summaryrefslogtreecommitdiff
path: root/dashboard.el
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard.el')
-rw-r--r--dashboard.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/dashboard.el b/dashboard.el
index eab022e..624210b 100644
--- a/dashboard.el
+++ b/dashboard.el
@@ -26,15 +26,19 @@
"A clumsy text representation of a cute cat.")
;;;###autoload
-(defun dashboard ()
- "Create the dashboard buffer."
+(defun dashboard (&optional force)
+ "Create the dashboard buffer.
+If FORCE is non-nil, re-gerenate the dashboard buffer."
(interactive)
(let ((dashboard-exists-p (get-buffer dashboard-buffer-name))
- (dashboard (get-buffer-create dashboard-buffer-name)))
+ (dashboard (get-buffer-create dashboard-buffer-name))
+ (inhibit-read-only t))
(cond
- (dashboard-exists-p (switch-to-buffer dashboard))
+ ((and (not force) dashboard-exists-p)
+ (switch-to-buffer dashboard))
(t
(with-current-buffer dashboard
+ (erase-buffer)
(cond
((display-graphic-p)
(let ((image (create-image (expand-file-name "cat.png" user-emacs-directory))))