mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 05:52:32 -08:00
Don't leave point amid text conversion edits if auto-fill transpires
* lisp/simple.el (analyze-text-conversion): Save point in old-point after auto-fill completes, so that point-moved is not set if point remains intact subsequent to the execution of both hooks.
This commit is contained in:
parent
3ab99e977d
commit
089b7d4e62
1 changed files with 7 additions and 3 deletions
|
|
@ -11205,15 +11205,19 @@ seconds."
|
|||
;; whether or not auto-fill has actually taken
|
||||
;; place.
|
||||
(old-undo-list buffer-undo-list)
|
||||
;; Save the point position to return it there
|
||||
;; later.
|
||||
(old-point (point)))
|
||||
(save-excursion
|
||||
(if (and auto-fill-function newline-p)
|
||||
(progn (goto-char (nth 2 edit))
|
||||
(previous-logical-line)
|
||||
(funcall auto-fill-function))
|
||||
(funcall auto-fill-function)
|
||||
(setq old-point (point)))
|
||||
(when (and auto-fill-function auto-fill-p)
|
||||
(progn (goto-char (nth 2 edit))
|
||||
(funcall auto-fill-function))))
|
||||
(goto-char (nth 2 edit))
|
||||
(funcall auto-fill-function)
|
||||
(setq old-point (point))))
|
||||
;; Record whether or not this edit should result in
|
||||
;; an undo boundary being added.
|
||||
(setq any-nonephemeral
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue