unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A few questions about desktop.el
@ 2005-07-22  2:42 Juanma Barranquero
  2005-07-22 10:53 ` Juanma Barranquero
                   ` (4 more replies)
  0 siblings, 5 replies; 72+ messages in thread
From: Juanma Barranquero @ 2005-07-22  2:42 UTC (permalink / raw)


(These questions are mainly for Lars Hansen, who did most of the
recent cleanup work on desktop.el)

I'm having a few problems with highlight-changes-mode, which is a
not-very-standard minor mode.

I do (global-highlight-changes 'passive) on my .emacs, so most buffers
have a local `highlight-changes-mode' variable with value 'passive.
Logically, `highlight-changes-mode' goes to the minor-modes list in
.emacs.desktop, and it gets restored by calling
(highlight-changes-mode 1)... so highlight-changes-mode is active on
all buffers after loading Emacs :)

I can fix it with the attached patch. Is it reasonable to add to
desktop.el code to deal with minor modes from the Emacs library, or
should it be done in hilit-chg.el or the user's .emacs?

The other question is: why does `desktop-save' save `nil' for active
minor-modes which do appear in `desktop-minor-mode-table' as
non-restorable? I mean, why

  (let ((special (assq minor-mode desktop-minor-mode-table)))
    (when (or special (functionp minor-mode))
      (setq ret
            (cons
             (if special (cadr special) minor-mode)
             ret))))

instead of simply

  (let ((special (cadr (assq minor-mode desktop-minor-mode-table))))
    (when (or special (functionp minor-mode))
      (add-to-list 'ret (or special minor-mode))))

which wouldn't save nil values to the minor-mode list?

-- 
                    /L/e/k/t/u


Index: lisp/desktop.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/desktop.el,v
retrieving revision 1.88
diff -u -2 -r1.88 desktop.el
--- lisp/desktop.el	21 Jul 2005 11:49:32 -0000	1.88
+++ lisp/desktop.el	22 Jul 2005 02:27:41 -0000
@@ -229,5 +229,6 @@
     change-log-default-name
     line-number-mode
-    buffer-file-coding-system)
+    buffer-file-coding-system
+    highlight-changes-mode)
   "List of local variables to save for each buffer.
 The variables are saved only when they really are local."
@@ -346,5 +347,6 @@
  (defcustom desktop-minor-mode-table
   '((auto-fill-function auto-fill-mode)
-    (vc-mode nil))
+    (vc-mode nil)
+    (highlight-changes-mode nil))
   "Table mapping minor mode variables to minor mode functions.
 Each entry has the form (NAME RESTORE-FUNCTION).

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2007-06-12 11:21 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-22  2:42 A few questions about desktop.el Juanma Barranquero
2005-07-22 10:53 ` Juanma Barranquero
2005-07-22 22:52   ` Richard M. Stallman
2005-07-26  8:56     ` Juanma Barranquero
2005-07-27 14:03       ` Richard M. Stallman
2005-07-27 14:28         ` Juanma Barranquero
2005-07-28  3:20           ` Richard M. Stallman
2005-07-28  7:34             ` David Kastrup
2005-07-28 12:51               ` Juanma Barranquero
2005-07-29  0:11               ` Richard M. Stallman
2005-07-28  3:20           ` Richard M. Stallman
2005-07-29  0:37             ` Juanma Barranquero
2005-07-28  4:24           ` Masatake YAMATO
2006-04-27 23:05           ` Stuart D. Herring
2006-04-28 14:56             ` Juanma Barranquero
2006-04-29  4:57               ` Stuart D. Herring
2006-04-30  1:16                 ` Juanma Barranquero
2006-05-02 15:06                   ` Stuart D. Herring
2006-05-02 15:14                     ` Juanma Barranquero
2006-05-02 15:42                       ` Stuart D. Herring
2006-05-02 17:57                         ` Stuart D. Herring
2006-04-28 15:44             ` Richard Stallman
2006-04-29  5:02               ` Stuart D. Herring
2006-04-30  3:03                 ` Richard Stallman
2006-05-03 12:48               ` Juri Linkov
2006-05-03 14:37                 ` Lars Hansen
2006-05-03 20:43                   ` Richard Stallman
2006-05-04 16:27                   ` Stuart D. Herring
2006-05-05  6:44                     ` Lars Hansen
2007-06-05  9:24                     ` Juanma Barranquero
2007-06-08 21:17                       ` Davis Herring
2007-06-08 21:29                         ` Juanma Barranquero
2007-06-08 22:05                           ` Davis Herring
2007-06-08 22:14                         ` Juri Linkov
2007-06-09  0:51                           ` Davis Herring
2007-06-09 21:31                             ` Juri Linkov
2007-06-10 23:28                               ` Juanma Barranquero
2007-06-11 20:54                                 ` Juri Linkov
2007-06-12 11:21                                   ` Juanma Barranquero
2006-05-04 16:17                 ` Stuart D. Herring
2005-08-08 15:02   ` Lars Hansen
2005-07-22 13:50 ` Juanma Barranquero
2005-07-22 14:36   ` Juanma Barranquero
2005-07-26  8:27     ` Juanma Barranquero
2005-08-08 15:04     ` Lars Hansen
2005-07-22 19:11 ` Lars Hansen
2005-07-22 21:24   ` Juanma Barranquero
2005-07-22 22:50 ` Richard M. Stallman
2005-07-26  9:11   ` Juanma Barranquero
2005-07-27 14:04     ` Richard M. Stallman
2005-07-27 14:16       ` Juanma Barranquero
2005-07-28  3:20         ` Richard M. Stallman
2005-07-29  0:44           ` Juanma Barranquero
2005-08-10  9:50         ` Lars Hansen
2005-08-10 11:24           ` Juanma Barranquero
2006-02-09 16:30             ` Juanma Barranquero
2006-02-09 20:00               ` Lars Hansen
2006-02-09 21:11               ` Lars Hansen
2006-02-09 23:46                 ` Juanma Barranquero
2005-08-10 22:05           ` Luc Teirlinck
2005-08-10 23:45             ` Luc Teirlinck
2005-08-11  1:12               ` Luc Teirlinck
2005-08-11  1:36                 ` Luc Teirlinck
2005-08-11  3:01                 ` Luc Teirlinck
2005-08-11  6:12                   ` Lars Hansen
2005-08-08 14:51 ` Lars Hansen
2005-08-08 18:35   ` Juanma Barranquero
2005-08-09  7:12     ` Lars Hansen
2005-08-09  7:36       ` Lars Hansen
2005-08-09  8:49       ` Juanma Barranquero
2005-08-09  9:31         ` David Kastrup
2005-08-09  9:59           ` Juanma Barranquero

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).