all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: MON KEY <monkey@sandpframing.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 6893@debbugs.gnu.org, Andreas Schwab <schwab@linux-m68k.org>
Subject: bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode'
Date: Tue, 24 Aug 2010 16:49:30 -0400	[thread overview]
Message-ID: <AANLkTi=hA1w9KOrKgCn+9tytSpvnx005sp1DKtUowF5k@mail.gmail.com> (raw)
In-Reply-To: <jwvtymmtgbn.fsf-monnier+emacs@gnu.org>

On Sun, Aug 22, 2010 at 6:49 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> So what about these?
>
>> `'#'8
>>  ;=> (quote (function 8))
>
> What about it?  C-M-b indeed shows that '#'8 is the sexp.
>
>>  `#'?\x27?\x23
>>  ;=> (function 39)
>
My point is that with these C M-b:

`'#'

`'

point is skipped back beyond the sexp at point to "M-b:".

Isn't there an implicit list after the last quote created by backquote?

It "feels" like there is with these:

`#1=#1#
;=> (nil)

`','#1=#1#
;=> (quote (nil))

`',#''#1=#1#
;=> (quote (quote (nil)))

`',#','#1=#1#
;=> (quote \,)

`,#','#1=#1#
;=> \,

`',#','nil
;=> (quote \,)

`',#',#1=#1#
;=> (quote \,)

>> Where did 35 go?
>
> That's a known shortcoming of syntax tables which aren't able to
> describe correctly the syntax of Elisp char constants.

Does that affect how the range of "last sexp" is allowed to extend beyond the
beginning-of-line only to find some arbitrary word barier a few lines up?

> But again C-M-b
> shows you correctly what C-x C-e considers as "the last sexp".

Yes well, even w/ C M-b hopping its still not a valid sexp for `eval':

`#'?\x27?\x23
=> (function 39)

(eval (function 39))
;=> 39

(eval `#'?\x27?\x23)
;=> Debugger entered--Lisp error: (wrong-number-of-arguments eval 2)

And besides, theres this anomaly too:

#&8"\377"
;=> "\377" (actually on Emacs 23.2 its => "ÿ")

`#&8"\377"
;=> "\377" (actually on Emacs 23.2 its => "ÿ")

`#&8"\x3fffff"
;=> "\377" (actually on Emacs 23.2 its => "ÿ")

Which would make sense except that _both_ of these manages to fail "correctly":

`'#s

`'#s" "
     !string

=> Debugger entered--Lisp error: (invalid-read-syntax "#")

Despite the fact that C M-b for either of this forms:

`'#s(hash-table size 30 data (key1 val1 key2 300))

#s(hash-table size 30 data (key1 val1 key2 300))

puts point just after "#s".

I understand that the hash-table read syntax has a higher priority because its
newer but the cummulative effect of the various sharpsign quoting/evaluation
rules for the immediate sexp before point feels inconsistently biased when
viewed in the aggregate.

>
>
>        Stefan

--
/s_P\





  reply	other threads:[~2010-08-24 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21 21:55 bug#6893: evaluating `'#'(lambda (b) b)8 ; => 8 with `eval-last-sexp' "C-x C-e" in `emacs-lisp-mode' MON KEY
2010-08-21 22:40 ` Stefan Monnier
2010-08-22  0:17   ` MON KEY
2010-08-22 22:49     ` Stefan Monnier
2010-08-24 20:49       ` MON KEY [this message]
2010-08-21 22:50 ` Andreas Schwab

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

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

  git send-email \
    --in-reply-to='AANLkTi=hA1w9KOrKgCn+9tytSpvnx005sp1DKtUowF5k@mail.gmail.com' \
    --to=monkey@sandpframing.com \
    --cc=6893@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=schwab@linux-m68k.org \
    /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 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.