Subject: 23.1; LaTeX-mode comment changes in fill-paragraph

From: EBo <[email-masked]>
Date: Sun, 15 Aug 2010 10:15:59 -0600

When working on a latex document I often comment out lines and leave them
around in case I want to add them back in.  If I do this in the middle of a
paragraph and then fill-paragraph to make it easier to read, the line
*after* the comment is now appended to the comment and not  kept on the non
comment line.  ex:

  some text
  % a comment.
  and more text

ends up becoming:

  some text
  % a comment. and more text

after running fill-paragraph.  This results in more text being commented
out than intended.

  EBo --

Some emacs configuration:

In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.9)
 of 2010-07-11 on c1
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  '--prefix=/usr' '--build=x86_64-pc-linux-gnu'
'--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--libdir=/usr/lib64'
'--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23'
'--with-sound' '--with-x' '--without-toolkit-scroll-bars' '--with-gif'
'--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm'
'--without-xft' '--without-libotf' '--without-m17n-flt'
'--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos'
'--without-kerberos5' '--with-gpm' '--with-dbus'
'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu'
'CFLAGS=-march=native -O2 -pipe' 'LDFLAGS=-Wl,-O1''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  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: LaTeX

Minor modes in effect:
  shell-dirtrack-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-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