mirror of https://codeberg.org/cage/tinmop/
- improved a bit rendering of text in message window.
This commit is contained in:
parent
121eaed346
commit
bb53d98f4c
|
@ -949,4 +949,7 @@ to the array"
|
|||
(defmacro with-profile-time (&body body)
|
||||
`(with-output-to-string (stream)
|
||||
(let ((*trace-output* stream))
|
||||
(time ,@body))))
|
||||
(time (progn ,@body)))))
|
||||
|
||||
(defmacro with-debug-print-profile-time ((&optional prefix) &body body)
|
||||
`(misc:dbg "~a ~a" ,prefix (with-profile-time ,@body)))
|
||||
|
|
|
@ -230,7 +230,8 @@
|
|||
:defun-w-lock
|
||||
:with-lock
|
||||
:get-url-content
|
||||
:with-profile-time))
|
||||
:with-profile-time
|
||||
:with-debug-print-profile-time))
|
||||
|
||||
(defpackage :box
|
||||
(:use
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
(color-name-p (keywordp color))
|
||||
(attributes (first (fourth parsed))))
|
||||
(list (first clean)
|
||||
(make-color-re-assign re
|
||||
(make-color-re-assign (cl-ppcre:create-scanner re)
|
||||
(and color-name-p color)
|
||||
(and (not color-name-p) color)
|
||||
attributes))))
|
||||
|
|
|
@ -295,10 +295,23 @@ latter has a length equals to `total-size'"))
|
|||
(bgcolor nil)
|
||||
(attributes nil)
|
||||
(return-as-list-p t))
|
||||
(colorize-line line
|
||||
(create-scanner regexp)
|
||||
:fgcolor fgcolor
|
||||
:bgcolor bgcolor
|
||||
:attributes attributes
|
||||
:return-as-list-p return-as-list-p))
|
||||
|
||||
(defmethod colorize-line ((line string) (regexp function)
|
||||
&key
|
||||
(fgcolor nil)
|
||||
(bgcolor nil)
|
||||
(attributes nil)
|
||||
(return-as-list-p t))
|
||||
(let ((res ())
|
||||
(scanner (create-scanner regexp)))
|
||||
(scanner regexp))
|
||||
(labels ((append-to-res (data)
|
||||
(setf res (append res (list data))))
|
||||
(setf res (reverse (push data res))))
|
||||
(re-split (data)
|
||||
(when (string-not-empty-p data)
|
||||
(multiple-value-bind (start-re end-re)
|
||||
|
|
Loading…
Reference in New Issue