;ELC ;;; Compiled by jmacd@linux.local on Sun May 9 17:18:15 2004 ;;; from file /home/jmacd/nfs/projects/prcs1/emacs/elc.22814/prcs-hooks.el ;;; in Emacs version 21.2.1 ;;; with bytecomp version 2.85 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`prcs-hooks.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310$\210\304\311\306\307\310$\210\304\312\306\307\310$\210\304\313\306\307\310$\210\314\315\307\316\317\315\320\321&\207" [require custom cl vc-hooks autoload prcs-jump-to-project-file "prcs" nil t prcs-mode prcs-controlled-mode prcs-guess-repository custom-declare-group prcs "PRCS version-control system in Emacs (see also certain variables in VC)." :load :group tools] 8) #@67 *True if running XEmacs (vs. FSF Emacs). 20.4 currently required. (custom-declare-variable 'prcs-xemacs-p '(search "XEmacs" emacs-version) '(#$ . -1071) :type 'boolean :group 'prcs) #@64 *Whether to do things to the menubar/toolbar for PRCS support. (custom-declare-variable 'prcs-use-toolbar 't '(#$ . -1259) :type 'boolean :group 'prcs) #@31 *Name of the prcs executable. (custom-declare-variable 'prcs-program-name '"prcs" '(#$ . -1417) :type 'string :group 'prcs) #@89 Has the active status of this project buffer been checked yet? `nil', `good', or `bad'. (defvar prcs-active-has-been-checked nil (#$ . 1547)) (byte-code "\305\306!\210\307\306\310\311#\210\312\313\314\"\210\203 \315\316\317\"\210\315\320\321\"\210\2020 \2030\322\n\323\324#\210\322 \325\326#\210\327\f\235\203:\f\202=\327\fB\330\331\332\"\207" [prcs-xemacs-p prcs-use-toolbar vc-menu-map global-map auto-mode-alist make-variable-buffer-local prcs-active-has-been-checked put permanent-local t global-set-key "vp" prcs-jump-to-project-file add-menu-button ("Tools" "VC") "----" ("Tools" "VC") ["Jump to PRCS project" prcs-jump-to-project-file t] define-key [separator3] ("----") [menu-bar tools vc prcs-jump] ("Jump to PRCS project" . prcs-jump-to-project-file) ("\\.prj\\'" . prcs-mode) add-hook find-file-hooks prcs-maybe-put-into-controlled-mode] 4) #@120 Hook to put buffers into PRCS Controlled mode where appropriate. Should notice if you ought to be following a symlink. (defalias 'prcs-maybe-put-into-controlled-mode #[nil "\304\305 !\211\205\306\307!!\306\305 \310\311#\203] \203S \311=\204? \2033\312\313\314\305 !!!\204? \315=\203M\316\317!\203M\320 \210\321\322\305 \"\210\323 \202e\321\324!\202e\n\205e\321\325!\202e\n\205e\326\327\n\"+\207" [link link-ctld info vc-follow-symlinks file-symlink-p buffer-file-name prcs-is-prcs-controlled expand-file-name :get-descriptor-too t get-file-buffer abbreviate-file-name file-chase-links ask yes-or-no-p "Symbolic link to PRCS-controlled source file; follow link? " vc-follow-link message "Followed link to %s" prcs-maybe-put-into-controlled-mode "Warning: editing through the link bypasses version control" "Warning: visiting a PRCS-listed link to a non-PRCS-controlled file" prcs-controlled-mode 1] 5 (#$ . 2414)]) #@599 Is this file listed in the (Files) section of some enclosing project file? If so, returns the name of that project file. Lower-down project files take precedence. If GET-DESCRIPTOR-TOO is non-nil, will return instead a list of the project file name, then the file descriptor list: e.g. (.../foo.prj (bar/baz\.c (foo/39_bar 1.2 666) :tag=mytag)) For the project file itself, just returns that name (or a list of that name, if GET-DESCRIPTOR-TOO is set, since there is no actual descriptor). XXX maybe should warn if multiple p-files contain it, to detect possibly confusing use of subprojects. (defalias 'prcs-is-prcs-controlled #[(name &rest #1=#:--rest--16500) "\306>A@\307>A@ \2038 @\310>\203! AA\211\202\311>A@\203/\312\211\202\313\314 @\"\210\202)\n\204\262\315\316\f\"\203\262 \203M\fC\202N\f\317\f!\206W\320\f!!\212 q\210\"\321>\203x#\204x\322\323\324\f\"#!\203x\325 \210\"\325=\203\247#\204\220\326\327!$\330\331\332\217)##\333=\203\234!\202\256#\334=\205\256\312\202\256\335\f\306 \307\336%+\202\267\212\337\340\215)*\207" [#1# get-descriptor-too treat-as-non-p-file #2=#:--keys--16501 name pbuf :get-descriptor-too :treat-as-non-p-file (:get-descriptor-too :treat-as-non-p-file :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:get-descriptor-too :treat-as-non-p-file)" string-match "\\.prj$" get-file-buffer find-file-noselect (lisp-mode fundamental-mode) yes-or-no-p format "File %s might be a PRCS project file but it showed up in `%s' instead. Force it into PRCS Major Mode? " prcs-mode generate-new-buffer "*PRCS activeness check*" err (byte-code "\306!\307 !\310\311\"\210\312\313\f\314 \315D\314\316\317\320\321\n\205!\322\nPC\323!C\"& \310\324\"\210*\211\325=\203>\326 !\210\327\202I\310\330 #\210\331 !\210\332)\207" [name pbuf repo default-directory prcs-program-name output file-name-directory prcs-guess-repository message "Checking whether %s is really active..." apply call-process nil t "info" "--force" "--revision=." append "--repository=" file-name-nondirectory "Checking whether %s is really active...done" 0 kill-buffer good "PRCS did not like project file %s: see buffer %S" pop-to-buffer bad #3=#:G16502] 14) ((file-error (byte-code "\301\302\"\210\303\207" [err message "Could not run PRCS: %S" bad] 3))) good bad prcs-is-prcs-controlled t --cl-block-iterate-- (byte-code "\306!\307\211\203o\n@\310 !\211\204\311 ! q\210\f\312=\203a \203Y\313\314\315\316 !\"\"\313\317 !\320\321$A\320\321$\211\203U\322\323\203R D\202S \"\210)\202g\324\325 \"\210\202g\324\326 \f#\210)\nA\211\204\n*\307\207" [name try #4=#:--dolist-temp--16503 buf major-mode prcs-controlled-mode prcs-is-potentially-prcs-controlled nil get-file-buffer find-file-noselect prcs-mode find intern file-relative-name file-name-directory prcs-parse-prj-file-cached :key car throw --cl-block-iterate-- message "Warning: %s found not in PRCS-Controlled mode, ignoring...(probably this project was not accessible in the repository!)" "Warning: *.prj file %s found in %s (not PRCS Major Mode), will be ignored...(check for weird -*- lines or `auto-mode-alist')" prcs-obarray prcs-Files found get-descriptor-too] 8) if-ok major-mode prcs-active-has-been-checked output] 7 (#$ . 3354)]) #@510 Provides list of potential names of project files that could be controlling this file. Returns nil if none, of course, so can be used as a predicate. More specific (lower-down) project files are listed first. (No particular order if at same level.) XXX: could become confused if you have some controlled files in a directory symlinked to from the actual working dir, but not present in it. This is pretty obscure. XXX should perhaps use `file-truename'. Full implications of symlinks need to be worked out. (defalias 'prcs-is-potentially-prcs-controlled #[(name) "\306\307!!\310\311\310 \204?\312\313 \f#\2039\311\225 \311\211\224TO\212\314\315!q\210\316 \317\320#)\n\244*\202\f\317\211\203*\321\n!*\207" [name dir potential stop idx test-dir expand-file-name file-name-directory nil 0 string-match "/" get-buffer-create "*scratch*" directory-files t "^[A-Za-z0-9#%^_+:,][A-Za-z0-9#%^_+:,-=.]*\\.prj$" reverse test-files] 5 (#$ . 6659)]) (provide 'prcs-hooks)