branch: elpa/idris-mode commit ca860db9ae49df43b7d784243698869ba02b5dd4 Merge: 1dc558ad24 3c3a87c66c Author: Jan de Muijnck-Hughes <j...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #562 from keram/make-lemma-underscore Fix failure to find beginning of function type definition --- idris-commands.el | 4 ++-- test-data/MakeLemma.idr | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/idris-commands.el b/idris-commands.el index 3645b8ba7d..925cff867f 100644 --- a/idris-commands.el +++ b/idris-commands.el @@ -712,8 +712,8 @@ Otherwise, case split as a pattern variable." ;; now we add the type signature - search upwards for the current ;; signature, then insert before it (re-search-backward (if (idris-lidr-p) - "^\\(>\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:" - "^\\(\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:")) + "^\\(>\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:" + "^\\(\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:")) (let ((indentation (match-string 1)) end-point) (beginning-of-line) (insert indentation) diff --git a/test-data/MakeLemma.idr b/test-data/MakeLemma.idr index 517e92b93e..d4f86f3d5d 100644 --- a/test-data/MakeLemma.idr +++ b/test-data/MakeLemma.idr @@ -3,8 +3,6 @@ module MakeLemma -- (idris-test-run-goto-char #'idris-make-lemma) data Test = A | B -test : Test -> Test +my_lemmaTest : Test -> Test -- +++++++++++ -test x = ?make_lemma - - +my_lemmaTest x = ?my_lemmaTest_rhs