Function: majutsu-completion-column
majutsu-completion-column is a natively compiled function defined in
majutsu-completion.el.
Signature
(majutsu-completion-column TEXT WIDTH &optional FACE)
Documentation
Return TEXT as a fixed-width annotation column.
WIDTH is the target display width and FACE is applied to the whole column.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-completion.el
(defun majutsu-completion-column (text width &optional face)
"Return TEXT as a fixed-width annotation column.
WIDTH is the target display width and FACE is applied to the whole column."
(let* ((raw (format "%s" (or text "")))
(truncated (truncate-string-to-width raw width 0 ?\s "…"))
(padding (max 0 (- width (string-width truncated))))
(value (concat truncated (make-string padding ?\s))))
(if face
(propertize value 'face face)
value)))