diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index e3e8932188..0fb399a858 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -362,10 +362,6 @@ these lines in your .emacs: (format "^\\(%s:\\) " (regexp-opt (append factor-no-indent-def-starts factor-indent-def-starts)))) -(defconst factor-definition-end-regex - (format "\\(\\(^\\| +\\);\\( *%s\\)*\\($\\| +\\)\\)" - factor-declaration-words-regex)) - (defconst factor-single-liner-regex (regexp-opt '("ABOUT:" "ALIAS:" @@ -390,6 +386,10 @@ these lines in your .emacs: factor-definition-start-regex factor-single-liner-regex)) +(defconst factor-definition-end-regex + (format "\\(^\\| +\\);\\( *%s\\)*\\($\\| +\\)" + factor-declaration-words-regex)) + (defconst factor-end-of-def-line-regex (format "^.*%s" factor-definition-end-regex)) @@ -591,9 +591,6 @@ these lines in your .emacs: (defsubst factor-at-end-of-def () (looking-at factor-end-of-def-regex)) -(defsubst factor-looking-at-emptiness () - (looking-at "^[ ]*$\\|$")) - (defsubst factor-is-last-char (pos) (save-excursion (goto-char (1+ pos)) @@ -605,11 +602,6 @@ these lines in your .emacs: (beginning-of-line) (point)))) -(defun factor-previous-non-blank () - (forward-line -1) - (while (and (not (bobp)) (factor-looking-at-emptiness)) - (forward-line -1))) - (defsubst factor-beginning-of-defun (&optional times) (re-search-backward factor-begin-of-def-regex nil t times)) @@ -760,9 +752,10 @@ these lines in your .emacs: (when (factor-at-begin-of-def) 0))) (defsubst factor-previous-non-empty () + "Move caret to the beginning of the last non-empty line." (forward-line -1) (while (and (not (bobp)) - (factor-looking-at-emptiness)) + (looking-at "^[ ]*$\\|$")) (forward-line -1))) (defun factor-indent-setter-line ()