emacs-devel
[Top][All Lists]
Advanced

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

Re: Best (or common) pratices on package development workflow


From: Michael Heerdegen
Subject: Re: Best (or common) pratices on package development workflow
Date: Fri, 02 Jun 2023 01:56:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

"Lic. Federico G. Stilman" <fstilman@gmail.com> writes:

> Every time I make a change to the init value of the defcustom
> declaration, I have to unload the feature provided by the package,
> with something like:
>
>   (unload-feature 'my-package)
>
> and after that, reload the library with something like
>
>   (load-library "my-package")
>
> If not, the customization framework doesn't account for the change on
> the default value of the custom variables.

In simple cases, you can follow this advice:

|  When you evaluate a top-level ‘defvar’ form with ‘C-M-x’
|  (‘eval-defun’) or with ‘C-x C-e’ (‘eval-last-sexp’) in Emacs Lisp
|  mode, a special feature of these two commands arranges to set the
|  variable unconditionally, without testing whether its value is
|  void.

(info "(elisp) Defining Variables")

If you changed a lot of `defvar's, unloading might be the cleaner way
(note that if you do not unload, declared variables are still special
and bound, and you might miss places in your code that still depend on
such an actually already removed variable).

If you work intensively on a certain library, it might be better to do
the coding in one instance and test the code in another instance that
you restart regularly.

Michael.




reply via email to

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