[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: desktop.el and minor modes
From: |
Lars Hansen |
Subject: |
Re: desktop.el and minor modes |
Date: |
Mon, 31 May 2004 12:20:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk |
Juri Linkov wrote:
desktop.el saves variable names to the minor-modes slot of
`desktop-create-buffer', but those variables can't be funcalled
when desktop is restored.
The conventions for minor modes is that the same symbol should be used
for the mode variable as for the enabling function.
Those minor modes having a different name for the toggling function,
should have be listed in desktop-minor-modes-table.
Perhaps `desktop-save' should check if a symbol from
`minor-mode-alist' is a function in case if there is no corresponding
variable-to-function mapping in `desktop-minor-mode-table'?
When desktop restores a buffer, it checks if there is a function
definition for each symbol in desktop-buffer-minor-modes before calling it.
I don't see why doing this check at desktop-save should be better.
The problem with dired-omit-files-p is that it does not follow the
conventions.
Rather than hacking desktop to work around this, I think dired-x should
be changed.
The result is much cleaner.
I suggest something like:
1. Rename variable dired-omit-files-p to dired-omit-mode
2. Replace function dired-omit-toggle with functions
- dired-omit-mode following the convention for the argument
- dired-mark-omit marking files to omit