Next: , Previous: , Up: Advanced customization   [Index]

7.6 DIY Do not extend the region background

By default, the background of the region face extends from the end of the line to the edge of the window. To limit it to the end of the line, we need to override the face’s ‘:extend’ attribute. Adding this to the Emacs configuration file will suffice:

;; Do not extend `region' background past the end of the line.
(custom-set-faces
 '(region ((t :extend nil))))

Make the region preserve text colors, plus other styles.