bug-gnu-emacs
[Top][All Lists]
Advanced

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

lisp-interaction-mode binding RET


From: Peter Seibel
Subject: lisp-interaction-mode binding RET
Date: Mon, 4 Aug 2003 11:23:43 -0700 (PDT)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-07-17 on xeon
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.iso885915
  locale-coding-system: iso-latin-9
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

So I just installed 21.3 (after having been using Xemacs for a while).
I was immediately confused by the behavior of RET in
lisp-interaction-mode. Sometimes it is bound to newline as I'd expect;
other times it's bound to last-sexp-toggle-display. That seems
contrary to both the principle of least astonishment (to me anyway)
and the emacs coding standards which say:

  * Major modes must not define <RET> to do anything other than insert
    a newline. The command to insert a newline and then indent is
    `C-j'. Please keep this distinction uniform for all major modes.

Furthermore, the behavior of last-sexp-toggle-display is pretty
strange. For instance if I type this:

  (make-list 20 'a)

in my *scratch* buffer and eval it with C-j I get this:

  (make-list 20 'a)
  (a a a a a a a a a a a a ...)

Now if I put my cursor on the opening parentheses of the list of a's
and hit return I get an error:

  Wrong type argument: integer-or-marker-p, nil

from last-sexp-toggle-display. Then I move the cursor into the list
and l-s-t-d seems to work--it expands and contrats the list. But since
the binding of RET to l-s-t-d seems to be attached to the characters
themselves even more fun awaits. If I kill and then yank the two lines
so I have this:

  (make-list 20 'a)
  (a a a a a a a a a a a a ...)

  (make-list 20 'a)
  (a a a a a a a a a a a a ...)

And then I put the cursor at the beginning of the line containing the
second list of a's and type some stuff, giving me this:

  (make-list 20 'a)
  (a a a a a a a a a a a a ...)

  (make-list 20 'a)
  Type a bunch of stuff here(a a a a a a a a a a a a ...)


Then when I hit RET, l-s-t-d expands the list and wipes out everything
back to the original list leaving me with this:

  (make-list 20 'a)
  (a a a a a a a a a a a a ...)(a a a a a a a a a a a a a a a a a a a a)

This is all with GNU Emacs 21.3.1 running on Linux.

Bug? Feature? I'm hallucinating?

-Peter




reply via email to

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