[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/desktop.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/desktop.el |
Date: |
Mon, 04 Nov 2002 03:20:01 -0500 |
Index: emacs/lisp/desktop.el
diff -c emacs/lisp/desktop.el:1.49 emacs/lisp/desktop.el:1.50
*** emacs/lisp/desktop.el:1.49 Mon Mar 11 04:15:27 2002
--- emacs/lisp/desktop.el Mon Nov 4 03:19:59 2002
***************
*** 471,476 ****
--- 471,481 ----
(and (null filename)
(memq mode desktop-buffer-modes-to-save))))))
;;
----------------------------------------------------------------------------
+ (defcustom desktop-relative-file-names nil
+ "*Store relative file names in the desktop file."
+ :type 'boolean
+ :group 'desktop)
+
(defun desktop-save (dirname)
"Save the Desktop file. Parameter DIRNAME specifies where to save desktop."
(interactive "DDirectory to save desktop file in: ")
***************
*** 481,522 ****
(mapcar
(function
(lambda (b)
! (set-buffer b)
! (list
! (buffer-file-name)
! (buffer-name)
! major-mode
! ;; minor modes
! (let (ret)
! (mapcar
! #'(lambda (mim)
! (and (boundp mim)
! (symbol-value mim)
! (setq ret
! (cons (let ((special (assq mim
desktop-minor-mode-table)))
! (if special
! (cadr special)
! mim))
! ret))))
! (mapcar #'car minor-mode-alist))
! ret)
! (point)
! (list (mark t) mark-active)
! buffer-read-only
! (run-hook-with-args-until-success
! 'desktop-buffer-misc-functions)
! (let ((locals desktop-locals-to-save)
! (loclist (buffer-local-variables))
! (ll))
! (while locals
! (let ((here (assq (car locals) loclist)))
! (if here
! (setq ll (cons here ll))
! (if (member (car locals) loclist)
! (setq ll (cons (car locals) ll)))))
! (setq locals (cdr locals)))
! ll)
! )))
(buffer-list))))
(buf (get-buffer-create "*desktop*")))
(set-buffer buf)
--- 486,531 ----
(mapcar
(function
(lambda (b)
! (set-buffer b)
! (list
! (let ((bn (buffer-file-name)))
! (if bn
! (if desktop-relative-file-names
! (file-relative-name bn dirname)
! bn)))
! (buffer-name)
! major-mode
! ;; minor modes
! (let (ret)
! (mapcar
! #'(lambda (mim)
! (and (boundp mim)
! (symbol-value mim)
! (setq ret
! (cons (let ((special (assq mim
desktop-minor-mode-table)))
! (if special
! (cadr special)
! mim))
! ret))))
! (mapcar #'car minor-mode-alist))
! ret)
! (point)
! (list (mark t) mark-active)
! buffer-read-only
! (run-hook-with-args-until-success
! 'desktop-buffer-misc-functions)
! (let ((locals desktop-locals-to-save)
! (loclist (buffer-local-variables))
! (ll))
! (while locals
! (let ((here (assq (car locals) loclist)))
! (if here
! (setq ll (cons here ll))
! (if (member (car locals) loclist)
! (setq ll (cons (car locals) ll)))))
! (setq locals (cdr locals)))
! ll)
! )))
(buffer-list))))
(buf (get-buffer-create "*desktop*")))
(set-buffer buf)
***************
*** 537,551 ****
(insert "\n;; Buffer section:\n")
(mapcar
(function (lambda (l)
! (if (apply 'desktop-save-buffer-p l)
! (progn
! (insert desktop-create-buffer-form)
! (mapcar
! (function (lambda (e)
! (insert "\n "
! (desktop-value-to-string e))))
! l)
! (insert ")\n\n")))))
info)
(setq default-directory dirname)
(if (file-exists-p filename) (delete-file filename))
--- 546,560 ----
(insert "\n;; Buffer section:\n")
(mapcar
(function (lambda (l)
! (if (apply 'desktop-save-buffer-p l)
! (progn
! (insert desktop-create-buffer-form)
! (mapcar
! (function (lambda (e)
! (insert "\n "
! (desktop-value-to-string e))))
! l)
! (insert ")\n\n")))))
info)
(setq default-directory dirname)
(if (file-exists-p filename) (delete-file filename))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/desktop.el,
Juanma Barranquero <=