Subject: stuck undo after cc-mode fill

From: Daniel Colascione <[email-masked]>
Date: Sun, 19 Oct 2008 05:05:48 -0400

ms

1. Start emacs with emacs -q --no-site-file
2. Blank the *scratch* buffer, put it in c-mode
3. type asdf
4. C-/ will undo it
5. type asdf again
6. type M-q
7. C-/ does nothing no matter how many times it's pressed
8. make another change
9. now both changes can be undone

I can reproduce this behavior on the latest CVS. Commenting out the undo
bit of c-mask-paragraph fixes the problem. It seems like undo choked on
nil, position, nil in the undo list.

In GNU Emacs 22.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.9)
 of 2008-05-23 on xenbuilder4.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-x-toolkit=gtk' '--with-sound' '--with-toolkit-scroll-bars' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''

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
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  which-function-mode: t
  cua-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  show-paren-mode: t
  savehist-mode: t
  shell-dirtrack-mode: t
  tooltip-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
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<down> <return> d f a C-z C-z C-z C-z C-z C-z C-z C-z 
C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z 
C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z <up> <up> <down> 
<down> <down> <down> <down> <return> <return> <return> 
f a f a s f C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z 
<help-echo> C-x k x C-f C-x C-f <up> <up> <up> <up> 
<down> <down> <up> <up> <up> C-g C-x C-f / m <backspace> 
t m p / f o o . c <return> C-h c C-z C-x b <return> 
C-h c C-z M-x C-g C-x b C-g C-x C-f ~ / <backspace> 
e m a <backspace> <backspace> <backspace> / e m a c 
s / m a i <tab> <return> C-s u n d o <end> C-x C-e 
C-h c C-z C-x b <return> C-h c C-z C-x k C-x b <return> 
c C-z C-h c C-z M-x l o a <backspace> c a l - s e t 
- k e y <return> C-z a d v <tab> u <tab> <return> C-h 
c C-z C-x b <return> C-x b <return> <down-mouse-4> 
<mouse-4> <double-down-mouse-4> <double-mouse-4> <down> 
<tab> <down> <tab> <down> <tab> C-z <tab> M-q C-z C-z 
C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z 
C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z C-z 
C-z C-z <down> <down> <return> C-z C-z C-z C-z C-z 
C-z C-z C-z C-z C-z M-x s u b m t <backspace> i t - 
e m <tab> <backspace> <backspace> <tab> <tab> <tab> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> e m a c s <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
r e p o r t - e <tab> <return>

Recent messages:
C-z runs the command advertised-undo
byte-code: Beginning of buffer [2 times]
Undo! [34 times]
Redo!
Undo! [3 times]
Redo!
Undo!
undo-more: No further undo information
call-interactively: Text is read-only [4 times]
Loading emacsbug...done