unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Mauger <mmaug@yahoo.com>
Subject: Custom/define-minor-mode problem
Date: Tue, 9 Aug 2005 10:17:21 -0700 (PDT)	[thread overview]
Message-ID: <20050809171721.86914.qmail@web60324.mail.yahoo.com> (raw)

I noticed that my `recentf' menu of recently used files was suddenly
empty.  (It actually has been an issue for a while, I just got around to
addressing it today.)

Looking at an old copy of my .emacs, I noticed that the mode entry in
`custom-set-variables' has changed.

Was  '(recentf-mode t nil (recentf))
Now  '(recentf-mode t)

Reading the custom code, it makes sense that things are now broken.  I
define the `recentf-save-file' in custom and it's entry appears after the
`recentf-mode' entry.  Entries with a require list (the fourth member of
the custom entry) are deferred so that all the customizations for the
mode are complete.  There's no longer a require list, so the mode is
being enabled before its told where the old save file is.

The lack of a require list in the custom entry is problem with all minor
modes defined via `define-minor-mode'.  It is only noticable if the user
also customizes a variable whose name sorts after the mode variable's
name and the variable is used when the mode starts.

I spent some time looking at the new `define-minor-mode' code but my head
exploded.  Could someone with more experience with that code take a look
and see what needs to be done to get the :require property on the
defcustom for the mode?  

Thanks.

             reply	other threads:[~2005-08-09 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09 17:17 Michael Mauger [this message]
2005-08-10 17:45 ` Custom/define-minor-mode problem Michael Mauger
  -- strict thread matches above, loose matches on Subject: below --
2005-08-22 18:20 Michael Mauger
2005-08-24  0:10 ` Richard M. Stallman
2005-08-24 11:33   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050809171721.86914.qmail@web60324.mail.yahoo.com \
    --to=mmaug@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).