[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct ef69e0689d 2/3: Simplify a function
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct ef69e0689d 2/3: Simplify a function |
Date: |
Thu, 20 Jan 2022 14:57:48 -0500 (EST) |
branch: externals/mct
commit ef69e0689def8c730cb9efbe8318e85d43f4311a
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Simplify a function
The use of 'abs' is from commit 9fa6f8c.
---
mct.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/mct.el b/mct.el
index a1aac0dd82..80449227fb 100644
--- a/mct.el
+++ b/mct.el
@@ -690,12 +690,10 @@ This performs a regular motion for optional ARG
candidates, but
when point can no longer move in that direction it switches to
the minibuffer."
(interactive "p" mct-minibuffer-mode)
- (let ((count (if (natnump arg) arg 1)))
- (cond
- ((mct--top-of-completions-p count)
- (mct-focus-minibuffer))
- (t
- (mct--previous-completion count)))))
+ (let ((count (or (abs arg) 1)))
+ (if (mct--top-of-completions-p count)
+ (mct-focus-minibuffer)
+ (mct--previous-completion count))))
(defun mct-next-completion-group (&optional arg)
"Move to the next completion group.