From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: Custom/define-minor-mode problem Date: Mon, 22 Aug 2005 11:20:30 -0700 (PDT) Message-ID: <20050822182030.28436.qmail@web60318.mail.yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1124736824 31895 80.91.229.2 (22 Aug 2005 18:53:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Aug 2005 18:53:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 22 20:53:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E7HPf-0000rn-48 for ged-emacs-devel@m.gmane.org; Mon, 22 Aug 2005 20:52:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7HTO-0006xY-V1 for ged-emacs-devel@m.gmane.org; Mon, 22 Aug 2005 14:56:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E7HDT-0004R4-7u for emacs-devel@gnu.org; Mon, 22 Aug 2005 14:40:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E7HDH-0004OE-QC for emacs-devel@gnu.org; Mon, 22 Aug 2005 14:40:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E7HDB-0004AK-No for emacs-devel@gnu.org; Mon, 22 Aug 2005 14:39:57 -0400 Original-Received: from [209.73.178.126] (helo=web60318.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1E7GvE-0004sx-8r for emacs-devel@gnu.org; Mon, 22 Aug 2005 14:21:24 -0400 Original-Received: (qmail 28438 invoked by uid 60001); 22 Aug 2005 18:20:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VS6PkpkJB0J1quKAsG/A+u/rUhH81amdOvYRcBpw0LN2xzL6PtNBRoWt8MfCJOyMt0QelL+jdgB50/TZYOkY8x13gAiClYXhQv5kKrqb3b7N6uVLbR7+si4rQRluDUeeOVDrL/UDJc8vaUCFtynD9pWs5PCuT0yNwGHKrFQAzpo= ; Original-Received: from [158.171.31.17] by web60318.mail.yahoo.com via HTTP; Mon, 22 Aug 2005 11:20:30 PDT Original-To: Emacs Devel X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42318 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:42318 --- Michael Mauger wrote: > 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) > There was no feedback on this. The problem could arise with any minor mode that has customized variables. If no one objects, could it be comitted? Thanks. Here's the ChangeLog and final patch: 2005-08-22 Michael R. Mauger * emacs-lisp/easy-mmode.el (define-minor-mode): Add :require property to mode variable if loaded from a file. Index: emacs/lisp/emacs-lisp/easy-mmode.el =================================================================== RCS file: /c/cvsroot/emacs/emacs/lisp/emacs-lisp/easy-mmode.el,v retrieving revision 1.70 diff -c -r1.70 easy-mmode.el *** emacs/lisp/emacs-lisp/easy-mmode.el 22 Jul 2005 01:26:03 -0000 1.70 --- emacs/lisp/emacs-lisp/easy-mmode.el 22 Aug 2005 18:15:29 -0000 *************** *** 214,220 **** ,@type ,@(cond ((not (and curfile require)) nil) ! ((not (eq require t)) `(:require ,require))) ,@(nreverse extra-keywords)))) ;; The actual function. --- 214,222 ---- ,@type ,@(cond ((not (and curfile require)) nil) ! ((not (eq require t)) `(:require ,require)) ! (curfile `(:require ',(intern (file-name-sans-extension ! (file-name-nondirectory curfile)))))) ,@(nreverse extra-keywords)))) ;; The actual function.