projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c6d302
)
* lisp/thingatpt.el (region): Put property bounds-of-thing-at-point, bug#39512
author
Juri Linkov
<juri@linkov.net>
Wed, 21 Apr 2021 19:37:05 +0000
(22:37 +0300)
committer
Juri Linkov
<juri@linkov.net>
Wed, 21 Apr 2021 19:37:05 +0000
(22:37 +0300)
lisp/thingatpt.el
patch
|
blob
|
history
diff --git
a/lisp/thingatpt.el
b/lisp/thingatpt.el
index c52fcfcc051c8b3fa29d4c1475be3476dbce8516..8ca0f429ca13e869d870a25b68237bd1f9ddc568 100644
(file)
--- a/
lisp/thingatpt.el
+++ b/
lisp/thingatpt.el
@@
-600,10
+600,14
@@
with angle brackets.")
(buffer-substring-no-properties
(car boundary-pair) (cdr boundary-pair))))))
-;; Buffer
+;; Buffer
and region
(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