Function: hif-stringify

hif-stringify is a byte-compiled function defined in hideif.el.gz.

Signature

(hif-stringify A)

Documentation

Stringify a number, string or symbol.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/hideif.el.gz
(defun hif-stringify (a)
  "Stringify a number, string or symbol."
  (cond
   ((numberp a)
    (number-to-string a))
   ((stringp a)
    ;; Remove properties here otherwise a string like "0x12 + 0x34" will be
    ;; later evaluated as (0x12 + 0x34) and become 0x70.
    ;; See also `hif-eval' and `hif-mathify'.
    (concat (substring-no-properties a)
            (if (get-text-property 0 'hif-space a) " ")))
   ((atom a)
    (if (memq a hif-valid-token-list)
        (car (rassq a hif-token-alist))
      (if (eq a 'hif-space)
          " "
        (symbol-name a))))
   ((listp a)  ;; stringify each element then concat
    (cl-loop for e in a
             concat (hif-stringify e)))
   (t
    (error "Invalid token to stringify"))))