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

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

[nongnu] elpa/scroll-on-drag ee4e0b0a42: Fix compatibility for pos-bol/e


From: ELPA Syncer
Subject: [nongnu] elpa/scroll-on-drag ee4e0b0a42: Fix compatibility for pos-bol/eol for emacs <29.1
Date: Fri, 13 Jan 2023 08:02:07 -0500 (EST)

branch: elpa/scroll-on-drag
commit ee4e0b0a4221ea42ca4a12838d3b401c4bfc828a
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix compatibility for pos-bol/eol for emacs <29.1
---
 scroll-on-drag.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scroll-on-drag.el b/scroll-on-drag.el
index c173d288af..fdde96ddf9 100644
--- a/scroll-on-drag.el
+++ b/scroll-on-drag.el
@@ -20,6 +20,19 @@
 
 ;;; Code:
 
+
+;; ---------------------------------------------------------------------------
+;; Compatibility
+
+(when (version< emacs-version "29.1")
+  (defsubst pos-bol (&optional n)
+    "Return the position at the line beginning."
+    (line-beginning-position n))
+  (defsubst pos-eol (&optional n)
+    "Return the position at the line end."
+    (line-end-position n)))
+
+
 ;; ---------------------------------------------------------------------------
 ;; Custom Variables
 



reply via email to

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