branch: elpa/hl-block-mode commit 08e4b2b21e012eea7d48c52921556d28ccbf7039 Author: Campbell Barton <ideasma...@gmail.com> Commit: Campbell Barton <ideasma...@gmail.com>
Fix compatibility for pos-bol/eol for emacs <29.1 --- hl-block-mode.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hl-block-mode.el b/hl-block-mode.el index 42db0887e8..1aa5c0fa2c 100644 --- a/hl-block-mode.el +++ b/hl-block-mode.el @@ -25,6 +25,18 @@ (require 'pcase)) +;; --------------------------------------------------------------------------- +;; 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