diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-20 17:14:08 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-20 17:45:45 +0100 |
| commit | 2aa415a6fa0ab87802e79b119f09746080425bc6 (patch) | |
| tree | 82c108af616e8d24e1787bc5c85dfe4230d2f34b /compat-26.el | |
| parent | 071ce274a4cf63d54b061f478a14e56bea00d01f (diff) | |
compat-29: Add use-region-noncontiguous-p
Diffstat (limited to 'compat-26.el')
| -rw-r--r-- | compat-26.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compat-26.el b/compat-26.el index a139251..4340113 100644 --- a/compat-26.el +++ b/compat-26.el @@ -69,6 +69,19 @@ SEQUENCE may be a list, a vector, a boolean vector, or a string." (line-number-at-pos position)) (line-number-at-pos position))) +;;;; Defined in simple.el + +(compat-defun region-bounds () ;; <compat-tests:region-bounds> + "Return the boundaries of the region. +Value is a list of one or more cons cells of the form (START . END). +It will have more than one cons cell when the region is non-contiguous, +see `region-noncontiguous-p' and `extract-rectangle-bounds'." + (if (eval-when-compile (< emacs-major-version 25)) + ;; FIXME: The `region-extract-function' of Emacs 24 has no support for the + ;; bounds argument. + (list (cons (region-beginning) (region-end))) + (funcall region-extract-function 'bounds))) + ;;;; Defined in subr.el (compat-defun alist-get (key alist &optional default remove testfn) ;; <compat-tests:alist-get> |
