+ (cl--set-buffer-substring
+ begin end
+ (concat
+ type ":" keys
+ ;; It seems the space at the end can get consumed, so we see if there
+ ;; is a space, and add it if so. Sometimes there is a comma or period,
+ ;; then we do not want a space.
+ (when
+ (save-excursion
+ (goto-char end)
+ (looking-back " ")) " ")))