unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Peter Seibel <peter@javamonkey.com>
Subject: lisp-interaction-mode binding RET
Date: Mon,  4 Aug 2003 11:23:43 -0700 (PDT)	[thread overview]
Message-ID: <20030804182343.805414005@localhost.javamonkey.com> (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

             reply	other threads:[~2003-08-04 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 18:23 Peter Seibel [this message]
2003-08-06  3:05 ` lisp-interaction-mode binding RET 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030804182343.805414005@localhost.javamonkey.com \
    --to=peter@javamonkey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).