From 2cc501d1ea1f8ab5617397cdc61b1ce760758df2 Mon Sep 17 00:00:00 2001 From: Rudi Schlatte Date: Sun, 17 Mar 2019 17:28:19 +0100 Subject: [PATCH 1/2] Fix error in `dashboard-next-section` - move function body out of `(interactive)` form --- dashboard.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard.el b/dashboard.el index cae7107b..3223232b 100644 --- a/dashboard.el +++ b/dashboard.el @@ -91,8 +91,8 @@ (defun dashboard-next-section () "Navigate forward to next section." - (interactive - (let ((current-position (point)) + (interactive) + (let ((current-position (point)) (next-section-start nil) (section-starts (reverse dashboard--section-starts))) (dolist (elt section-starts) @@ -100,7 +100,7 @@ (> elt current-position)) (setq next-section-start elt))) (when next-section-start - (goto-char next-section-start))))) + (goto-char next-section-start)))) (defun dashboard-maximum-section-length () "For the just-inserted section, calculate the length of the longest line." From 71f6eb5befb3cda157b64332f9b486954e500ebb Mon Sep 17 00:00:00 2001 From: Rudi Schlatte Date: Sun, 17 Mar 2019 17:35:24 +0100 Subject: [PATCH 2/2] fix indentation for previous commit --- dashboard.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dashboard.el b/dashboard.el index 3223232b..9e6ea2d0 100644 --- a/dashboard.el +++ b/dashboard.el @@ -93,14 +93,14 @@ "Navigate forward to next section." (interactive) (let ((current-position (point)) - (next-section-start nil) - (section-starts (reverse dashboard--section-starts))) - (dolist (elt section-starts) - (when (and (not next-section-start) - (> elt current-position)) - (setq next-section-start elt))) - (when next-section-start - (goto-char next-section-start)))) + (next-section-start nil) + (section-starts (reverse dashboard--section-starts))) + (dolist (elt section-starts) + (when (and (not next-section-start) + (> elt current-position)) + (setq next-section-start elt))) + (when next-section-start + (goto-char next-section-start)))) (defun dashboard-maximum-section-length () "For the just-inserted section, calculate the length of the longest line."