From 693ca82648b344f898a9aa579b6cd64d047d27e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 18 Apr 2014 03:06:34 +0200 Subject: [PATCH] FUEL: factor-find-in returns correct vocab when point is on the IN:-line --- misc/fuel/factor-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 2fb6a048a0..0a93bd8910 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -673,8 +673,11 @@ source/docs/tests file. When set to false, you'll be asked only once." (defun factor-find-in () (save-excursion - (when (re-search-backward factor-current-vocab-regex nil t) - (match-string-no-properties 1)))) + (beginning-of-line) + (if (re-search-backward factor-current-vocab-regex nil t) + (match-string-no-properties 1) + (when (re-search-forward factor-current-vocab-regex nil t) + (match-string-no-properties 1))))) (defun factor-in-private? () "t if point is withing a PRIVATE-block, nil otherwise."