[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 3e43f1fd90 04/20: transient--pixel-width: Mov
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 3e43f1fd90 04/20: transient--pixel-width: Move definition |
Date: |
Tue, 24 Oct 2023 13:42:15 -0400 (EDT) |
branch: externals/transient
commit 3e43f1fd90c2c4d2e752481f3955d3699b6f65a7
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--pixel-width: Move definition
---
lisp/transient.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 4f04cb958f..e771e7e7ce 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3416,15 +3416,6 @@ have a history of their own.")
(when (= c (1- cs))
(insert ?\n))))))))
-(defun transient--pixel-width (string)
- (save-window-excursion
- (with-temp-buffer
- (insert string)
- (set-window-dedicated-p nil nil)
- (set-window-buffer nil (current-buffer))
- (car (window-text-pixel-size
- nil (line-beginning-position) (point))))))
-
(cl-defmethod transient--insert-group ((group transient-subgroups))
(let* ((subgroups (oref group suffixes))
(n (length subgroups)))
@@ -3674,6 +3665,15 @@ If the OBJ's `key' is currently unreachable, then apply
the face
(oset suffix key
(truncate-string-to-width (oref suffix key) width nil ?\s))))))
+(defun transient--pixel-width (string)
+ (save-window-excursion
+ (with-temp-buffer
+ (insert string)
+ (set-window-dedicated-p nil nil)
+ (set-window-buffer nil (current-buffer))
+ (car (window-text-pixel-size
+ nil (line-beginning-position) (point))))))
+
(defun transient-command-summary-or-name (obj)
"Return the summary or name of the command represented by OBJ.
- [elpa] externals/transient updated (04f87b4ab3 -> 4f67a033fd), Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 3e43f1fd90 04/20: transient--pixel-width: Move definition,
Jonas Bernoulli <=
- [elpa] externals/transient c2a75880ae 14/20: transient-suffix: Add FACE slot, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 8b988fc4bd 03/20: Use the other variant of the and-let* kludge, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient dd7ed3869b 01/20: Indent code blocks in docstrings consistently, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a19c0bda1d 05/20: transient--window: Tweak docstring, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a80307c7ce 06/20: transient--current-buffer: New variable, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient fb191f8cf3 08/20: Optionally refresh suffixes and keymaps after every command, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a81eff942b 11/20: transient-font-lock-keywords: Remove transient-define-groups, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 49a61fb905 13/20: Support setting per-suffix level for duplicated commands, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 2776dbc07c 16/20: transient--flatten-suffixes: Cosmetics, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient aee5f23447 09/20: Improve docstrings, Jonas Bernoulli, 2023/10/24