all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Best practices for writing an Emacs package
@ 2022-10-25 18:05 Akib Azmain Turja
  2022-10-27 10:03 ` Theodor Thornhill
  2022-10-27 20:12 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Akib Azmain Turja @ 2022-10-25 18:05 UTC (permalink / raw)
  To: Emacs Developer List

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]


There are certainly some best practices for doing something.  But what
are the best practices for writing and maintaining an Emacs package?

Here are what I already know,

For programming in general,

* Write readable code, so that anyone else can also understand it.
* Write enough comments to explain what's going on.
* Write as many automated tests as possible.
* Use a version control system.
* Maintain a ChangeLog.
* Never publish code with syntax errors.
* Never throw out your computer through a window due to buggy code.

For Emacs packages,

* Write the summary line properly.
* Write package headers properly.
* Use lexical binding.
* Write good commentary.
* Define user options with `defcustom' instead of `defvar'.
* Write docstrings.
* Follow Emacs Lisp coding conventions.
* Never corrupt user data.
* Never left Emacs in a unusable state.
* Never uninstall Emacs due to frustration.

And what else?

-- 
Akib Azmain Turja

Find me on Mastodon at @akib@hostux.social, and on Codeberg (user
"akib").

This message is signed by me with my GnuPG key.  Its fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-28 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 18:05 Best practices for writing an Emacs package Akib Azmain Turja
2022-10-27 10:03 ` Theodor Thornhill
2022-10-27 20:12 ` Richard Stallman
2022-10-28 18:14   ` Akib Azmain Turja

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.