diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index c52fcfcc05..b9f7c116e3 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -604,6 +604,10 @@ thing-at-point-email-regexp (put 'buffer 'end-op (lambda () (goto-char (point-max)))) (put 'buffer 'beginning-op (lambda () (goto-char (point-min)))) +(put 'region 'bounds-of-thing-at-point + (lambda () + (when (use-region-p) + (cons (region-beginning) (region-end))))) ;; UUID