X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-lib.el;h=7fc342a567f336b6f9e69c8aee24af412d9ccc5d;hb=f3cba19f882471a396a6b6175a709ccd1f6f34a0;hp=546ab6fda41f654e8e64d1a85408f64fc6f78ffe;hpb=0ae8cab4d38ee146876fda48d86f662e397bfb51;p=notmuch 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: