diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 92874f5f02e..eb4f7a3f6db 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3219,9 +3219,13 @@ unless optional argument SOFT is non-nil." | |||
| 3219 | (if (not comment-multi-line) | 3219 | (if (not comment-multi-line) |
| 3220 | (save-excursion | 3220 | (save-excursion |
| 3221 | (if (and comment-start-skip | 3221 | (if (and comment-start-skip |
| 3222 | (let ((opoint (point))) | 3222 | (let ((opoint (point)) |
| 3223 | inside) | ||
| 3223 | (forward-line -1) | 3224 | (forward-line -1) |
| 3224 | (re-search-forward comment-start-skip opoint t))) | 3225 | ;; Determine (more or less) whether |
| 3226 | ;; target position is inside a comment. | ||
| 3227 | (while (and (setq inside (re-search-forward comment-start-skip opoint t)) | ||
| 3228 | (not (setq inside (not (search-forward comment-end opoint t)))))))) | ||
| 3225 | ;; The old line is a comment. | 3229 | ;; The old line is a comment. |
| 3226 | ;; Set WIN to the pos of the comment-start. | 3230 | ;; Set WIN to the pos of the comment-start. |
| 3227 | ;; But if the comment is empty, look at preceding lines | 3231 | ;; But if the comment is empty, look at preceding lines |