[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/diff-ansi 5196771753: Correct compatibility for pos-bol/eo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/diff-ansi 5196771753: Correct compatibility for pos-bol/eol for emacs <29.1 |
Date: |
Sun, 15 Jan 2023 01:58:57 -0500 (EST) |
branch: elpa/diff-ansi
commit 5196771753b7b534fe00326b5b38b3e378451ee4
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Correct compatibility for pos-bol/eol for emacs <29.1
---
diff-ansi.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/diff-ansi.el b/diff-ansi.el
index 18d6efede4..5ba7540966 100644
--- a/diff-ansi.el
+++ b/diff-ansi.el
@@ -25,13 +25,17 @@
;; ---------------------------------------------------------------------------
;; Compatibility
-(when (version< emacs-version "29.1")
- (defsubst pos-bol (&optional n)
+(when (and (version< emacs-version "29.1") (not (and (fboundp 'pos-bol)
(fboundp 'pos-eol))))
+ (defun pos-bol (&optional n)
"Return the position at the line beginning."
- (line-beginning-position n))
- (defsubst pos-eol (&optional n)
+ (declare (side-effect-free t))
+ (let ((inhibit-field-text-motion t))
+ (line-beginning-position n)))
+ (defun pos-eol (&optional n)
"Return the position at the line end."
- (line-end-position n)))
+ (declare (side-effect-free t))
+ (let ((inhibit-field-text-motion t))
+ (line-end-position n))))
;; ---------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/diff-ansi 5196771753: Correct compatibility for pos-bol/eol for emacs <29.1,
ELPA Syncer <=