From xemacs-m  Wed Apr  9 20:33:34 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id UAA17441
	for <xemacs-beta@xemacs.org>; Wed, 9 Apr 1997 20:33:33 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id DAA15888; Thu, 10 Apr 1997 03:33:33 +0200 (MET DST)
Sender: hniksic@public.srce.hr
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: desktop.el is customized
X-URL: ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/
X-Attribution: Hrv
X-Face: &}4JQk=L;e.~x+|eo]#DGk@x3~ed!.~lZ}YQcYb7f[WL9L'Z*+OyA\nA
        EL1M(".[qvI#a2E6WYI5>>e7'@_)3Ol9p|Nn2wNa/;~06jL*B%tTcn/X
        vhAu7qeES0\|MF%$;sI#yn1+y"
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 10 Apr 1997 03:33:32 +0200
Message-ID: <kig7mibwtjn.fsf@jagor.srce.hr>
Lines: 139
X-Mailer: Gnus v5.4.42/XEmacs 19.15

--- lisp/packages/desktop.el.orig	Thu Apr 10 03:23:17 1997
+++ lisp/packages/desktop.el	Thu Apr 10 03:30:58 1997
@@ -108,17 +108,24 @@
 ;; ----------------------------------------------------------------------------
 ;; USER OPTIONS -- settings you might want to play with.
 ;; ----------------------------------------------------------------------------
+
+(defgroup desktop nil
+  "Save partial status of Emacs when killed"
+  :group 'frames)
+
 (defconst desktop-basefilename
   (if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))
       "emacs.dsk" ; Ms-Dos does not support multiple dots in file name
     ".emacs.desktop")
   "File for Emacs desktop, not including the directory name.")
 
-(defvar desktop-missing-file-warning t
+(defcustom desktop-missing-file-warning t
   "*If non-nil then desktop warns when a file no longer exists.
-Otherwise it simply ignores that file.")
+Otherwise it simply ignores that file."
+  :type 'boolean
+  :group 'desktop)
 
-(defvar desktop-globals-to-save
+(defcustom desktop-globals-to-save
   (list 'desktop-missing-file-warning
 	;; Feature: saving kill-ring implies saving kill-ring-yank-pointer
 	;; 'kill-ring
@@ -133,9 +140,13 @@
 An element may be variable name (a symbol)
 or a cons cell of the form  (VAR . MAX-SIZE),
 which means to truncate VAR's value to at most MAX-SIZE elements
-\(if the value is a list) before saving the value.")
+\(if the value is a list) before saving the value."
+  :type '(repeat (choice (symbol :tag "Variable")
+			 (cons (symbol :tag "Variable")
+			       (integer :tag "Size"))))
+  :group 'desktop)
 
-(defvar desktop-locals-to-save
+(defcustom desktop-locals-to-save
   (list 'desktop-locals-to-save		; Itself!  Think it over.
         'truncate-lines
 	'case-fold-search
@@ -146,35 +157,49 @@
 	'line-number-mode
 	)
   "List of local variables to save for each buffer.
-The variables are saved only when they really are local.")
+The variables are saved only when they really are local."
+  :type '(repeat (choice (symbol :tag "Variable")
+			 (cons (symbol :tag "Variable")
+			       (integer :tag "Size"))))
+  :group 'desktop)
 (make-variable-buffer-local 'desktop-locals-to-save)
 
 ;; We skip .log files because they are normally temporary.
 ;;         (ftp) files because they require passwords and whatnot.
 ;;         TAGS files to save time (tags-file-name is saved instead).
-(defvar desktop-buffers-not-to-save
+(defcustom desktop-buffers-not-to-save
  "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$"
- "Regexp identifying buffers that are to be excluded from saving.")
+ "Regexp identifying buffers that are to be excluded from saving."
+ :type 'regexp
+ :group 'desktop)
 
 ;; Skip ange-ftp files
-(defvar desktop-files-not-to-save
+(defcustom desktop-files-not-to-save
   "^/[^/:]*:"
-  "Regexp identifying files whose buffers are to be excluded from saving.")
-
-(defvar desktop-buffer-major-mode nil
-  "When desktop creates a buffer, this holds the desired Major mode.")
-
-(defvar desktop-buffer-file-name nil
-  "When desktop creates a buffer, this holds the file name to visit.")
-
-(defvar desktop-buffer-name nil
-  "When desktop creates a buffer, this holds the desired buffer name.")
+  "Regexp identifying files whose buffers are to be excluded from saving."
+  :type 'regexp
+  :group 'desktop)
+
+(defcustom desktop-buffer-major-mode nil
+  "When desktop creates a buffer, this holds the desired Major mode."
+  :type 'symbol
+  :group 'desktop)
+
+(defcustom desktop-buffer-file-name nil
+  "When desktop creates a buffer, this holds the file name to visit."
+  :type '(choice file (const nil))
+  :group 'desktop)
+
+(defcustom desktop-buffer-name nil
+  "When desktop creates a buffer, this holds the desired buffer name."
+  :type '(choice string (const nil))
+  :group 'desktop)
 
 (defvar desktop-buffer-misc nil
   "When desktop creates a buffer, this holds a list of misc info.
 It is used by the `desktop-buffer-handlers' functions.")
 
-(defvar desktop-buffer-handlers
+(defcustom desktop-buffer-handlers
   '(desktop-buffer-dired
     desktop-buffer-rmail
     desktop-buffer-mh
@@ -185,14 +210,18 @@
 variables `desktop-buffer-major-mode', `desktop-buffer-file-name',
 `desktop-buffer-name'.
 If one function returns non-nil, no further functions are called.
-If the function returns t then the buffer is considered created.")
+If the function returns t then the buffer is considered created."
+  :type '(repeat function)
+  :group 'desktop)
 
 (defvar desktop-create-buffer-form "(desktop-create-buffer 205"
   "Opening of form for creation of new buffers.")
 
-(defvar desktop-save-hook nil
+(defcustom desktop-save-hook nil
   "Hook run before saving the desktop to allow you to cut history lists and
-the like shorter.")
+the like shorter."
+  :type 'hook
+  :group 'desktop)
 ;; ----------------------------------------------------------------------------
 (defvar desktop-dirname nil
   "The directory in which the current desktop file resides.")

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
* Q: What is an experienced Emacs user?
* A: A person who wishes that the terminal had pedals.

