branch: elpa/idris-mode commit da5c22f43622112de9e54d8ef9d3ee324d6973f9 Merge: ccf32ed0b50 039dec8fc27 Author: G. Allais <guillaume.all...@ens-lyon.org> Commit: GitHub <nore...@github.com>
Merge pull request #640 from keram/fix-latest-compile-errors-08-2025 Add lexical binding header and remove unused variable from idris-simple-indent.el --- idris-simple-indent.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/idris-simple-indent.el b/idris-simple-indent.el index 0bdb54091aa..fac9bfcb3a2 100644 --- a/idris-simple-indent.el +++ b/idris-simple-indent.el @@ -1,4 +1,4 @@ -;;; idris-simple-indent.el --- Simple indentation module for Idris Mode +;;; idris-simple-indent.el --- Simple indentation module for Idris Mode -*- lexical-binding: t -*- ;; Copyright (C) 1998 Heribert Schuetz, Graeme E Moss @@ -187,19 +187,17 @@ column, `tab-to-tab-stop' is done instead." (defun idris-simple-indent-newline-same-col () "Make a newline and go to the same column as the current line." (interactive) - (let ((point (point))) - (let ((start-end - (save-excursion - (let* ((start (line-beginning-position)) - (end (progn (goto-char start) - (search-forward-regexp - "[^ ]" (line-end-position) t 1)))) - (when end (cons start (1- end))))))) - (if start-end - (progn (newline) - (insert (buffer-substring-no-properties - (car start-end) (cdr start-end)))) - (newline))))) + (let ((start-end + (save-excursion + (let* ((start (line-beginning-position)) + (end (progn (goto-char start) + (search-forward-regexp + "[^ ]" (line-end-position) t 1)))) + (when end (cons start (1- end))))))) + (newline) + (if start-end + (insert (buffer-substring-no-properties + (car start-end) (cdr start-end)))))) ;;;###autoload