From: Paul Rankin <hello@paulwrankin.com>
To: help-gnu-emacs@gnu.org
Subject: PSA: please stop using weird symbol prefixes
Date: Mon, 11 May 2015 16:18:44 +1000 [thread overview]
Message-ID: <2B7C4DD5-EE6E-4EC1-89BC-DCD1161B3AEA@paulwrankin.com> (raw)
Lately I've seen a lot of seemingly random mode symbol prefixes, e.g. a mode called `foobar-mode` will use `fb:next-item` and elsewhere `fblatex:export-new` or perhaps `foobar/end-of-tree` etc. etc.
1. This approach grates against the Elisp coding conventions...
> • You should choose a short word to distinguish your program from
> other Lisp programs. The names of all global symbols in your
> program, that is the names of variables, constants, and functions,
> should begin with that chosen prefix. Separate the prefix from the
> rest of the name with a hyphen, ‘-’. This practice helps avoid
> name conflicts, since all global variables in Emacs Lisp share the
> same name space, and all functions share another name space(1).
> Use two hyphens to separate prefix and name if the symbol is not
> meant to be used by other packages.
-- from (info "(elisp) Coding Conventions")
2. It breaks `custom-unlispify-tag-names` which is used to display customize pages without the mode prefix.
3. It breaks autocompletion, at least in the mini-buffer, where the user expects <space> translated to hyphen to work as a universal delimiter.
4. Most importantly, it breaks user expectation long established by code that properly follows the conventions that symbols ought to take the form PREFIX-some-symbol.
next reply other threads:[~2015-05-11 6:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 6:18 Paul Rankin [this message]
[not found] <mailman.2751.1431333428.904.help-gnu-emacs@gnu.org>
2015-05-11 21:17 ` PSA: please stop using weird symbol prefixes Emanuel Berg
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=2B7C4DD5-EE6E-4EC1-89BC-DCD1161B3AEA@paulwrankin.com \
--to=hello@paulwrankin.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.