diff --git a/haskell-decl-scan.el b/haskell-decl-scan.el index e989c8b13..276a8f55d 100644 --- a/haskell-decl-scan.el +++ b/haskell-decl-scan.el @@ -217,6 +217,10 @@ only for `imenu' support.") (concat literate-haskell-ds-line-prefix haskell-ds-start-decl-re) "The regexp that starts a Bird-style literate Haskell declaration.") +(defun haskell-ds-whitespace-p (char) + "Test if CHAR is a whitespace character." + (member char '(?\t ?\n ?\ ))) + (defun haskell-ds-move-to-decl (direction bird-literate fix) "General function for moving to the start of a declaration, either forwards or backwards from point, with normal or with Bird-style @@ -360,7 +364,7 @@ there." ;; ensure result is `t' or `nil' instead of just truthy (if (or ;; is cursor on whitespace - (member (following-char) '(?\t ?\n ?\ )) + (haskell-ds-whitespace-p (following-char)) ;; http://emacs.stackexchange.com/questions/14269/how-to-detect-if-the-point-is-within-a-comment-area ;; is cursor at begging, inside, or end of comment (let ((fontfaces (get-text-property (or pt