unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Naming conventions for eieio slot accessors
@ 2018-11-03 21:43 Fu Yuan
  2018-11-04 15:14 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Fu Yuan @ 2018-11-03 21:43 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Hi,

I'm writing a package which takes advantage of eieio.
When defining classes, I couldn't figure out how to name
the accessors.

First, should I use prefixes? Second, if I use a prefix,
should I use a double dash (--) or single dash (-)?

Say I'm writing a package called uikit.el and I have a class
`uikit-view' with a slot `name'.

Should I write

    (defclass uikit-view ()
      ((name
        :accessor uikit--name-of)))

or

    (defclass uikit-view ()
      ((name
        :accessor uikit-name-of)))

or

    (defclass uikit-view ()
      ((name
        :accessor name-of)))

Thanks,
Sincerely, Yuan

[-- Attachment #2: Type: text/html, Size: 3112 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-04 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-03 21:43 Naming conventions for eieio slot accessors Fu Yuan
2018-11-04 15:14 ` Stefan Monnier

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).