;ELC ;;; compiled by jwz@thalidomide on Tue Mar 29 01:59:15 1994 ;;; from file /th/jwz/emacs19/lisp/packages/desktop.el ;;; emacs version 19.10 Lucid (beta10). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defconst desktop-basefilename (byte-code "‡Ç" [system-type ms-dos "emacs.dsk" ".emacs.desktop"] 2) "\ File for Emacs desktop. A directory name will be prepended to this name.") (defvar desktop-missing-file-warning t "\ *If non-nil then issue warning if a file no longer exists. Otherwise simply ignore the file.") (defvar desktop-globals-to-save (list 'desktop-missing-file-warning 'tags-file-name 'tags-table-list) "\ List of global variables to save when killing Emacs.") (defvar desktop-buffers-not-to-save "\\(\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$" "\ Regexp identifying buffers that are to be excluded from saving.") (defvar desktop-buffer-handlers '(desktop-buffer-dired desktop-buffer-rmail desktop-buffer-info desktop-buffer-file) "\ *List of functions to call in order to create a buffer. The functions are called without explicit parameters but may access the the major mode as `mam', the file name as `fn', the buffer name as `bn', the default directory as `dd'. If some function returns non-nil no further functions are called. If the function returns t then the buffer is considered created.") (defvar desktop-dirname nil "\ The directory in which the current desktop file resides.") (defconst desktop-header ";; --------------------------------------------------------------------------\n;; Desktop File for Emacs\n;; --------------------------------------------------------------------------\n" "\ *Header to place in Desktop file.") (defconst postv18 (string-lessp "19" emacs-version) "\ t if Emacs version 19 or later.") (fset 'desktop-clear #[nil " \"" [nil kill-ring kill-ring-yank-pointer mapcar kill-buffer buffer-list] 3 "\ Empty the Desktop." nil]) (byte-code "!\n\" M" [boundp desktop-kill postv18 add-hook kill-emacs-hook old-kill-emacs #[nil " 9 ! " [desktop-kill old-kill-emacs run-hooks] 2] #[nil "!" [desktop-dirname desktop-save] 2]] 3) (fset 'desktop-outvar #[(VAR) " !c p\"c Jp\"c" [boundp VAR "(setq " prin1 " '" ")\n"] 3 "\ Output a setq statement for VAR to the desktop file."]) (fset 'desktop-save-buffer-p #[(filename bufname mode) "\n \"?? >" [filename string-match desktop-buffers-not-to-save bufname mode (Info-mode dired-mode rmail-mode)] 3 "\ Return t if should record a particular buffer for next startup. FILENAME is the visited file name, BUFNAME is the buffer name, and MODE is the major mode."]) (fset 'desktop-save #[(dirname) " \nP! \"! \nq  ӱ\">GGZ!ڱc \" \n!\n!ed\n%, #" [expand-file-name dirname desktop-basefilename mapcar #[(b) "q D ??DD`! ??E     КD Ӛ\"CD " [b buffer-file-name buffer-name quote major-mode overwrite-mode postv18 auto-fill-function auto-fill-hook mark t buffer-read-only truncate-lines fill-column case-fold-search case-replace Info-mode Info-current-file Info-current-node dired-mode mapcar car dired-subdir-alist default-directory] 15] buffer-list get-buffer-create "*desktop*" buf info filename erase-buffer desktop-header ";; Created " current-time-string "\n" ";; Emacs version " emacs-version "\n\n" ";; Global section:\n" desktop-outvar desktop-globals-to-save kill-ring "(setq kill-ring-yank-pointer (nthcdr " int-to-string kill-ring-yank-pointer " kill-ring))\n" "\n;; Buffer section:\n" #[(l) " @ A@ 8A@#c \"c" [desktop-save-buffer-p l 2 "(desktop-buffer" mapcar #[(e) "c\np\"" ["\n " prin1 e] 3] ")\n\n"] 5] default-directory file-exists-p delete-file write-region nil nomessage desktop-dirname] 8 "\ Save the Desktop file. Parameter DIRNAME specifies where to save desktop." "DDirectory to save desktop file in: "]) (fset 'desktop-remove #[nil " P\n!\n!ʼn)" [desktop-dirname desktop-basefilename filename file-exists-p delete-file nil] 2 "\ Delete the Desktop file and inactivate the desktop system." nil]) (fset 'desktop-read #[nil " P!! P!! Pɉ$! )" [nil filename file-exists-p "./" desktop-basefilename expand-file-name desktop-dirname "~/" load t message "Desktop loaded." desktop-clear] 5 "\ Read the Desktop file and the files it specifies." nil]) (fset 'desktop-load-default #[nil "?É#É" [inhibit-default-init load "default" t] 4 "\ Load the `default' start-up library manually. Also inhibit further loading of it. Call this from your `.emacs' file to provide correct modes for autoloaded files."]) (fset 'desktop-buffer-info #[nil "! @ A@\"Ƈ" [mam Info-mode require info Info-find-node misc t] 3 "\ Load an info file."]) (fset 'desktop-buffer-rmail #[nil " !ć" [mam rmail-mode rmail-input fn t] 2 "\ Load a RMAIL file."]) (fset 'desktop-buffer-dired #[nil " @! A\"Ƈ" [mam dired-mode dired misc mapcar dired-maybe-insert-subdir t] 3 "\ Load a directory using dired."]) (fset 'desktop-buffer-file #[nil "!\n\"!!LJȇ" [fn file-exists-p desktop-missing-file-warning y-or-n-p format "File \"%s\" no longer exists. Re-create? " find-file t ignored] 4 "\ Load a file."]) (byte-code "M!" [desktop-buffer #[(fn bn mam mim pt mk ro tl fc cfs cr misc) " @  Ao Ś ! @!! A@!!b:@!A@ !+" [desktop-buffer-handlers nil handler result hlist t buffer-name bn rename-buffer mim overwrite-mode 1 0 auto-fill-mode pt mk set-mark zmacs-activate-region ro buffer-read-only tl truncate-lines fc fill-column cfs case-fold-search cr case-replace] 4] provide desktop] 2)