help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need advice for naming practice for namespaces in Elisp.


From: Oleksandr Gavenko
Subject: Need advice for naming practice for namespaces in Elisp.
Date: Tue, 05 Feb 2013 22:44:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]