emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107825: (fill-region): Leave poin


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107825: (fill-region): Leave point and mark where they were before filling
Date: Fri, 02 Nov 2012 01:48:21 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 107825
fixes bug: http://debbugs.gnu.org/5399
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2012-04-10 04:06:19 +0200
message:
  (fill-region): Leave point and mark where they were before filling
modified:
  lisp/ChangeLog
  lisp/textmodes/fill.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-09 23:03:33 +0000
+++ b/lisp/ChangeLog    2012-04-10 02:06:19 +0000
@@ -1,3 +1,8 @@
+2012-04-10  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * textmodes/fill.el (fill-region): Leave point and mark where they
+       were before filling (bug#5399).
+
 2012-04-09  Glenn Morris  <address@hidden>
 
        * version.el (emacs-bzr-get-version):

=== modified file 'lisp/textmodes/fill.el'
--- a/lisp/textmodes/fill.el    2012-01-19 07:21:25 +0000
+++ b/lisp/textmodes/fill.el    2012-04-10 02:06:19 +0000
@@ -1011,7 +1011,8 @@
                       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
-  (let (max beg fill-pfx)
+  (let ((start-point (point-marker))
+       max beg fill-pfx)
     (goto-char (max from to))
     (when to-eop
       (skip-chars-backward "\n")
@@ -1042,6 +1043,8 @@
            (setq fill-pfx
                  (fill-region-as-paragraph (point) end justify nosqueeze))
          (goto-char end))))
+    (goto-char start-point)
+    (set-marker start-point nil)
     fill-pfx))
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]