Am having problem writing coloured text with the following function. (defun cmesg (mesg colr bufr) "TODO." (let ( (bfr (get-buffer-create bufr)) (pms (propertize mesg 'face '(:foreground colr))) ) (with-current-buffer bfr (insert pms)) (display-buffer bfr)))
Heime <heimeborgia@protonmail.com> writes:
> Am having problem writing coloured text with the following function.
>
>
> (defun cmesg (mesg colr bufr)
> "TODO."
>
> (let ( (bfr (get-buffer-create bufr))
> (pms (propertize mesg
> 'face '(:foreground colr))) )
'(:foreground colr)
=>
`(:foreground ,colr)
> From: Bruno Barbier <brubar.cs@gmail.com>
> Date: Wed, 16 Nov 2022 10:37:00 +0100
>
> Heime <heimeborgia@protonmail.com> writes:
>
> > (defun cmesg (mesg colr bufr)
> > "TODO."
> >
> > (let ( (bfr (get-buffer-create bufr))
> > (pms (propertize mesg
> > 'face '(:foreground colr))) )
>
> '(:foreground colr)
>
> =>
>
> `(:foreground ,colr)
I think it is easier to understand this alternative:
(list :foreground colr)