Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion haskell-decl-scan.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down