Function: strokes-xpm-for-compressed-string

strokes-xpm-for-compressed-string is a byte-compiled function defined in strokes.el.gz.

Signature

(strokes-xpm-for-compressed-string COMPRESSED-STRING &optional BUFNAME)

Documentation

Convert the stroke represented by COMPRESSED-STRING into an XPM.

Store XPM in buffer BUFNAME if supplied (default is " *strokes-xpm*")

Source Code

;; Defined in /usr/src/emacs/lisp/strokes.el.gz
(defun strokes-xpm-for-compressed-string (compressed-string &optional bufname)
  "Convert the stroke represented by COMPRESSED-STRING into an XPM.
Store XPM in buffer BUFNAME if supplied (default is \" *strokes-xpm*\")"
  (or bufname (setq bufname " *strokes-xpm*"))
  (with-current-buffer (get-buffer-create bufname)
    (erase-buffer)
    (insert compressed-string)
    (goto-char (point-min))
    (let ((current-char-is-on-p nil))
      (while (not (eobp))
	(insert-char
	 (if current-char-is-on-p
	     ?*
	   ?\s)
	 (strokes-xpm-decode-char (char-after)))
	(delete-char 1)
	(setq current-char-is-on-p (not current-char-is-on-p)))
      (goto-char (point-min))
      (cl-loop repeat 33 do
               (insert ?\")
               (forward-char 33)
               (insert "\",\n"))
      (goto-char (point-min))
      (insert strokes-xpm-header))))