emacs-devel
[Top][All Lists]
Advanced

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

address@hidden: Customize and autoloaded libraries]


From: Richard Stallman
Subject: address@hidden: Customize and autoloaded libraries]
Date: Sat, 1 Dec 2001 21:29:33 -0700 (MST)

Do you have any ideas for solving this?

------- Start of forwarded message -------
To: address@hidden
Subject: Customize and autoloaded libraries
From: Henrik Enberg <address@hidden>
Date: Tue, 27 Nov 2001 22:58:28 +0100

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

In GNU Emacs 21.1.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-11-25 on rocksteady
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Customize has a bit of trouble cooperating with autoloaded libraries.
This primarily affects hooks since they're more commonly set outside of
their defcustom declaration (i.e. by calling add-hook in the same
library that defines them.

Here is an outline of the problem.

Suppose I do some customization to `gnus-exit-gnus-hook' which is
defined in the autoloaded library gnus-group.el.

The form custom puts in my .emacs looks like this (wrapped to fit):

'(gnus-exit-gnus-hook (quote ((lambda nil 
(when (get-buffer "*BBDB*") (bury-buffer "*BBDB*"))))))

Now, sometime during the course of loading Gnus the following is done
in mm-decode.el:

(add-hook 'gnus-exit-gnus-hook 'mm-destroy-postponed-undisplay-list)

This leads to my customize setting being ignored, even though custom 
knows about it:

(get 'gnus-exit-gnus-hook 'saved-value)

=> ((quote ((lambda nil (when (get-buffer "*BBDB*") 
   (bury-buffer "*BBDB*"))))))

Other variables and hooks left unchanged when loading the libraries
doesn't have this problem.

The cheezy way of fixing this would be to set the third element of the
custom form for all hooks to t, but it seems a bit hackish.

Another way would be to call add-hook instead of set for hooks in
custom-set-variables, but that would require keeping track of the :type
of every variable.



Recent input:
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> C-a C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-e 
C-b C-b C-b <backspace> <backspace> <backspace> <backspace> 
c C-n C-f C-f <backspace> <backspace> <backspace> <backspace> 
c C-a M-< C-c C-c q <return> C-c g M-x M-p <return
>

Recent messages:
nnml: Reading incoming mail (no new mail)...done
Reading active file via nnml...done
Reading active file from archive via nnfolder...
Opening nnfolder server on archive...done
Reading active file from archive via nnfolder...done
Checking new news...
Opening nnml server on sent...done
Opening nnml server on sent...done
Opening nndraft server...done
Checking new news...done

Henrik
- -- 
It's clearly a budget.  It's got a lot of numbers in it.
        -- George W Bush
------- End of forwarded message -------



reply via email to

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