- (overlay-put overlay 'face
- (if (and visible-mark-inhibit-trailing-overlay
- (save-excursion
- (goto-char pos)
- (eolp)))
- (nth i visible-mark-non-trailing-faces)
- (or (nth i visible-mark-faces) 'visible-mark-face)))
- (move-overlay overlay pos (1+ pos)))
+ (cond
+ ((and visible-mark-inhibit-trailing-overlay
+ (save-excursion (goto-char pos) (eolp)))
+ (overlay-put overlay 'face nil)
+ (if (visible-mark-find-overlay-at pos)
+ (progn (overlay-put overlay 'before-string nil)
+ (move-overlay overlay 0 0))
+ (overlay-put overlay 'before-string
+ (propertize
+ " "
+ 'face (or (nth i visible-mark-faces) 'visible-mark-face)
+ 'cursor 0))
+ (move-overlay overlay pos (1+ pos))))
+ (t
+ (overlay-put overlay 'before-string nil)
+ (overlay-put overlay 'face
+ (or (nth i visible-mark-faces) 'visible-mark-face))
+ (move-overlay overlay pos (1+ pos)))))