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

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

RE: How can i enable webmode?


From: Drew Adams
Subject: RE: How can i enable webmode?
Date: Sun, 10 May 2020 09:42:14 -0700 (PDT)

> For example the Melpa package `inform' is activating itsel during
> installation (and maybe by restarting Emacs in some situations).  The
> motivation is: If you are interested you'll have it without much ado
> and
> if you don't like it any more just uninstall the small package.
> 
> Does it make sense or do you regard this behaviour as impolite?

It's generally considered impolite, and is
contrary to convention.

Loading a library should in general not change
most user-observable behavior.  It shouldn't
change faces, key bindings, actions of existing
commands, etc.

"Installing a package" does a little bit more
than loading a typical library (Lisp file).
The main thing package-installing does, which
might or might not be done by just loading a
library (e.g. `require'), is to establish
autoloading for some commands etc.
___

This is, in fact, the very first rule of the
Emacs Lisp Coding Conventions:

  D.1 Emacs Lisp Coding Conventions
  =================================

  Here are conventions that you should follow when
  writing Emacs Lisp code intended for widespread use:

   • Simply loading a package should not change Emacs’s
     editing behavior.  Include a command or commands
     to enable and disable the feature, or to invoke it.

     This convention is mandatory for any file that
     includes custom definitions.  If fixing such a file
     to follow this convention requires an incompatible
     change, go ahead and make the incompatible change;
     don’t postpone it.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Coding-Conventions.html

These conventions apply pretty strictly to code
to be included in Emacs.  And they are offered
as guidance for 3rd-party (i.e., user) code.



reply via email to

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