Add expand-region support.
--- a/contrib/gadict.el Mon Mar 21 23:52:51 2016 +0200
+++ b/contrib/gadict.el Mon Mar 21 23:53:15 2016 +0200
@@ -52,6 +52,20 @@
(defun gadict-setup-syntax ()
(modify-syntax-entry ?' "w"))
+(defun gadict-mark-article ()
+ (end-of-line)
+ (re-search-backward "^__$")
+ (set-mark (point))
+ (forward-line)
+ (if (re-search-forward "^__$" nil t)
+ (forward-line 0)
+ (goto-char (point-max)))
+ (exchange-point-and-mark))
+
+(defun gadict-setup-expansions ()
+ "Adds gadict-mode specific expansions."
+ (set (make-local-variable 'er/try-expand-list) (list #'gadict-mark-article)))
+
(eval-when-compile
(defvar font-lock-beg)
(defvar font-lock-end))
@@ -110,7 +124,8 @@
(gadict-setup-syntax)
(gadict-setup-paragraph)
(gadict-setup-page)
- (gadict-setup-comment) )
+ (gadict-setup-comment)
+ (gadict-setup-expansions) )
(provide 'gadict)