- (when lmc-store-flash
- (lmc--with-silent-modifications
- (put-text-property (match-beginning 1) (point)
- 'face 'region))
- (sit-for 0.2))
- (replace-match (format " %03d" word) t t nil 1)
- (when lmc-store-flash
- (sit-for 0.1)
- (lmc--with-silent-modifications
- (put-text-property (match-beginning 1) (point)
- 'face 'region))
- (sit-for 0.1)
- (lmc--with-silent-modifications
- (put-text-property (match-beginning 1) (point)
- 'face nil))
- (sit-for 0.1)))))
+ (let ((mb1 (match-beginning 1)))
+ (when lmc-store-flash
+ (lmc--with-silent-modifications
+ (put-text-property mb1 (point) 'face 'region))
+ (lmc--sit-for 0.2))
+ (let ((me1 (point)))
+ (insert (format " %03d" word)) (delete-region mb1 me1))
+ (when lmc-store-flash
+ (lmc--sit-for 0.1)
+ (lmc--with-silent-modifications
+ (put-text-property mb1 (point) 'face 'region))
+ (lmc--sit-for 0.1)
+ (lmc--with-silent-modifications
+ (put-text-property mb1 (point) 'face nil))
+ (lmc--sit-for 0.1))))))