;ELC ;;; compiled by jwz@thalidomide on Fri Dec 31 02:01:20 1993 ;;; from file /th/jwz/emacs19/lisp/packages/file-part.el ;;; emacs version 19.9 Lucid (beta9). ;;; 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.")) (byte-code "!##" [provide file-part put file-part-error error-conditions (error file-part-error) error-message "File part error"] 4) (defvar file-part-extent-alist nil "\ Alist of file parts in the current buffer. Each element of the alist maps an extent describing the file part to the buffer containing the file part. DON'T MODIFY THIS.") (byte-code "!\"" [make-variable-buffer-local file-part-extent-alist set-default nil] 3) (defvar file-part-master-extent nil "\ Extent this file part refers to in the master buffer. NIL if this buffer is not a file part. The master buffer itself can be found by calling `extent-buffer' on this extent. DON'T MODIFY THIS.") (byte-code "!\" BMM" [make-variable-buffer-local file-part-master-extent set-default nil minor-mode-alist ((file-part-master-extent " File-part")) file-part-maptrue #[(fn list) "\n@!\nA\"" [list nil fn file-part-maptrue] 3] file-part-buffer-from-arg #[(arg) " p!" [get-buffer arg] 2]] 3) (fset 'make-file-part #[(&optional start end name buffer) " !\ne d !P\n V? q!!!\"\"\n\" D\"\n \" !#BB! !P!!!!\"\"\n$ \n #\"!*" [file-part-buffer-from-arg buffer start end name buffer-name "-part" make-local-variable write-contents-hooks kill-buffer-hook revert-buffer-function add-hook write-master-buffer-hook kill-master-buffer-hook revert-master-buffer-function file-part-maptrue #[(x) " @! @! X X Y Y?*" [extent-start-position x extent-end-position e b start end] 4] file-part-extent-alist signal file-part-error "Overlapping file parts not allowed" make-extent generate-new-buffer filebuf x set-extent-property read-only t switch-to-buffer "File part on " buffer-file-name write-file-hooks first-change-hook write-file-part-hook kill-file-part-hook revert-file-part-function file-part-master-extent insert-buffer-substring file-part-first-change-hook set-buffer-modified-p nil] 4 "\ Make a file part on buffer BUFFER out of the region. Call it NAME. This command creates a new buffer containing the contents of the region and marks the buffer as referring to the specified buffer, called the `master buffer'. When the file-part buffer is saved, its changes are integrated back into the master buffer. When the master buffer is deleted, all file parts are deleted with it. When called from a function, expects four arguments, START, END, NAME, and BUFFER, all of which are optional and default to the beginning of BUFFER, the end of BUFFER, a name generated from BUFFER's name, and the current buffer, respectively." "r\nsName of file part: "]) (fset 'kill-file-part-hook #[nil "p\n!q\n B \"\n!)*" [file-part-master-extent buf x extent-buffer delete file-part-extent-alist delete-extent] 4 "\ Hook to be called when a file-part buffer is killed. Removes the file part from the master buffer's list of file parts."]) (fset 'kill-all-file-parts #[(&optional bufname no-ask) " ! q\n !!! \")" [file-part-buffer-from-arg bufname no-ask file-parts-modified-p y-or-n-p gettext "Buffer has modified file parts; kill anyway? " mapcar #[(x) "Aq!A!" [x set-buffer-modified-p nil kill-buffer] 2] file-part-extent-alist] 3 "\ Kill all file parts on buffer BUFNAME. The argument may be a buffer or the name of a buffer. If one or more of the file parts needs saving, prompts for confirmation unless optional second argument NO-ASK is non-nil. BUFFER defaults to the current buffer if not specified." "b"]) (fset 'kill-master-buffer-hook #[nil "p\"" [kill-all-file-parts t] 3 "\ Hook to be called when a master buffer is killed. Kills the associated file parts."]) (fset 'file-part-check-attached #[(x) "\" !!ʇ" [x nil extent-property detached kill-file-part-hook buffer-file-name file-part-master-extent message gettext "File part has become detached." t] 3]) (fset 'write-file-part-hook #[nil "pdeZ?? ! ! ! !q # b !\n \\\n\\| # q!! ! !!#!+ ," [file-part-master-extent retval len buf x file-part-check-attached extent-start-position extent-end-position e b extent-buffer set-extent-property read-only nil insert-buffer-substring t set-buffer-modified-p message format gettext "Wrote file part %s on %s" buffer-name] 7 "\ Hook to be called when a file part is saved. Saves the file part into the master buffer."]) (fset 'write-master-buffer-hook #[nil " " [save-some-file-part-buffers nil] 1 "\ Hook to be called when a master buffer is saved. If there are modified file parts on the buffer, optionally saves the file parts back into the buffer."]) (fset 'save-some-file-part-buffers #[(&optional arg buffer) " !\n ! @A!!! !#!Ϗ) AU*" [file-part-buffer-from-arg buffer file-part-extent-alist buffer-name name alist buf buffer-modified-p arg y-or-n-p format gettext "Save file part %s on %s? " nil (byte-code "q )" [buf save-buffer] 1) ((error))] 7 "\ Save some modified file-part buffers on BUFFER. Asks user about each one. Optional argument (the prefix) non-nil means save all with no questions. BUFFER defaults to the current buffer if not specified." "p"]) (fset 'file-parts-modified-p #[(&optional buffer) "q \")" [buffer file-part-maptrue #[(x) " A!" [buffer-modified-p x] 2] file-part-extent-alist] 3 "\ Return true if BUFFER has any modified file parts on it. BUFFER defaults to the current buffer if not specified."]) (fset 'revert-file-part-function #[(&optional check-auto noconfirm) " ! ! ! !\"! ! ! !#! q !*))" [file-part-master-extent x file-part-check-attached extent-buffer master noconfirm yes-or-no-p format gettext "Revert file part from master buffer %s? " buffer-name erase-buffer buffer-modified-p mod insert-buffer-substring extent-start-position extent-end-position set-buffer-modified-p nil] 5 "\ Hook to be called when a file part is reverted. Reverts the file part from the master buffer."]) (fset 'revert-master-buffer-function #[(&optional check-auto noconfirm) " !! ?\")" [noconfirm file-part-extent-alist message "Warning: file parts will become detached." sleep-for 2 nil revert-buffer-function revert-buffer check-auto] 3 "\ Hook to be called when a master-buffer is reverted. Makes sure the user is aware that the file parts will become detached, then proceeds as normal."]) (fset 'file-part-first-change-hook #[nil " ! !q!))" [file-part-master-extent x file-part-check-attached extent-buffer set-buffer-modified-p t] 2 "\ Hook to be called when a file part is first modified. Marks the master buffer as modified."])