Disable er in org/rst-mode. Expand to line with \n by default.
--- a/.emacs-my Tue Oct 31 10:58:29 2017 +0200
+++ b/.emacs-my Tue Nov 07 22:00:04 2017 +0200
@@ -892,9 +892,20 @@
(setq x-select-enable-clipboard t))
(when (fboundp 'er/expand-region)
- (global-set-key (kbd "C-=") 'er/expand-region))
-
-(setq-default er/try-expand-list '(er/mark-word er/mark-symbol er/mark-inside-quotes er/mark-outside-quotes er/mark-inside-pairs er/mark-outside-pairs))
+ (global-set-key (kbd "s-=") 'er/expand-region))
+
+(defun my-mark-line ()
+ "Mark current line."
+ (forward-line 0)
+ (set-mark (point))
+ (forward-line 1)
+ (exchange-point-and-mark))
+
+(setq-default er/try-expand-list '(er/mark-word er/mark-symbol er/mark-inside-quotes er/mark-outside-quotes er/mark-inside-pairs er/mark-outside-pairs my-mark-line))
+
+(my--eval-after-load text-mode-expansions
+ (add-to-list 'expand-region-exclude-text-mode-expansions 'org-mode)
+ (add-to-list 'expand-region-exclude-text-mode-expansions 'rst-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "highlighting current line")