Open gracjan opened 9 years ago
And those two functions are active only when haskell-decl-scan-mode
is active so referencing #623 seems in order. Those should work in plain haskell-mode
.
Related: #1122.
beginning-of-defun-function
should be same functionality as in haskell-indentation-mode
, so it is part of common functionality.
Spec:
beginning-of-defun-function
should move up to the beginning of line that: 1) starts in the first column (for normal haskell) 2) starts in the 3rd column after bird (in literate) 3) is not in string 4) is not in comment 5) is not in quasiquote 6) is not in any parenthesized expressionend-of-defun-function
should move down to the beginning of line that: 1) is right after newline past last line with non-comment tokens 2) is not in string, comment, quasiquote or any parenthesized expressionbeginning-of-defun
is implemented in haskell-indentation-mode
as haskell-indentation-goto-least-indentation
. This should be put up higher level, presumably in haskell-mode
.
And take those two functions out of haskell-decl-scan
.
I believe this is already working?
On a semi-related issue, I made haskell-ds-backward-decl
and haskell-ds-forward-decl
work correctly with operators. Is it OK to bind these to C-M-a
and C-M-e
, as they implement that functionality correctly, but the beginning-of-defun
and end-of-defun
functions don't work correctly with it.
The point is to make those functions available without enabling haskell-decl-scan-mode
.
beginning-of-defun-function
should put cursor in column 0 where the definition begins (currently it puts it at the end of line the line before).end-of-defun-function
should put cursor in column 0 after last line of the definition (currently it can go many empty lines below it).