From dc98b2bd2a7b805e5d3c8a410bcaf137cd4cf78a Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 7 Jan 2015 15:54:53 -0200 Subject: sx-format-replacements: Fix propertizing --- sx.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sx.el b/sx.el index 4159933..d67771b 100644 --- a/sx.el +++ b/sx.el @@ -364,10 +364,10 @@ if ALIST contains a different string at the ?% entry." (unless val (error "Invalid format character: `%%%c'" char)) ;; Insert first, to preserve text properties. - (insert-and-inherit - (apply #'propertize - (format (concat "%" flag "s") val) - (cdr-safe (assq char property-alist)))) + (insert-and-inherit (format (concat "%" flag "s") val)) + (when property-alist + (add-text-properties (match-end 0) (point) + (cdr-safe (assq char property-alist)))) ;; Delete the specifier body. (delete-region (match-beginning 0) (match-end 0)) -- cgit v1.2.3