fix bug
This commit is contained in:
parent
d81bf6de18
commit
f28c9ba7b3
11
tp.el
11
tp.el
@ -1875,7 +1875,7 @@ Returns: For buffers, nil. For entire string forms, a new string."
|
|||||||
;; (tp-remove str 'face 'help-echo ...) - multiple properties
|
;; (tp-remove str 'face 'help-echo ...) - multiple properties
|
||||||
((symbolp end-or-prop)
|
((symbolp end-or-prop)
|
||||||
(let ((props-to-remove (cl-remove-if-not #'symbolp
|
(let ((props-to-remove (cl-remove-if-not #'symbolp
|
||||||
(list* end-or-prop prop-or-sub rest))))
|
(list end-or-prop prop-or-sub rest))))
|
||||||
(tp--remove-props-from-string str start end props-to-remove)))
|
(tp--remove-props-from-string str start end props-to-remove)))
|
||||||
;; (tp-remove str '(face :underline)) - nested property spec
|
;; (tp-remove str '(face :underline)) - nested property spec
|
||||||
((listp end-or-prop)
|
((listp end-or-prop)
|
||||||
@ -2111,7 +2111,9 @@ For buffers, modifies in-place and returns list of regions."
|
|||||||
(let ((result object))
|
(let ((result object))
|
||||||
(dolist (match (nreverse matches))
|
(dolist (match (nreverse matches))
|
||||||
(when properties
|
(when properties
|
||||||
(setq result (funcall apply-fn (car match) (cdr match) properties result))))
|
(setq result (funcall apply-fn
|
||||||
|
(car match) (cdr match)
|
||||||
|
properties result))))
|
||||||
result)))
|
result)))
|
||||||
;; Buffer or nil (current buffer)
|
;; Buffer or nil (current buffer)
|
||||||
(t
|
(t
|
||||||
@ -2126,7 +2128,7 @@ For buffers, modifies in-place and returns list of regions."
|
|||||||
(when properties
|
(when properties
|
||||||
(funcall apply-fn beg end properties buf))
|
(funcall apply-fn beg end properties buf))
|
||||||
(push (cons beg end) regions)))
|
(push (cons beg end) regions)))
|
||||||
(nreverse regions)))))))))
|
(nreverse regions))))))))
|
||||||
|
|
||||||
(defun tp--regexp-apply (pattern properties apply-fn &optional object)
|
(defun tp--regexp-apply (pattern properties apply-fn &optional object)
|
||||||
"Internal function to apply APPLY-FN to regexp matches of PATTERN.
|
"Internal function to apply APPLY-FN to regexp matches of PATTERN.
|
||||||
@ -4625,6 +4627,9 @@ e.g.3 (tp-parse-color '(:light \"red\" :dark \"green\"))"
|
|||||||
(define-tp tp-underline (color)
|
(define-tp tp-underline (color)
|
||||||
`(face (:underline (:color ,color))))
|
`(face (:underline (:color ,color))))
|
||||||
|
|
||||||
|
(define-tp tp-delete (color)
|
||||||
|
`(face (:strike-through ,color)))
|
||||||
|
|
||||||
(define-tp tp-link ()
|
(define-tp tp-link ()
|
||||||
(let ((color (tp-palette-fg-color 'info)))
|
(let ((color (tp-palette-fg-color 'info)))
|
||||||
`( tp-underline ,color
|
`( tp-underline ,color
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user