Explorar o código

Forgot a `save-excursion'

* lisp/org.el (org-fill-paragraph): Add a `save-excursion' to avoid
  returning funny results.
Nicolas Goaziou %!s(int64=13) %!d(string=hai) anos
pai
achega
2fd696716a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -21072,7 +21072,7 @@ a footnote definition, try to fill the first paragraph within."
 		  ;; in current paragraph nor text before message
 		  ;; in current paragraph nor text before message
 		  ;; body.
 		  ;; body.
 		  ((derived-mode-p 'message-mode)
 		  ((derived-mode-p 'message-mode)
-		   (let ((body-start (message-goto-body)))
+		   (let ((body-start (save-excursion (message-goto-body))))
 		     (when body-start (setq beg (max body-start beg))))
 		     (when body-start (setq beg (max body-start beg))))
 		   (when (save-excursion
 		   (when (save-excursion
 			   (re-search-forward
 			   (re-search-forward