diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-07 15:54:53 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-07 15:54:53 -0200 |
commit | dc98b2bd2a7b805e5d3c8a410bcaf137cd4cf78a (patch) | |
tree | 0e7e7a411024bd69ee9f1e7233c6d68f02f10094 | |
parent | c46dd1cde6d8428a73be0f2e6918b701af541004 (diff) |
sx-format-replacements: Fix propertizing
-rw-r--r-- | sx.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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)) |