Skip to content

Commit

Permalink
Remove unused let-binding for point
Browse files Browse the repository at this point in the history
Fixes:

    purescript-navigate-imports.el:101:12: Error: Unused lexical variable ‘point’
    purescript-simple-indent.el:146:10: Error: Unused lexical variable ‘point’
  • Loading branch information
Hi-Angel committed Sep 30, 2024
1 parent 4520701 commit 8ddaba1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
7 changes: 3 additions & 4 deletions purescript-navigate-imports.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@
(purescript-navigate-imports-after-imports-p) ;; This one just speeds it up.
(purescript-navigate-imports-line)))
(forward-line))
(let ((point (point)))
(if (purescript-navigate-imports-line)
(point)
nil))))
(if (purescript-navigate-imports-line)
(point)
nil)))

(defun purescript-navigate-imports-line ()
"Try to match the current line as a regexp."
Expand Down
25 changes: 12 additions & 13 deletions purescript-simple-indent.el
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,18 @@ column, `tab-to-tab-stop' is done instead."
(defun purescript-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)))))))
(if start-end
(progn (newline)
(insert (buffer-substring-no-properties
(car start-end) (cdr start-end))))
(newline))))

(defun purescript-simple-indent-newline-indent ()
"Make a newline on the current column and indent on step."
Expand Down

0 comments on commit 8ddaba1

Please sign in to comment.