emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/idris-mode 4a1d2d5d5b 1/7: Simplify `idris-get-line-num` u


From: ELPA Syncer
Subject: [nongnu] elpa/idris-mode 4a1d2d5d5b 1/7: Simplify `idris-get-line-num` using `line-number-at-pos`
Date: Tue, 22 Nov 2022 04:58:57 -0500 (EST)

branch: elpa/idris-mode
commit 4a1d2d5d5b65bbf33609de76fe1fb413be6c5a4c
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>

    Simplify `idris-get-line-num` using `line-number-at-pos`
---
 idris-commands.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 925cff867f..303f853c3b 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -324,12 +324,8 @@ Idris process. This sets the load position to point, if 
there is one."
 
 
 (defun idris-get-line-num ()
-  "Get the current line number"
-  (save-restriction
-    (widen)
-    (save-excursion
-      (beginning-of-line)
-      (1+ (count-lines 1 (point))))))
+  "Get the current line absolute number."
+  (line-number-at-pos (point) t))
 
 
 (defun idris-thing-at-point ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]