;ELC ;;; compiled by roland@churchy.gnu.ai.mit.edu on Fri Jul 8 15:58:04 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/desktop.el ;;; emacs version 19.25.12. ;;; bytecomp version FSF 2.10 ;;; 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 "`/gd/gnu/emacs/19.0/lisp/desktop.el' 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 (quote desktop-missing-file-warning) (quote tags-file-name) (quote tags-table-list) (quote search-ring) (quote regexp-search-ring) (quote register-alist)) "\ List of global variables to save when killing Emacs.") (defvar desktop-locals-to-save (list (quote desktop-locals-to-save) (quote truncate-lines) (quote case-fold-search) (quote case-replace) (quote fill-column) (quote overwrite-mode) (quote change-log-default-name) (quote line-number-mode)) "\ List of local variables to save for each buffer. The variables are saved only when they really are local.") (make-variable-buffer-local (quote desktop-locals-to-save)) (defvar desktop-buffers-not-to-save "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$" "\ Regexp identifying buffers that are to be excluded from saving.") (defvar desktop-files-not-to-save "^/[^/:]*:" "\ Regexp identifying files whose buffers are to be excluded from saving.") (defvar desktop-buffer-handlers (quote (desktop-buffer-dired desktop-buffer-rmail desktop-buffer-mh 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-create-buffer-form "(desktop-create-buffer 205" "\ Opening of form for creation of new buffers.") (defvar desktop-save-hook nil "\ Hook run before saving the desktop to allow you to cut history lists and the like shorter.") (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.") (defvar desktop-delay-hook nil "\ Hooks run after all buffers are loaded; intended for internal use.") (defalias 'desktop-truncate #[(l n) "S : \ná)" [n l here nil] 3 "\ Truncate LIST to at most N elements destructively."]) (defalias 'desktop-clear #[nil " \" " [nil kill-ring kill-ring-yank-pointer search-ring search-ring-yank-pointer regexp-search-ring regexp-search-ring-yank-pointer mapcar kill-buffer buffer-list delete-other-windows] 3 "\ Empty the Desktop." nil]) (byte-code "\"\"" [add-hook kill-emacs-hook desktop-kill defalias #[nil "Ï" [desktop-dirname err (desktop-save desktop-dirname) ((file-error (byte-code "!? @ A\"" [yes-or-no-p "Error while saving the desktop. Quit anyway? " signal err] 3)))] 3]] 3) (defalias 'desktop-internal-v2s #[(val) ";=!B9%!B!T\"\nG\n#QBR\n#QB*:Ɖ:@!y@?B)Ac!@@?@=ۂA@=ۂAϰBAAQB*#QB#QB+!!OQB!>!!!!!)**)*BB" [val t may prin1-to-string must vectorp nil special mapcar #[(el) " !@ \n)" [desktop-internal-v2s el res t special] 3] pass1 "(vector " mapconcat #[(el) "@=\fAPA" [el must "'"] 2] " " ")" "[" cdr "]" anynil newlist p desktop-internal-v2s q\.txt el last "(cons " "'" "" " . " "(list " #[(el) "@=\fAPA" [el must "'"] 2] "(" subrp "(symbol-function '" 7 -1 markerp marker-position buffer-name marker-buffer buf pos "(let ((mk (make-marker)))" " (add-hook 'desktop-delay-hook" " (list 'lambda '() (list 'set-marker mk " " (get-buffer " ")))) mk)" "\"Unprintable entity\""] 10 "\ Convert VALUE to a pair (quote . txt) where txt is a string that when read and evaluated yields value. quote may be 'may (value may be quoted), 'must (values must be quoted), or nil (value may not be quoted)."]) (defalias 'desktop-value-to-string #[(val) " !@A= P\"-" [t print-escape-newlines nil float-output-format desktop-internal-v2s val quote\.txt quote txt must "'"] 3 "\ Convert VALUE to a string that when read evaluates to the same value. Not all types of values are supported."]) (defalias 'desktop-outvar #[(var) " ! ! J!Ʊ" [boundp var "(setq " symbol-name " " desktop-value-to-string ")\n"] 5 "\ Output a setq statement for VAR to the desktop file."]) (defalias 'desktop-save-buffer-p #[(filename bufname mode &rest dummy) "\n\f \"\n\"?7=. !q\n\")?7\n?7>)" [nil case-fold-search filename string-match desktop-buffers-not-to-save bufname desktop-files-not-to-save mode dired-mode get-buffer default-directory (Info-mode rmail-mode)] 3 "\ Return t if the desktop 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."]) (defalias 'desktop-save #[(dirname) "! \fP! \"!\n \f\nq  ձ\">IGGZ!ܱc \" \f!a\f!ed\f%, %" [run-hooks desktop-save-hook expand-file-name dirname desktop-basefilename mapcar #[(b) "q \f??C`!D =#\n D/ =/\" o@TBe@e@B)A>+ " [b buffer-file-name buffer-name major-mode auto-fill-function mark t mark-active buffer-read-only Info-mode Info-current-file Info-current-node dired-mode mapcar car dired-subdir-alist desktop-locals-to-save buffer-local-variables nil ll loclist locals here] 12] 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) "\n\" c\n\"c" [apply desktop-save-buffer-p l desktop-create-buffer-form mapcar #[(e) "\n!" ["\n " desktop-value-to-string e] 3] ")\n\n"] 3] 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: "]) (defalias 'desktop-remove #[nil " P\n!\n!)" [desktop-dirname desktop-basefilename filename nil file-exists-p delete-file] 2 "\ Delete the Desktop file and inactivate the desktop system." nil]) (defalias 'desktop-read #[nil "\fP!!%\fP!\"!%>\fPɉ$!!@ )" [nil filename file-exists-p "./" desktop-basefilename expand-file-name desktop-dirname "~/" load t run-hooks desktop-delay-hook message "Desktop loaded." desktop-clear] 5 "\ Read the Desktop file and the files it specifies." nil]) (defalias '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."]) (defalias 'desktop-buffer-info #[nil "=! @ A@\"Ƈ" [mam Info-mode require info Info-find-node misc t] 3 "\ Load an info file."]) (defalias 'desktop-buffer-rmail #[nil "=\nď" [mam rmail-mode error (byte-code " !‡" [rmail-input fn t] 2) ((file-locked (byte-code "p!" [kill-buffer ignored] 2)))] 3 "\ Load an RMAIL file."]) (defalias 'desktop-buffer-mh #[nil "=! !LJ" [mam mh-folder-mode require mh-e mh-find-path mh-visit-folder bn t] 2 "\ Load a folder in the mh system."]) (defalias 'desktop-buffer-dired #[nil "='\f@!!\f@!\fA\"ȇ\f@\"!͇" [mam dired-mode file-directory-p directory-file-name misc dired mapcar dired-maybe-insert-subdir t message "Directory %s no longer exists." sit-for 1 ignored] 3 "\ Load a directory using dired."]) (defalias '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 "\"\"!" [defalias desktop-create-buffer #[(ver fn bn mam mim pt mk ro misc &optional locals) " \f\f@ \fA = -!\n@8˂9! b:T@!A@Y!b@:@!@AL!!)Ag+" [desktop-buffer-handlers nil handler result hlist t buffer-name bn rename-buffer auto-fill-mode mim 1 0 pt mk set-mark mark-active ro buffer-read-only locals this make-local-variable makunbound] 4] desktop-buffer #[(fn bn mam mim pt mk ro tl fc cfs cr misc) "\n \f A  B BBB @B&\n" [desktop-create-buffer 205 fn bn mam mim pt mk ro misc truncate-lines tl fill-column fc case-fold-search cfs case-replace cr overwrite-mode] 16] provide desktop] 3)