all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Need advice for naming practice for namespaces in Elisp.
Date: Tue, 05 Feb 2013 22:44:49 +0200	[thread overview]
Message-ID: <87ehguo5ha.fsf@gavenkoa.example.com> (raw)

I read very small amount of elisp code and found practice to put '->' in the
name of elisp var/func:

  ./emacs-bzr/emacs-24/lisp/info-look.el:107:(defsubst info-lookup->topic-value (topic)
  ./emacs-bzr/emacs-24/lisp/info-look.el:110:(defsubst info-lookup->mode-value (topic mode)
  ./emacs-bzr/emacs-24/lisp/info-look.el:113:(defsubst info-lookup->regexp (topic mode)

Also I search for dot in names:

  ./emacs-bzr/trunk/lisp/erc/erc-backend.el:928:        (setf (erc-response.sender msg)
  ./emacs-bzr/trunk/lisp/erc/erc-backend.el:933:        (setf (erc-response.command msg)

and for colon:

  ./emacs-bzr/emacs-24/lisp/org/org-agenda.el:5666:	 (maxgap  (org-hh:mm-string-to-minutes
  ./emacs-bzr/emacs-24/lisp/org/org-agenda.el:5703:			      (org-minutes-to-hh:mm-string

Seems that official sources don't often use special marker to separate package
name and command and some times uses '->', ':' and '.'

I want to choose good marker for package to simplify reading my code and make
it more syntactically structured. I am feeling good with dot:

  blog4y-chunk.write
  blog4y-chunk.read

  blog4y-blog-selection.select
  blog4y-blog-selection.buffer-name
  blog4y-blog-selection.regex

but would be glad to hear any suggestion and coding practices... My be some
syntax agreement come from CL or other languages or have some historical
background...

-- 
Best regards!




             reply	other threads:[~2013-02-05 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 20:44 Oleksandr Gavenko [this message]
2013-02-06  6:42 ` Need advice for naming practice for namespaces in Elisp Drew Adams
2013-02-06 18:59 ` Stefan Monnier
2013-02-07 19:04   ` Oleksandr Gavenko

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=87ehguo5ha.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --cc=help-gnu-emacs@gnu.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.