branch: externals/do-at-point
commit fe246ad11caa6c05a06809e0aa557eecd11a202f
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>
Allow disabling 'do-at-point--mode' if not overlay exists
---
do-at-point.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/do-at-point.el b/do-at-point.el
index e03a5d90f6..2cef0a7ad5 100644
--- a/do-at-point.el
+++ b/do-at-point.el
@@ -397,8 +397,9 @@ instead."
(setq do-at-point--overlay ov)
(do-at-point--update))
(remove-hook 'post-command-hook #'do-at-point--update t)
- (overlay-put do-at-point--overlay 'do-at-point-thing nil)
- (delete-overlay do-at-point--overlay)
+ (when do-at-point--overlay
+ (overlay-put do-at-point--overlay 'do-at-point-thing nil)
+ (delete-overlay do-at-point--overlay))
(setq do-at-point--overlay nil))
(run-hooks 'do-at-point-hook))