Function: which-key--normalize-columns

which-key--normalize-columns is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--normalize-columns COLUMNS)

Documentation

Pad COLUMNS to the same length using empty strings.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
;;; Functions for laying out which-key buffer pages

(defun which-key--normalize-columns (columns)
  "Pad COLUMNS to the same length using empty strings."
  (let ((max-len (cl-reduce (lambda (a x) (max a (length x))) columns
                            :initial-value 0)))
    (mapcar
     (lambda (c)
       (if (< (length c) max-len)
           (append c (make-list (- max-len (length c)) ""))
         c))
     columns)))