[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/do-at-point 9f59dd6520 2/2: Improve navigation when not
From: |
ELPA Syncer |
Subject: |
[elpa] externals/do-at-point 9f59dd6520 2/2: Improve navigation when not on a thing |
Date: |
Fri, 22 Sep 2023 06:57:56 -0400 (EDT) |
branch: externals/do-at-point
commit 9f59dd6520f4417bd50efe32f4f35ecfc6bbea17
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Improve navigation when not on a thing
---
do-at-point.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/do-at-point.el b/do-at-point.el
index ae6a5e4623..4911af81e9 100644
--- a/do-at-point.el
+++ b/do-at-point.el
@@ -328,18 +328,18 @@ instead."
"Move focus N things ahead.
By default, this will move one thing ahead."
(interactive "p")
- (when (and do-at-point--overlay
- (overlay-end do-at-point--overlay))
- (goto-char (overlay-end do-at-point--overlay))
+ (when do-at-point--overlay
+ (when (overlay-end do-at-point--overlay)
+ (goto-char (overlay-end do-at-point--overlay)))
(forward-thing (overlay-get do-at-point--overlay 'do-at-point-thing) n)))
(defun do-at-point-backward (n)
"Move focus N things back.
Refer to the command `do-at-point-forward' for more details."
(interactive "p")
- (when (and do-at-point--overlay
- (overlay-start do-at-point--overlay))
- (goto-char (overlay-start do-at-point--overlay))
+ (when do-at-point--overlay
+ (when (overlay-start do-at-point--overlay)
+ (goto-char (overlay-start do-at-point--overlay)))
(forward-thing (overlay-get do-at-point--overlay 'do-at-point-thing)
(- (or n 1)))))