Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Re-factor user var/fn names before 1.0.0 release (replace -- with -) #206

Open
kaushalmodi opened this issue Aug 21, 2018 · 2 comments
Open

Comments

@kaushalmodi
Copy link

kaushalmodi commented Aug 21, 2018

Hello,

It is a known convention [see below] in Emacs Lisp to have -- in function names only if they are internal functions i.e. not to be used/modified/advised by the user.

But I am finding user-facing/interactive functions like mastodon-tl--get-tag-timeline, etc. (basically all mastodon.el interactive functions) to have -- in their names.

Would it be possible to simply replace -- with - in such user-facing fn names?


For backward compatibility, you can use define-obsolete-function-alias for an interim period that allows both versions of such function names (with the obsoleted names with -- and with the new names with -).


References

@kaushalmodi kaushalmodi changed the title Re-factor function names before 1.0.0 release Re-factor function names before 1.0.0 release (replace -- with - in interactive fns) Aug 21, 2018
@kaushalmodi
Copy link
Author

The same suggestion extends to variables intended for user modification.. the defcustoms.

@kaushalmodi kaushalmodi changed the title Re-factor function names before 1.0.0 release (replace -- with - in interactive fns) Re-factor user var/fn names before 1.0.0 release (replace -- with -) Aug 21, 2018
@jdenen
Copy link
Collaborator

jdenen commented Nov 19, 2018

It's a solid point and something I don't like about the current functions. I initially wrote them like this because the "namespaces" like mastodon-toot and mastodon-tl have - in them. It made mastodon-tl-do-some-public-thing confusing IMO.

That said, I would accept a PR that put a / between namespaces and public function names: mastodon-tl/do-some-public-thing. Private functions should keep --: mastodon-tl--do-some-private-thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants