[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key b3974a28f3 1/2: Remove old backport version o
From: |
ELPA Syncer |
Subject: |
[elpa] externals/which-key b3974a28f3 1/2: Remove old backport version of universal-argument--description |
Date: |
Wed, 1 May 2024 09:59:44 -0400 (EDT) |
branch: externals/which-key
commit b3974a28f39f535fae7a4fae14255a34a52569e8
Author: Jeremy Bryant <jb@jeremybryant.net>
Commit: Justin Burkett <justin@burkett.cc>
Remove old backport version of universal-argument--description
In preparation for the move to Emacs core, this is no longer needed.
Furthermore, the backport was of emacs25 on 2015-12-04 so is unlikely
to affect most current installations in the meantime.
* which-key.el: Remove old backport of 2025-12-04.
(which-key--full-prefix): Use built-in universal-argument--description.
---
which-key.el | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/which-key.el b/which-key.el
index 0e14c76df9..0d44a61020 100644
--- a/which-key.el
+++ b/which-key.el
@@ -2194,32 +2194,13 @@ Actual lines: %s"
(which-key--propertize (format "[%s paging/help]" key)
'face 'which-key-note-face))))
-(eval-and-compile
- (if (fboundp 'universal-argument--description)
- (defalias 'which-key--universal-argument--description
- #'universal-argument--description)
- (defun which-key--universal-argument--description ()
- ;; Backport of the definition of universal-argument--description in
- ;; emacs25 on 2015-12-04
- (when prefix-arg
- (concat "C-u"
- (pcase prefix-arg
- (`(-) " -")
- (`(,(and (pred integerp) n))
- (let ((str ""))
- (while (and (> n 4) (= (mod n 4) 0))
- (setq str (concat str " C-u"))
- (setq n (/ n 4)))
- (if (= n 4) str (format " %s" prefix-arg))))
- (_ (format " %s" prefix-arg))))))))
-
(defun which-key--full-prefix (prefix-keys &optional -prefix-arg
dont-prop-keys)
"Return a description of the full key sequence up to now.
Include prefix arguments."
(let* ((left (eq which-key-show-prefix 'left))
(prefix-arg (if -prefix-arg -prefix-arg prefix-arg))
(str (concat
- (which-key--universal-argument--description)
+ (universal-argument--description)
(when prefix-arg " ")
prefix-keys))
(dash (if (and (not (string= prefix-keys ""))