branch: elpa/diff-ansi commit f10837099d48454c470aa04a3803a8903d421d23 Author: Campbell Barton <ideasma...@gmail.com> Commit: Campbell Barton <ideasma...@gmail.com>
Fix compatibility for pos-bol/eol for emacs <29.1 --- diff-ansi.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/diff-ansi.el b/diff-ansi.el index b6f76021a2..18d6efede4 100644 --- a/diff-ansi.el +++ b/diff-ansi.el @@ -21,6 +21,19 @@ ;;; Code: (require 'ansi-color) + +;; --------------------------------------------------------------------------- +;; 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