all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* lisp-interaction-mode binding RET
@ 2003-08-04 18:23 Peter Seibel
  2003-08-06  3:05 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Seibel @ 2003-08-04 18:23 UTC (permalink / raw)


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 bug-gnu-emacs@gnu.org 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

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.66.1060024420.29551.bug-gnu-emacs@gnu.org>]

end of thread, other threads:[~2003-08-06  4:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-04 18:23 lisp-interaction-mode binding RET Peter Seibel
2003-08-06  3:05 ` Richard Stallman
2003-08-06  4:19   ` Peter Seibel
     [not found] <mailman.66.1060024420.29551.bug-gnu-emacs@gnu.org>
2003-08-04 20:12 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.