X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;fp=emacs%2Fnotmuch-lib.el;h=7fc342a567f336b6f9e69c8aee24af412d9ccc5d;hp=546ab6fda41f654e8e64d1a85408f64fc6f78ffe;hb=f3cba19f882471a396a6b6175a709ccd1f6f34a0;hpb=b58594cd5b0c7738443fc189cee66f699a43bd06 diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 546ab6fd..7fc342a5 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -1008,6 +1008,15 @@ status." (defvar notmuch-show-process-crypto nil) (make-variable-buffer-local 'notmuch-show-process-crypto) +(defun notmuch-interactive-region () + "Return the bounds of the current interactive region. + +This returns (BEG END), where BEG and END are the bounds of the +region if the region is active, or both `point' otherwise." + (if (region-active-p) + (list (region-beginning) (region-end)) + (list (point) (point)))) + (provide 'notmuch-lib) ;; Local Variables: