[Top][All Lists]

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

Re: A few questions about desktop.el

From: Lars Hansen
Subject: Re: A few questions about desktop.el
Date: Thu, 09 Feb 2006 22:11:17 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20051002)

>About seven months ago, I said:
>>You got my vote. I've been testing it and everything seems
>>to work, even the corner cases of `highlight-changes-mode'.
>Now, either I was mistaken then or something's changed in between,
>because h-c-m and desktop.el *do* have a problem.
>With a simple .emacs.el like this:
>;--------- .emacs.el -----------
>(setq desktop-save t)
>(desktop-save-mode 1)
>(setq highlight-changes-global-initial-state 'passive)
>(global-highlight-changes 'passive)
>The steps to reproduce the problem:
> - Start Emacs.
>  - Load a file (for example, .emacs.el). => It is in "-Chg" mode,
>i.e., passive.
> - Exit Emacs.
>  - Start Emacs. => .emacs.el is loaded, in "+Chg" mode (active)
>  - M-x hilight-changes-mode RET => .emacs.el is in "-Chg" mode.
> - Exit Emacs.
>  - Start Emacs. => .emacs.el is loaded, in "-Chg" mode (finally).
>                    /L/e/k/t/u
I believe the problem should be fixed by now.

Here is the explanation: highlight-changes-mode must be added to
desktop-locals-to-save in order to be saved in the desktop file. To do
this I originally placed

   (add-to-list 'desktop-locals-to-save 'highlight-changes-mode)

inside the function highlight-changes-mode. Therefore things worked when
this function was called, but not when global-highlight-changes was
called. Now I have moved the line out of highlight-changes-mode and
placed it at top level so it is executed at load.

reply via email to

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