Make possible selection of whole line after word for expand-region.
--- a/contrib/gadict.el Wed Oct 25 20:44:41 2017 +0300
+++ b/contrib/gadict.el Wed Oct 25 21:52:16 2017 +0300
@@ -184,9 +184,10 @@
(set (make-local-variable 'comment-use-syntax) nil) )
(defun gadict-setup-paragraph ()
- "Setup gadict paragraph definition."
+ "Setup gadict sentence/paragraph definition."
(set (make-local-variable 'paragraph-separate) "__$")
- (set (make-local-variable 'paragraph-start) "__$") )
+ (set (make-local-variable 'paragraph-start) "__$")
+ (set (make-local-variable 'sentence-end) "\n"))
(defun gadict-setup-page ()
"Setup gadict page definition."
@@ -219,7 +220,7 @@
(defvar er/try-expand-list)
(defun gadict-setup-expansions ()
"Add `gadict-mode' specific expansions."
- (set (make-local-variable 'er/try-expand-list) (list #'er/mark-word #'gadict-mark-article)))
+ (set (make-local-variable 'er/try-expand-list) (list #'er/mark-word #'er/mark-text-sentence #'gadict-mark-article)))
(defvar font-lock-beg)
(defvar font-lock-end)
@@ -236,8 +237,7 @@
(setq font-lock-beg (point))
(goto-char font-lock-end)
(forward-line 3)
- (setq font-lock-end (point))
- )
+ (setq font-lock-end (point)))
t)
(t nil) ))