;ELC ;;; compiled by jwz@thalidomide on Mon May 23 23:49:19 1994 ;;; from file /th/jwz/emacs19/lisp/packages/sccs.el ;;; emacs version 19.10 Lucid (beta25). ;;; bytecomp version 2.24; 26-Apr-94. ;;; 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.")) (defvar sccs-bin-directory nil "\ *Directory that holds the SCCS executables. Initialized automatically the first time you execute an SCCS command, if not already set.") (defvar sccs-max-log-size 510 "\ *Maximum allowable size of an SCCS log message.") (defvar sccs-diff-command '("diff" "-c") "\ *The command/flags list to be used in constructing SCCS diff commands.") (defvar sccs-headers-wanted '("%W%") "\ *SCCS header keywords to be inserted when sccs-insert-header is executed.") (defvar sccs-insert-static t "\ *Insert a static character string when inserting SCCS headers in C mode.") (defvar sccs-mode-expert nil "\ *Treat user as expert; suppress yes-no prompts on some things.") (byte-code "!!‡" [boundp sccs-log-entry-mode nil sccs-current-major-version] 2) (fset 'sccs-name #[(file &optional letter) " !! !!$" [format "%sSCCS/%s.%s" file-name-directory expand-file-name file letter "s" file-name-nondirectory] 7 "\ Return the sccs-file name corresponding to a given file."]) (fset 'sccs-lock-info #[(file index) " \" ! !!\"eb y``{!p!))" [sccs-name file "p" pfile file-exists-p find-file auto-save-mode nil replace-string " " "\n" index set-buffer-modified-p kill-buffer] 3 "\ Return the nth token in a file's SCCS-lock information."]) (fset 'sccs-locking-user #[(file) " \"" [sccs-lock-info file 2] 3 "\ Return the name of the person currently holding a lock on FILE. Return nil if there is no such person."]) (fset 'sccs-locked-revision #[(file) " \"" [sccs-lock-info file 1] 3 "\ Return the revision number currently locked for FILE, nil if none such."]) (byte-code "MMMMM" [error-occurred (macro . #[(&rest body) " \"BF" [condition-case nil progn append body (nil) (error t)] 6]) chmod (macro . #[(perms file) "‰ " [call-process "chmod" nil perms file] 7]) sccs-save-vars #[(sid) "! ű )" [find-file "SCCS/emacs-vars.el" erase-buffer "(setq sccs-current-major-version \"" sid "\")" basic-save-buffer] 3] sccs-load-vars #[nil "É" [nil (byte-code "!‡" [load-file "SCCS/emacs-vars.el" nil] 2) ((error t)) "1" sccs-current-major-version] 3] sccs-init-bin-directory #[nil "!ª!Ī!ª!ƪĉ" [file-executable-p "/usr/sccs/unget" "/usr/sccs" "/usr/bin/unget" "/usr/bin" file-directory-p "/usr/bin/sccs" sccs-bin-directory] 2]] 2) (fset 'sccs-get-version #[(file sid) " \"\n!ɏ? qed\n%\n) !*" [nil vbuf oldversion sccs-name file sid "new" create-file-buffer (byte-code " P&ȇ" [sccs-do-command vbuf "get" file sid "-r" "-p" "-s" nil] 7) ((error t)) write-region t 0 kill-buffer] 6 "\ For the given FILE, retrieve a copy of the version with given SID. The text is retrieved into a tempfile. Return the tempfile name, or nil if no such version exists."]) (fset 'sccs-mode-line #[(file) "\n\"!\n!\" q)!" [file-exists-p sccs-name file "p" format " " sccs-locked-revision "" mode-line-process other-buffer sit-for 0] 4 "\ Set the mode line for an SCCS buffer. FILE is the file being visited to put in the modeline."]) (fset 'sccs-do-command #[(buffer command file &rest flags) " ! #! ȋ \"! ! \"!) !" [expand-file-name file message format "Running %s on %s..." command sccs-bin-directory sccs-init-bin-directory ((byte-code " !q @ Av !C\" ! \nB\n  &*db!!! B!!χЇ" [get-buffer-create buffer erase-buffer flags append file sccs-name file-name-directory "./" sccs-bin-directory exec-path default-directory apply call-process command nil t previous-line 1 looking-at "ERROR" print next-line] 8)) status "Running %s...OK" pop-to-buffer buffer error "Running %s...FAILED" sccs-mode-line] 6 "\ Execute an SCCS command, notifying the user and checking for errors."]) (fset 'sccs-shell-command #[(command) " !!" [shell-command command get-buffer-create "*Shell Command Output*"] 2 "\ Like shell-command except that the *Shell Command Output*buffer is created even if the command does not output anything"]) (fset 'sccs-tree-walk #[(func &rest optargs) "\nQ!qeb\"ebm\n\"m?``{   #)ye" [sccs-shell-command "/bin/ls -1 " default-directory "SCCS/s.*" "*Shell Command Output*" replace-string "SCCS/s." "" error "No SCCS files under %s" nil file apply func optargs 1] 4 "\ Apply FUNC to each SCCS file under the default directory. If present, OPTARGS are also passed."]) (fset 'sccs-init #[nil " !ŏ" [current-local-map use-local-map make-sparse-keymap nil (byte-code " # # # # # # # # # #" [define-key current-local-map "s?" describe-mode "sn" sccs "sm" sccs-register-file "sh" sccs-insert-headers "sd" sccs-revert-diff "sp" sccs-prs "sr" sccs-revert-buffer "s" sccs-version-diff "s" sccs-pending "s" sccs-registered] 4) ((error))] 3]) (fset 'sccs #[(verbose) " ‰ !! \n  !  !ԏժ\" \"! \"\" ! !\n \n\" ! \"!  ! ! \"!! ꋭ ! \"\" !!. \"" [sccs-init buffer-file-name nil sccs-name get-buffer-create "*SCCS-Log*" err-msg sccs-log-buf sccs-file file owner revision do-update file-exists-p sccs-load-vars sccs-admin verbose read-string "Initial SID: " (byte-code "!‡" [load-file "SCCS/emacs-vars.el" nil] 2) ((error t)) "1" sccs-current-major-version "p" sccs-get t revert-buffer sccs-mode-line sccs-locking-user user-login-name error "Sorry, %s has that file checked out" buffer-modified-p sccs-mode-expert y-or-n-p format "%s has been modified. Write it out? " buffer-name save-buffer sccs-locked-revision "SID: %s Change revision level? " "New revision level: " ((byte-code "!! ! !ʏ?̏? !" [pop-to-buffer get-buffer-create "*SCCS*" erase-buffer set-buffer-modified-p nil sccs-mode message "Enter log message. Type C-c C-c when done, C-c ? for help." (byte-code " " [recursive-edit nil] 1) ((error t)) (byte-code " \n\"Ç" [sccs-delta file revision nil] 3) ((error t)) buffer-file-name bury-buffer] 3)) "Delta-ed version of file does not match buffer!" run-hooks sccs-delta-ok "There is no file associated with buffer %s"] 7 "\ *Do the next logical SCCS operation on the file in the current buffer. You must have an SCCS subdirectory in the same directory as the file being operated on. If the file is not already registered with SCCS, this does an admin -i followed by a get -e. If the file is registered and not locked by anyone, this does a get -e. If the file is registered and locked by the calling user, this pops up a buffer for creation of a log message, then does a delta -n on the file. A read-only copy of the changed file is left in place afterwards. If the file is registered and locked by someone else, an error message is returned indicating who has locked it." "P"]) (fset 'sccs-insert-last-log #[nil " !" [insert-buffer sccs-log-buf] 2 "\ *Insert the log message of the last SCCS check in at point." nil]) (fset 'sccs-get #[(file writeable) " $" [sccs-do-command "*SCCS*" "get" file writeable "-e"] 5 "\ Retrieve a copy of the latest delta of the given file."]) (fset 'sccs-admin #[(file sid) " \"!   P P%ω &  \"\" !" [buffer-modified-p y-or-n-p format "%s has been modified. Write it out? " buffer-name save-buffer sccs-do-command "*SCCS*" "admin" file "-i" "-r" sid call-process "chmod" nil "-w" sccs-check-headers sccs-get revert-buffer t sccs-mode-line] 7 "\ Checks a file into sccs. FILE is the unmodified name of the file. SID should be the base-level sid to check it in under."]) (fset 'sccs-delta #[(file &optional rev comment) "dbn e`S{ \"\"&͉ &" [comment newline sccs-do-command "*SCCS*" "delta" file "-n" rev format "-r%s" "-y%s" call-process "chmod" nil "-w"] 9 "\ Delta the file specified by FILE. The optional argument REV may be a string specifying the new revision level (if nil increment the current level). The file is retained with write permissions zeroed. COMMENT is a comment string; if omitted, the contents of the current buffer up to point becomes the comment for this delta."]) (fset 'sccs-delta-abort #[nil "! !" [sccs-mode-expert y-or-n-p "Abort the delta? " delete-window error "Delta aborted"] 2 "\ Abort an SCCS delta command." nil]) (fset 'sccs-log-exit #[nil " W ed# b #" [buffer-size sccs-max-log-size copy-to-buffer sccs-log-buf exit-recursive-edit delete-window error "Log must be less than %d characters. Point is now at char %d."] 4 "\ Leave the recursive edit of an SCCS log message." nil]) (fset 'sccs-revert-diff #[(&rest flags) " !\"  \"! !q @A\nC C$&!eb\n!ed \"!!*" [nil file old sccs-get-version buffer-file-name current-prefix-arg read-string "Revision to compare against: " buffer-modified-p sccs-mode-expert y-or-n-p format "%s has been modified. Write it out? " buffer-name save-buffer get-buffer-create "*SCCS*" erase-buffer apply call-process sccs-diff-command t append flags set-buffer-modified-p delete-file message "No changes to %s since last get." pop-to-buffer] 11 "\ *Compare the version being edited with the last checked-in revision. Or, if given a prefix argument, with another specified revision." nil]) (fset 'sccs-prs #[nil "\"!#!!!" [buffer-file-name file-exists-p sccs-name "s" sccs-do-command "*SCCS*" "prs" pop-to-buffer get-buffer-create error "There is no SCCS file associated with this buffer"] 4 "\ *List the SCCS log of the current buffer in an emacs window." nil]) (fset 'sccs-version-diff #[(file rel1 rel2) " !q  #!ebed $!!" [rel1 "" nil rel2 get-buffer-create "*SCCS*" erase-buffer sccs-vdiff file set-buffer-modified-p message format "No changes to %s between %s and %s." pop-to-buffer] 6 "\ *For FILE, report diffs between two stored deltas REL1 and REL2 of it." "fFile: \nsOlder version: \nsNewer version: "]) (fset 'sccs-vdiff #[(file rel1 rel2 &optional flags) " \" \" ǎ\n@ˉ\nA \nC C$&)*" [nil vers2 vers1 sccs-get-version file rel1 rel2 ((byte-code " ŏ" [nil (delete-file vers1) ((error)) rel2 (delete-file vers2) ((error))] 3)) apply call-process sccs-diff-command t append flags] 11 "\ Compare two deltas into the current buffer."]) (fset 'sccs-insert-headers #[nil "~ !eb! = = = = = = = *" [sccs-check-headers y-or-n-p "SCCS headers already exist. Insert another set?" run-hooks sccs-insert-headers-hook major-mode c-mode sccs-insert-c-header lisp-mode sccs-insert-lisp-header emacs-lisp-mode scheme-mode nroff-mode sccs-insert-nroff-header plain-tex-mode sccs-insert-tex-header texinfo-mode sccs-insert-texinfo-header sccs-insert-generic-header] 2 "\ *Insert headers for use with the Source Code Control System. Headers desired are inserted at the start of the buffer, and are pulled from the variable sccs-headers-wanted" nil]) (byte-code "MMMMMM" [sccs-insert-c-header #[nil "c\"c \"ͱϱ!*" [nil en st "/*\n" mapcar #[(s) " ±" [" * " s "\n"] 3] sccs-headers-wanted " */\n\n" sccs-insert-static string-match "\\.h$" buffer-file-name "#ifndef lint\n" "static char *sccsid" " = \"%W%\";\n" "#endif /* lint */\n\n" run-hooks sccs-insert-c-header-hook] 3] sccs-insert-lisp-header #[nil "\n\"c!" [mapcar #[(s) " ±" [";;; " s "\n"] 3] sccs-headers-wanted "\n" run-hooks sccs-insert-lisp-header-hook] 3] sccs-insert-nroff-header #[nil "\n\"c!" [mapcar #[(s) " ±" [".\\\" " s "\n"] 3] sccs-headers-wanted "\n" run-hooks sccs-insert-nroff-header-hook] 3] sccs-insert-tex-header #[nil "\n\"c!" [mapcar #[(s) " ±" ["%% " s "\n"] 3] sccs-headers-wanted "\n" run-hooks sccs-insert-tex-header-hook] 3] sccs-insert-texinfo-header #[nil "\n\"c!" [mapcar #[(s) " ±" ["@comment " s "\n"] 3] sccs-headers-wanted "\n" run-hooks sccs-insert-texinfo-header-hook] 3] sccs-insert-generic-header #[nil "  \" \"\n ĪDZ+" [comment-start "#" comment-start-sccs comment-end "" comment-end-sccs string-match "\n" dont-insert-nl-p mapcar #[(s) "\n êƱ" [comment-start-sccs " " s "" comment-end-sccs dont-insert-nl-p "\n"] 6] sccs-headers-wanted] 3]] 2) (fset 'sccs-check-headers #[nil "ebd#)" [re-search-forward "%[MIRLBSDHTEGUYFPQCZWA]%" t] 4 "\ Check if the current file has any SCCS headers in it." nil]) (fset 'sccs-status #[(prefix legend) "\nQ!qdeU#?eb˱\n\"\")!" [sccs-shell-command "/bin/ls -1 SCCS/" prefix ".*" "*Shell Command Output*" message "No files are currently %s under %s" legend default-directory "The following files are currently " " under " ":\n" replace-string format "SCCS/%s." "" pop-to-buffer] 5 "\ List all files underneath the current directory matching a prefix type."]) (fset 'sccs-pending #[nil "\"" [sccs-status "p" "locked"] 3 "\ *List all files currently SCCS locked." nil]) (fset 'sccs-registered #[nil "\"" [sccs-status "s" "registered"] 3 "\ *List all files currently SCCS registered." nil]) (fset 'sccs-register-file #[(override) " !!!  \"! !ӏԪ\"" [file-exists-p sccs-name buffer-file-name error "This file is already registered into SCCS." buffer-modified-p sccs-mode-expert y-or-n-p format "%s has been modified. Write it out? " buffer-name save-buffer sccs-load-vars sccs-admin override read-string "Initial SID: " nil (byte-code "!‡" [load-file "SCCS/emacs-vars.el" nil] 2) ((error t)) "1" sccs-current-major-version] 5 "\ *Register the file visited by the current buffer into SCCS." "P"]) (fset 'sccs-release-diff #[(rel1 rel2) " Q!qeb\"ebm\"!q  #c)m``{q! # c)y)W!!ceb\"\"eb \"\"eb\"ebP\"ebP\"eb!)" [rel1 "" nil rel2 sccs-shell-command "/bin/ls -1 " default-directory "SCCS/s.*" "*Shell Command Output*" replace-string "SCCS/s." error "No SCCS files under %s" get-buffer-create "*SCCS*" sccsbuf erase-buffer format "Diffs from %s to %s.\n\n" "current" file set-buffer-modified-p sccs-vdiff buffer-modified-p "\n" 1 kill-buffer pop-to-buffer "\nEnd of diffs.\n" "/SCCS/%s." "/" "/new/" "/SCCS/new." replace-regexp "^*** " "*** " "^--- " "--- "] 4 "\ *Diff all files below default-directory between versions REL1 and REL2. The report goes to a shell output buffer which is popped to. If REL2 is omitted or nil, the comparison is done against the most recent version." "sOlder version: \nsNewer version: "]) (fset 'sccs-dummy-delta #[(file sid) " ! \" \"ɉ&!!P#ed%ɉ&!p!* P# \"!" [sccs-locked-revision file sccs-get t sccs-name "p" pfile call-process "chmod" nil "u+w" find-file auto-save-mode replace-regexp "^\\([0-9.]+\\) \\([0-9.]+\\)" "\\1 " sid write-region 0 "u-w" set-buffer-modified-p kill-buffer sccs-delta "Release " sccs-save-vars] 7 "\ Make a dummy delta to the given FILE with the given SID." "sFile: \nsRelease ID: "]) (fset 'sccs-delta-release #[(sid) "\n\"!" [sccs-tree-walk sccs-dummy-delta sid kill-buffer "*SCCS*"] 3 "\ *Delta everything underneath the current directory to mark it as a release." "sRelease: "]) (fset 'sccs-revert-buffer #[nil "  \"! ! \"! \" \"ʉ &\" !)" [buffer-file-name file y-or-n-p format "Revert file %s to last SCCS revision?" delete-file sccs-name "p" rename-file sccs-get-version nil call-process "chmod" "-w" revert-buffer t sccs-mode-line] 7 "\ *Revert the current buffer's file back to the last saved version." nil]) (fset 'sccs-rename-file #[(old new) " !\n \n\") \" \"! \"\"\" \"! \"\"\"" [sccs-locking-user old owner user-login-name error "Sorry, %s has that file checked out" rename-file new file-exists-p sccs-name "p" "s"] 6 "\ *Rename a file, taking its SCCS files with it." "fOld name: \nFNew name: "]) (fset 'sccs-mode #[nil " ! !  \"" [set-syntax-table text-mode-syntax-table use-local-map sccs-log-entry-mode text-mode-abbrev-table local-abbrev-table sccs-mode major-mode "SCCS Change Log Entry" mode-name run-hooks text-mode-hook sccs-mode-hook] 3 "\ Minor mode for driving the SCCS tools. These bindings are added to the global keymap when you enter this mode: \\[sccs] perform next logical SCCS operation (`sccs') on current file \\[sccs-register-file] register current file into SCCS \\[sccs-insert-headers] insert SCCS headers in current file \\[sccs-prs] display change history of current file \\[sccs-revert-buffer] revert buffer to last saved version \\[sccs-revert-diff] show difference between buffer and last saved delta \\[sccs-pending] show all files currently locked by any user in or below . \\[sccs-registered] show all files registered into SCCS in or below . \\[sccs-version-diff] show diffs between saved versions for all files in or below . When you generate headers into a buffer using C-c h, the value of sccs-insert-headers-hook is called before insertion. If the file is recognized a C or Lisp source, sccs-insert-c-header-hook or sccs-insert-lisp-header-hook is called after insertion respectively. While you are entering a change log message for a delta, the following additional bindings will be in effect. \\[sccs-log-exit] proceed with check in, ending log message entry \\[sccs-insert-last-log] insert log message from last check-in \\[sccs-delta-abort] abort this delta check-in Entry to the change-log submode calls the value of text-mode-hook, then the value sccs-mode-hook. Global user options: sccs-mode-expert suppresses some conformation prompts, notably for delta aborts and file saves. sccs-max-log-size specifies the maximum allowable size of a log message plus one. sccs-diff-command A list consisting of the command and flags to be used for generating context diffs. sccs-headers-wanted which %-keywords to insert when adding SCCS headers with C-c h sccs-insert-static if non-nil, SCCS keywords inserted in C files get stuffed in a static string area so that what(1) can see them in the compiled object code. " nil]) (byte-code " ###### ! A#M\"" [sccs-log-entry-mode make-sparse-keymap define-key "i" sccs-insert-last-log " " "a" sccs-delta-abort "" "" sccs-log-exit "" ("SCCS Commands" ["SCCS" sccs t nil] ["Insert Headers" sccs-insert-headers t] ["Archive History:" sccs-prs t nil] ["Diffs from Archive:" sccs-revert-diff t nil] ["Revert to Archive:" sccs-revert-buffer t nil] "----" ["Check In..." sccs-dummy-delta t] ["Create Archive..." sccs-register-file t] ["Rename Archive..." sccs-rename-file t] "----" ["List Checked-Out Files" sccs-pending t] ["List Registered Files" sccs-registered t] ["Diff Directory" sccs-release-diff t] ["Delta Directory" sccs-delta-release t]) sccs-menu delete-menu-item ("SCCS") add-menu nil "SCCS" sccs-sensitize-menu #[nil " \"@A!   ! !!\"! @!H=ڪ۪IGVH\" IGV I>>I A . Ӈ" [find-menu-item current-menubar ("SCCS") rest t case-fold-search buffer-file-name file-name-nondirectory buffer-name file file-name-directory default-directory dir sccs-name sccs-file file-exists-p known-p "p" checked-out-p nil command item vectorp 1 sccs 0 "Create Archive:" "Check Out" "Check In" 3 string-match "directory" 2 (sccs-prs) (sccs-revert-diff sccs-revert-buffer)] 5] add-hook activate-menubar-hook] 4)