Function: ses--align

ses--align is a byte-compiled function defined in ses.el.gz.

Signature

(ses--align VALUE ALIGN-FN SPAN FILL PRINTER)

Documentation

Helper fonction for Keymap ses-center is not currently defined. and Keymap ses-left is not currently defined.. Please refer to these functions help.

ALIGN-FN shall be a function to concatenate the padding, it shall have parameters (VALUE WIDTH FILL) with: VALUE a string already formatted by PRINTER to which padding is to be concatenated. WIDTH the additional width to be padded if >0, <= 0 if no padding is to be added. FILL the fill character to be padded.

Source Code

;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defun ses--align (value align-fn span fill printer)
  "Helper fonction for \\{ses-center} and \\{ses-left}. Please refer to these functions help.
ALIGN-FN shall be a function to concatenate the padding, it shall have
parameters (VALUE WIDTH FILL) with:
VALUE a string already formatted by PRINTER to which padding is to be
concatenated.
WIDTH the additional width to be padded if >0, <= 0 if no padding is to
be added.
FILL the fill character to be padded."
  (setq printer (or printer  (ses-col-printer ses--col) ses--default-printer))
  (let ((width   (ses-col-width ses--col)))
    (or span (setq span 0))
    (setq value (ses-call-printer printer value))
    (dotimes (x span)
      (setq width (+ width 1 (ses-col-width (+ ses--col span (- x))))))
    ;; Set column width.
    (setq width (- width (string-width value)))
    (funcall align-fn value width fill)))