--- a/autobm.el Tue Dec 10 18:04:16 2019 +0200
+++ b/autobm.el Tue Dec 10 18:05:28 2019 +0200
@@ -8,7 +8,7 @@
(defvar autobm-mode-handlers
'((emacs-lisp-mode . (autobm-try-semantic))
(semantic-decoration-mode . (autobm-try-semantic))
- (rst-mode . (autobm-try-thingatpt))
+ (rst-mode . (autobm-try-word))
(t . (autobm-try-which-func autobm-try-thingatpt)))
"Alist of handlers by mode. Key is a mojor or minor mode name, or `t' as fallback.
Value is a no-argument function or a list of such functions,
@@ -23,6 +23,9 @@
(defun autobm-try-thingatpt ()
(cl-some #'thing-at-point autobm-try-thingatpt-things))
+(defun autobm-try-word ()
+ (thing-at-point 'word))
+
(defun autobm-try-line ()
(let ( (line (thing-at-point 'line)) )
(substring line 0 (min (1- (length line)) 30))))