unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5399: 23.1.50; fill-region
@ 2010-01-16 21:09 Richard Stallman
  2011-09-18 11:44 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2010-01-16 21:09 UTC (permalink / raw)
  To: emacs-pretest-bug

I insert the following text

    This is
    a test

    of fill region
    and how it affects the mark.

(but not indented), then put the mark at the end and point at the beginning,
and type M-x fill-region.

It finishes with point and the mark both at the end.

It ought to leave point at the beginning if it was there before,
at the end if it was there before.  And likewise with the mark.


In GNU Emacs 23.1.50.3 (mipsel-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2009-11-19 on theobromine2
configured using `configure  'CFLAGS=-O0 -g -Wno-pointer-sign' 'mipsel-unknown-linux-gnu' 'build_alias=mipsel-unknown-linux-gnu' 'host_alias=mipsel-unknown-linux-gnu' 'target_alias=mipsel-unknown-linux-gnu''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
a t u s SPC w i t h SPC A T I . C-a ESC f ESC f ESC 
f SPC b r i e f l y C-e RET C-p C-p C-p C-p C-o b c 
c : SPC r e s p 5 d C-u C-n C-n ( I F SPC w e SPC n 
e e d C-a ESC c C-e SPC t o SPC t a l k SPC m o r e 
SPC w e SPC c a n SPC u s e SPC t h e SPC p h n e . 
DEL DEL DEL o n e . ) RET C-c C-s C-p C-p C-p C-p C-p 
C-e x DEL ESC DEL O p e n O f f i c e C-n C-n C-n C-e 
ESC DEL O p e n ESC / . C-c C-c C-x 1 d d d d u x SPC 
SPC d x d d x d x d x x C-x C-s SPC d d x d d d d x 
d x d x C-x C-f f o o RET C-n C-n T h i s SPC i s RET 
a SPC t e s t RET RET o f SPC f i l l SPC r e g i o 
n RET a n d SPC h o w SPC i t SPC a f f e c t s SPC 
t h e SPC m a r k . RET C-@ C-u C-p C-p C-p ESC x f 
i l l SPC r e TAB RET C-x C-x C-x 4 C-g C-_ C-@ C-u 
C-n C-n C-n ESC w C-x C-g ESC x r e p o r t SPC e m 
a s DEL c s SPC b u g RET

Recent messages:
Saving file /home/rms/RMAIL...
Wrote /home/rms/RMAIL
Expunging deleted messages...done
Expunging deleted messages...done
Expunging deleted messages...done
Expunging deleted messages...done
Mark set
Undo in region!
Mark set
Source file `/home/rms/emacs-cvs/lisp/mail/emacsbug.el' newer than byte-compiled file

Load-path shadows:
/home/rms/emacs-cvs/lisp/hahaha/foo hides /home/rms/emacs-cvs/lisp/emacs-lisp/foo
/home/rms/emacs-cvs/lisp/progmodes/sym-comp hides /home/rms/emacs-cvs/lisp/obsolete/sym-comp

Features:
(shadow emacsbug sgml-mode sh-script executable cal-move cal-menu
calendar cal-loaddefs tabify man noutline outline easy-mmode ispell
mule-util rlogin tex-mode shell latexenc time-stamp parse-time vc-cvs
texinfo compare-w grep compile novice dired-aux dabbrev multi-isearch
quail help-mode view rmailout mailalias sendmail rmail speedbar
sb-image ezimage dframe assoc mail-utils dired regexp-opt t-mouse
battery paren cus-start cus-load mailcrypt rfc822 comint ring easymenu
mailcrypt-init tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face text-properties overlay md5
base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
font-render-setting system-font-setting gtk x-toolkit x multi-tty
emacs)






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5399: 23.1.50; fill-region
  2010-01-16 21:09 bug#5399: 23.1.50; fill-region Richard Stallman
@ 2011-09-18 11:44 ` Lars Magne Ingebrigtsen
  2011-09-19 18:11   ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-18 11:44 UTC (permalink / raw)
  To: rms; +Cc: 5399

Richard Stallman <rms@gnu.org> writes:

> I insert the following text
>
>     This is
>     a test
>
>     of fill region
>     and how it affects the mark.
>
> (but not indented), then put the mark at the end and point at the beginning,
> and type M-x fill-region.
>
> It finishes with point and the mark both at the end.
>
> It ought to leave point at the beginning if it was there before,
> at the end if it was there before.  And likewise with the mark.

The mark doesn't really change currently, I think?

The following patch should fix the problem, but it is a change in
behaviour.  Would it be OK to install this during the feature freeze?

=== modified file 'lisp/textmodes/fill.el'
--- lisp/textmodes/fill.el	2011-07-16 20:05:54 +0000
+++ lisp/textmodes/fill.el	2011-09-18 11:42:16 +0000
@@ -1010,7 +1010,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")
@@ -1041,6 +1042,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))
 
 \f



-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5399: 23.1.50; fill-region
  2011-09-19 18:11   ` Stefan Monnier
@ 2011-09-19 18:10     ` Lars Magne Ingebrigtsen
  2012-04-10  2:06     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-19 18:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5399, rms

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The following patch should fix the problem, but it is a change in
>> behaviour.  Would it be OK to install this during the feature freeze?
>
> I think this should wait for after the freeze.

Ok; I'll mark it as "pending".

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5399: 23.1.50; fill-region
  2011-09-18 11:44 ` Lars Magne Ingebrigtsen
@ 2011-09-19 18:11   ` Stefan Monnier
  2011-09-19 18:10     ` Lars Magne Ingebrigtsen
  2012-04-10  2:06     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2011-09-19 18:11 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 5399, rms

> The following patch should fix the problem, but it is a change in
> behaviour.  Would it be OK to install this during the feature freeze?

I think this should wait for after the freeze.


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#5399: 23.1.50; fill-region
  2011-09-19 18:11   ` Stefan Monnier
  2011-09-19 18:10     ` Lars Magne Ingebrigtsen
@ 2012-04-10  2:06     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10  2:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 5399, rms

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The following patch should fix the problem, but it is a change in
>> behaviour.  Would it be OK to install this during the feature freeze?
>
> I think this should wait for after the freeze.

I've now applied the patch to trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-10  2:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16 21:09 bug#5399: 23.1.50; fill-region Richard Stallman
2011-09-18 11:44 ` Lars Magne Ingebrigtsen
2011-09-19 18:11   ` Stefan Monnier
2011-09-19 18:10     ` Lars Magne Ingebrigtsen
2012-04-10  2:06     ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).