Function: which-key--width-or-percentage-to-width

which-key--width-or-percentage-to-width is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--width-or-percentage-to-width WIDTH-OR-PERCENTAGE)

Documentation

Return window total width.

If WIDTH-OR-PERCENTAGE is a whole number, return it unchanged. Otherwise, it should be a percentage (a number between 0 and 1) out of the frame's width. More precisely, it should be a percentage out of the frame's root window's total width.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--width-or-percentage-to-width (width-or-percentage)
  "Return window total width.
If WIDTH-OR-PERCENTAGE is a whole number, return it unchanged.  Otherwise, it
should be a percentage (a number between 0 and 1) out of the frame's width.
More precisely, it should be a percentage out of the frame's root window's
total width."
  (if (natnump width-or-percentage)
      width-or-percentage
    (round (* width-or-percentage (window-total-width (frame-root-window))))))