all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19564@debbugs.gnu.org
Subject: bug#19564: 24.4; eieio backward compatibility
Date: Wed, 14 Jan 2015 07:06:34 +0100	[thread overview]
Message-ID: <87fvbdvqtx.fsf@gmail.com> (raw)
In-Reply-To: <jwvwq4q31kt.fsf-monnier+emacsbugs@gnu.org>


Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The confusion comes that slot-value as documented should use the quoted
>> slot (i.e 'slot) and oref should use the keyword slot (i.e :slot).
>
> I don't think so:
>
>    (defmacro oref (obj slot)
>      `(eieio-oref ,obj (quote ,slot)))
>    (defalias 'slot-value 'eieio-oref)
>
> They both accept the slot name (except that one needs it quoted and the
> other doesn't) and the initarg name (as an alternative name for the
> slot).

Yes right, I have ckecked too, thanks.

>> Note that it seems the documentation should be updated as slot-value
>> support both form for slot ('slot and :slot), and IIRC oref also support
>> both forms, but correct me if I am wrong, I am not sure about this one,
>> I will check.
>
> Could be, indeed.  I haven't looked enough at EIEIO's own documentation.

Probably it should be clarified:

(oref A :slot)
=> OK.
(oref A slot)
=> OK
(oref A 'slot)
=> Error: (wrong-type-argument symbolp (quote slot))
(slot-value A :slot)
=> OK
(slot-value A slot)
=> Symbol's value as variable is void: slot
(slot-value A 'slot)
=> OK

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





  reply	other threads:[~2015-01-14  6:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11  8:03 bug#19564: 24.4; eieio backward compatibility Thierry Volpiatto
2015-01-12  5:08 ` Stefan Monnier
2015-01-12  5:41   ` Thierry Volpiatto
2015-01-12  5:36 ` Stefan Monnier
2015-01-12  5:58   ` Thierry Volpiatto
2015-01-12  7:03     ` Dmitry Gutov
2015-01-12  9:59       ` Thierry Volpiatto
2015-01-12 15:02     ` Stefan Monnier
2015-01-13  8:55       ` Thierry Volpiatto
2015-01-13 12:36       ` Thierry Volpiatto
2015-01-13 14:30         ` Ted Zlatanov
2015-01-13 14:50           ` Thierry Volpiatto
2015-01-13 14:54             ` Dmitry Gutov
2015-01-13 15:13               ` Thierry Volpiatto
2015-01-13 15:01             ` Ted Zlatanov
2015-01-13 15:27               ` Ivan Shmakov
2015-01-13 16:37         ` Stefan Monnier
2015-01-13 18:06           ` Thierry Volpiatto
2015-01-13 19:52             ` Stefan Monnier
2015-01-14  6:06               ` Thierry Volpiatto [this message]
2015-01-14 18:04                 ` Stefan Monnier
2015-01-15  5:25                   ` Thierry Volpiatto
2015-01-15 15:09                     ` Stefan Monnier
2015-01-14 18:05                 ` Stefan Monnier
2015-01-15  5:22                   ` Thierry Volpiatto
2015-01-15 15:07                     ` Stefan Monnier
2015-01-14 19:01               ` Stefan Monnier
2015-01-19  8:48           ` Thierry Volpiatto

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=87fvbdvqtx.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=19564@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.