rudolfochrist / interleave

Emacs minor mode to interleave notes and text books
329 stars 18 forks source link

Naming convention cleanup? #22

Closed kaushalmodi closed 8 years ago

kaushalmodi commented 8 years ago

Hi,

I was revisiting interleave.el, and wanted to clean up the naming of various funcitons and the interleave minor mode.

(1) Rename interleave minor mode to interleave-mode

Right now we get this warning:

Compiling file /home/kmodi/.emacs.d/forks-unused/interleave/interleave.el at Sun Aug 21 23:44:38 2016 interleave.el:439:1:Warning: global/dynamic var ‘interleave’ lacks a prefix

It is a convention to name a minor mode ending with -mode. Also I have verified that renaming as above gets rid of that warning when byte-compiling interleave.el. That would mean a backward incompatible change. But the interleave name can be marked as obsolete and then later removed after few months if you like.

(2) Remove -- from the names of commands meant to be used by the end-user.

The convention is to use -- only for the functions that are used internally, and definitely not for the interactive functions aka commands. Would you want to refactor the code so that interleave-- is used solely for internal functions.

If you'd like I can send a PR for these changes.

kaushalmodi commented 8 years ago

Actually, I am thinking of replacing all *interleave--foo* and interleave--foo with interleave-foo.

rudolfochrist commented 8 years ago

@kaushalmodi Thanks for the feedback.

(1) Did this change meanwhile? When I started the package I thought the *-mode suffix was only for major modes. Anyway, if this is the community and Emacs standard we should change it to interleave-mode.

(2) Yes. Definitely.

rudolfochrist commented 8 years ago

Ideally, when we changed the name and straighten the interface issue #19 should be addressed.