branch: externals/mct commit ef69e0689def8c730cb9efbe8318e85d43f4311a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@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.