Elisp defun, . , , Linux VT. , ( "", "" ..) , - , , . , .
;;;; insert colored and/or bright text
(defun insert-colored-text (str clr bright)
"Inserts str at point, in color clr, bright or not."
(interactive (list (read-string " String: ")
(read-string " Color: ")
(y-or-n-p " Bright? ") ))
(insert (propertize str 'font-lock-face
`(:weight ,(if bright 'bold 'normal) :foreground ,clr) )))
(defalias 'ict 'insert-colored-text)
(defun test-all-faces ()
"Prints a test string in al colors, both normal and bright."
(interactive)
(let ((str "This is what it looks like"))
(dolist (bold '(nil t) nil)
(dolist (color
'("black" "red" "green" "yellow" "blue"
"magenta" "cyan" "white") nil)
(insert-colored-text
(format "%s in %s (that is %sbold)\n" str color
(if bold "" "not ")) color bold) ))))
(defalias 'taf 'test-all-faces)
http://user.it.uu.se/~embe8573/cols.png