emacs-devel
[Top][All Lists]
Advanced

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

defcustom problem with packages (user error?)


From: Elias Mårtenson
Subject: defcustom problem with packages (user error?)
Date: Wed, 12 Nov 2014 13:22:41 +0800

In preparation for the eventual inclusion of gnu-apl-mode into ELPA, I decided to ensure that the new-user experience is as smooth as possible. So I started out with a minimal Emacs configuration and loaded my package from MELPA (which is where it's located currently).

The following is the minimal configuration I started out with:

    (custom-set-variables
      ;; ....
      )
    (custom-set-faces
      ;; ...
      )
    (require 'package)
    (add-to-list 'package-archives '("elpa" . "http://tromey.com/elpa/"))
    (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
    (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
    (package-initialize)

Now, to make a long story short, here's the problem I encountered:

Given the configuration above, and gnu-apl-mode being the only package loaded, I am unable to use the customisation framework to set any variables. I mean, the variables can be customised and all, but the changes become overridden as soon as `package-initialize' is called.

The workaround, of course, is to call `package-initialize' before the call to `custom-set-variables'. However, this is not made clear anywhere. That said, I'm not sure if there is a problem with the package, or this is the way things are supposed to work.

So I guess my question is this: Did I make a mistake in developing the package? If so, then is the proper way documented anywhere? And if my package is correct, then why does the package loading override the default values set by `custom-set-variables'?

If anyone is willing to take a look at the package, the source is available at https://github.com/lokedhs/gnu-apl-mode

Regards,
Elias

reply via email to

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