aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sx.el8
1 files 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))