From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: How to save minor mode in Desktop? Date: Mon, 02 May 2005 09:09:33 -0600 Message-ID: References: <1114831942.001180.32700@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115046555 26923 80.91.229.2 (2 May 2005 15:09:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 May 2005 15:09:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 02 17:09:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DScWq-0003hi-JZ for geh-help-gnu-emacs@m.gmane.org; Mon, 02 May 2005 17:08:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DScdl-00040I-O4 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 May 2005 11:15:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DScdN-0003yQ-2P for help-gnu-emacs@gnu.org; Mon, 02 May 2005 11:14:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DScdK-0003x9-Jk for help-gnu-emacs@gnu.org; Mon, 02 May 2005 11:14:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DScdK-0003wa-9s for help-gnu-emacs@gnu.org; Mon, 02 May 2005 11:14:54 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DScfM-00064i-62 for help-gnu-emacs@gnu.org; Mon, 02 May 2005 11:17:00 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DScTh-00036R-7y for help-gnu-emacs@gnu.org; Mon, 02 May 2005 17:04:57 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 May 2005 17:04:57 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 May 2005 17:04:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 20 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <1114831942.001180.32700@o13g2000cwo.googlegroups.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26169 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26169 heriberaht wrote: > I use desktop.el to save emacs sessions, but minor-mode is lost after > restart. how to correct this? The two minor mode I want to keep is > setnu-mode and matlab-eei-minor-mode. > > Looking forward to all of your valuable advices, thanks. desktop.el itself seems to suggest that you should frob desktop-minor-mode-table: ;; Some words on minor modes: Most minor modes are controlled by ;; buffer-local variables, which have a standard save / restore ;; mechanism. To handle all minor modes, we take the following ;; approach: (1) check whether the variable name from ;; `minor-mode-alist' is also a function; and (2) use translation ;; table `desktop-minor-mode-table' in the case where the two names ;; are not the same. -- Kevin Rodgers