From: Jimmy Aguilar Mena Date: Sun, 15 Nov 2020 05:42:22 +0000 (+0100) Subject: Simplify numeric argument X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=644d5e5ffc970a89f7daf0932994cd307ab209e5;p=emacs.git Simplify numeric argument * lisp/completions-highlight.el (completions-highlight-this-completion) : Use prefix-numeric-value instead of manually check. --- diff --git a/lisp/completions-highlight.el b/lisp/completions-highlight.el index f0da382c4cb..440ee3b9ead 100644 --- a/lisp/completions-highlight.el +++ b/lisp/completions-highlight.el @@ -50,14 +50,13 @@ "Saves the Completions current-localmap to restore it disabling the mode.") ;; *Completions* side commands - (defun completions-highlight-this-completion (&optional n) "Highlight the completion under point or near. N is set to 1 if not specified." - (setq n (or (and n (/ n (abs n))) - 1)) - (next-completion n) - (completions-highlight-next-completion (* -1 n))) + (setq n (prefix-numeric-value n)) + (let ((sign (/ n (abs n)))) + (next-completion sign) + (completions-highlight-next-completion (* -1 sign)))) (defun completions-highlight-next-completion (n) "Move to and highlight the next item in the completion list.