;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Tue Jun 20 09:55:25 1995 ;;; from file /home/fsf/rms/e19/lisp/vc-hooks.el ;;; emacs version 19.28.95.3. ;;; 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.28.90"))) (error "`vc-hooks.el' was compiled for Emacs 19.29 or later")) #@133 *Back-end actually used by this interface; may be SCCS or RCS. The value is only computed when needed to avoid an expensive search. (defvar vc-default-back-end nil (#$ . -478)) #@93 *If non-nil, use VC for files managed with CVS. If it is nil, don't use VC for those files. (defvar vc-handle-cvs t (#$ . -661)) #@68 *List of extra directories to search for version control commands. (defvar vc-path (byte-code "!‡" [file-directory-p "/usr/sccs" ("/usr/sccs")] 2) (#$ . -796)) #@148 *Where to look for version-control master files. The first pair corresponding to a given back end is used as a template when creating new masters. (defvar vc-master-templates (quote (("%sRCS/%s,v" . RCS) ("%s%s,v" . RCS) ("%sRCS/%s" . RCS) ("%sSCCS/s.%s" . SCCS) ("%ss.%s" . SCCS) vc-find-cvs-master)) (#$ . -969)) #@146 *If non-nil, backups of registered files are made as with other files. If nil (the default), files covered by version control don't get backups. (defvar vc-make-backup-files nil (#$ . -1291)) #@93 *If non-nil, display revision number and lock status in modeline. Otherwise, not displayed. (defvar vc-display-status t (#$ . -1489)) #@56 *Identify work files by searching for version headers. (defvar vc-consult-headers t (#$ . -1629)) #@76 *Don't assume that permissions and ownership track version-control status. (defvar vc-mistrust-permissions nil (#$ . -1733)) #@157 *If non-nil, don't delete working files after registering changes. If the back-end is CVS, workfiles are always kept, regardless of the value of this flag. (defvar vc-keep-workfiles t (#$ . -1865)) (byte-code "\n\" \nB!#" [assoc vc-mode minor-mode-alist (vc-mode vc-mode) make-variable-buffer-local put permanent-local t] 4) (defalias 'vc-error-occurred '(macro . #[(&rest body) "\f\"BF" [condition-case nil progn append body (nil) (error t)] 6])) #@34 Obarray for per-file properties. (defvar vc-file-prop-obarray [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] (#$ . 2340)) (byte-code "! B!" [boundp vc-buffer-backend t current-load-list make-variable-buffer-local] 2) (defalias 'vc-file-setprop #[(file property value) "\n \"\f #" [put intern file vc-file-prop-obarray property value] 4]) (defalias 'vc-file-getprop #[(file property) " \n\" N" [intern file vc-file-prop-obarray property] 3]) (defalias 'vc-file-clearprops #[(file) "\n \"\"" [setplist intern file vc-file-prop-obarray nil] 4]) (defalias 'vc-match-substring #[(bn) "{" [bn] 2]) (defalias 'vc-lock-file #[(file) " !\n\"\nŔŕO\nǔǕOQ)" [vc-name file master string-match "\\(.*/\\)s\\.\\(.*\\)" 1 "p." 2] 6]) (defalias 'vc-parse-buffer #[(patterns &optional file properties) "\n\"" [mapcar #[(p) "ebG=1@#ǜ!.\n@ #\nA\n )G=| @#e!aǜ! )>y\n@ #\nA\n *" [p 2 nil value re-search-forward t vc-match-substring 1 file vc-file-setprop properties 3 "" latest-val latest-date date] 4] patterns] 3]) (defalias 'vc-insert-file #[(file &optional limit blocksize) " !R\nD ʼn@ Tb  \\$A@U:y\n#*H !!!̇Ň" [file-exists-p file limit blocksize 8192 nil s found buffer-size insert-file-contents 0 re-search-forward t set-buffer-modified-p auto-save-mode] 7]) (defalias 'vc-parse-locks #[(file locks) "\n\n#lj \n \f\n!=M #єѕO ҔҕO\n BC\"\nƕ !\n!= #ҔҕO єѕO\n BC\"\nƕ U\n\n#-" [locks vc-file-setprop file vc-master-locks none t 0 nil user version master-locks index found vc-backend SCCS string-match "^\\([0-9.]+\\) [0-9.]+ \\([^ ]+\\) .*\n?" 1 2 append RCS "[ \n]*\\([^:]+\\):\\([0-9.]+\\)"] 5]) (defalias 'vc-fetch-master-properties #[(file) " !=B!q !!\" \" ( # !\" !QDD #i !=!q !\"E # \"p| \"#\" # !\"!QEC #) \"\"i !=i!q ),-\"!1,1#R4B4- !D&*!q!! # @\"ABA\"2 @C# DEF !8#hGA\"I @H#hIA\"` @J#h @#)!vK!!)" [vc-backend file SCCS get-buffer-create "*vc-info*" vc-insert-file vc-lock-file vc-parse-locks buffer-string erase-buffer vc-file-setprop vc-master-locks none vc-name "^e" vc-parse-buffer ("^d D \\([^ ]+\\)" 1) "^d D \\([^ ]+\\) .* " regexp-quote user-login-name " " 1 (vc-latest-version vc-your-latest-version) RCS "^locks" ("^head[ \n]+\\([^;]+\\);" 1) ("^branch[ \n]+\\([^;]+\\);" 1) ("^locks\\([^;]+\\);" 1) (vc-head-version vc-default-branch vc-master-locks) vc-file-getprop vc-default-branch default-branch "" vc-top-version vc-head-version string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" "^desc" "^\\(" "\\.[0-9]+\\)\ndate[ ]+\\([0-9.]+\\);" 2 (vc-top-version) CVS append vc-path exec-path "PATH=" getenv "PATH" path-separator mapconcat identity process-environment apply call-process "cvs" nil "status" file-name-nondirectory get-buffer set-buffer-modified-p auto-save-mode (("\\(RCS Version\\|RCS Revision\\|Repository revision\\):[ ]+\\([0-9.]+\\)" 2) ("^File: [^ ]+[ ]+Status: \\(.*\\)" 1)) (vc-latest-version vc-cvs-status) vc-cvs-status status "Up-to-date" up-to-date vc-checkout-time 5 file-attributes "Locally Modified" locally-modified "Needs Merge" needs-merge kill-buffer] 10]) (defalias 'vc-consult-rcs-headers #[(file) "\n\n!\fÇ\n!qeb##!4eb#}!}ʕb˔˕{\fQ#y!a\n\f#\n#ւy!y\n\f#\n˔˕{#)P#˔˕{\febP#!\n\f#\n˔˕{#ւ!\n\f#\n#ւ\n\f#\n#ւ\n\f#))" [vc-consult-headers get-file-buffer file nil search-forward "$Id: " t looking-at "[^ ]+ \\([0-9.]+\\) " "$Header: " 0 1 rev re-search-forward "\\=[0-9]+/[0-9]+/[0-9]+ " "[0-9]+:[0-9]+:[0-9]+ " "[^ ]+ [^ ]+ " "\\$" vc-file-setprop vc-workfile-version vc-locking-user none rev-and-lock "\\([^ ]+\\) \\$" "Revision: \\([0-9.]+\\) \\$" "Locker:" " \\([^ ]+\\) \\$" " *\\$"] 5]) (defalias 'vc-backend-subdirectory-name #[(&optional file) " ! !Ƃlj!" [symbol-name file vc-backend vc-default-back-end vc-find-binary "rcs" RCS SCCS] 3]) #@64 Return the master name of a file, nil if it is not registered. (defalias 'vc-name #[(file) " \" ! \fA# \f@#)" [vc-file-getprop file vc-name vc-registered name-and-type vc-file-setprop vc-backend] 5 (#$ . 6693)]) #@73 Return the version-control type of a file, nil if it is not registered. (defalias 'vc-backend #[(file) "!\"!! \f@#\fA#)" [file vc-file-getprop vc-backend vc-registered name-and-type vc-file-setprop vc-name] 5 (#$ . 6928)]) (defalias 'vc-cvs-status #[(file) " \" ! \"" [vc-file-getprop file vc-cvs-status vc-fetch-master-properties] 3]) (defalias 'vc-master-locks #[(file) " \" ! \"" [vc-file-getprop file vc-master-locks vc-fetch-master-properties] 3]) (defalias 'vc-master-locking-user #[(file) " !=ł! !\f\" A!*" [vc-master-locks file nil lock master-locks none assoc vc-workfile-version] 4]) (defalias 'vc-locking-user #[(file) " \" =? !=P !=- # !8\f UE #L \f#) !=` !=z=z !! !# !8\" #8 U8\" # !#) !)" [vc-file-getprop file vc-locking-user locking-user none vc-backend CVS vc-cvs-status up-to-date vc-file-setprop 2 file-attributes uid user-uid user-login-name RCS vc-consult-rcs-headers rev-and-lock vc-keep-workfiles vc-mistrust-permissions t vc-backend-subdirectory-name vc-master-locking-user attributes string-match ".r-..-..-." 8 ".rw..-..-."] 6]) (defalias 'vc-latest-version #[(file) " \" ! \"" [vc-file-getprop file vc-latest-version vc-fetch-properties] 3]) (defalias 'vc-your-latest-version #[(file) " \" ! \"" [vc-file-getprop file vc-your-latest-version vc-fetch-properties] 3]) (defalias 'vc-top-version #[(file) " \" ! \"" [vc-file-getprop file vc-top-version vc-fetch-master-properties] 3]) (defalias 'vc-fetch-properties #[(file) " !=*!q !\" !ϰED #) !" [vc-backend file RCS get-buffer-create "*vc-info*" vc-insert-file vc-name "^desc" vc-parse-buffer ("^\\([0-9]+\\.[0-9.]+\\)\ndate[ ]+\\([0-9.]+\\);" 1 2) "^\\([0-9]+\\.[0-9.]+\\)\n" "date[ ]+\\([0-9.]+\\);[ ]+" "author[ ]+" regexp-quote user-login-name ";" 1 2 (vc-latest-version vc-your-latest-version) vc-fetch-master-properties] 7]) (defalias 'vc-workfile-version #[(file) " \"` != ! !=@ !& \" !3 !3\n \n#\n) !=` !S \" ! !\" \"" [vc-file-getprop file vc-workfile-version vc-backend SCCS vc-latest-version RCS vc-consult-rcs-headers vc-top-version nil rev vc-file-setprop CVS vc-find-cvs-master file-name-directory file-name-nondirectory] 4]) (defalias 'vc-registered #[(file) "!\"\n\n\"0!$! \f΍**" [nil handlers handler boundp file-name-handler-alist find-file-name-handler file vc-registered file-name-directory "" file-name-nondirectory basename dirname found (byte-code "\n\"Ç" [mapcar #[(s) ":\n \n\"@ \n#\f!2 \f!+!\f!?2\fAB\")" [s dirname basename format trial file-exists-p file-name-directory file-attributes file throw found] 4] vc-master-templates nil] 3)] 3]) (defalias 'vc-find-cvs-master #[(dirname basename) "\nP!\nP!\nP! \nˎ\nP!C\n@qeb!Q#| \nPՔՕ{#\nP!\nB\n@qedS{!QB\") ," [vc-handle-cvs file-directory-p dirname "CVS/" file-readable-p "CVS/Entries" "CVS/Repository" nil case-fold-search fold bufs ((byte-code "\n\"" [mapcar kill-buffer bufs] 3)) find-file-noselect re-search-forward "^/" regexp-quote basename "/\\([^/]*\\)/" t vc-file-setprop vc-workfile-version 1 file-name-as-directory ",v" master throw found CVS] 6]) #@70 Return the version-control type of the visited file, or nil if none. (defalias 'vc-buffer-backend #[nil "= !" [vc-buffer-backend t vc-backend buffer-file-name] 2 (#$ . 10406)]) #@275 Change read-only status of current buffer, perhaps via version control. If the buffer is visiting a file registered with version control, then check the file in or out. Otherwise, just change the read-only flag of the buffer. With prefix argument, ask for version number. (defalias 'vc-toggle-read-only #[(&optional verbose) " ! ! " [vc-backend buffer-file-name vc-next-action verbose toggle-read-only] 2 (#$ . 10602) "P"]) (define-key global-map "" (quote vc-toggle-read-only)) #@217 Set `vc-mode' to display type of version control for FILE. The value is set in the current buffer, which should be the buffer visiting FILE. Second optional arg LABEL is put in place of version control system name. (defalias 'vc-mode-line #[(file &optional label) " !\n\n ! !\fQ \f+\fʜ=4 4 !4 V V !V!V !V r !r !!q\") *" [vc-backend file vc-display-status vc-status vc-status-string vc-type " " label symbol-name vc-mode 0 45 t buffer-read-only vc-locking-user zerop user-uid require vc user-login-name file-symlink-p link-type message "Warning: symbolic link to %s-controlled source file" force-mode-line-update] 4 (#$ . 11101) (list buffer-file-name nil)]) (defalias 'vc-status #[(file) " ! ! ŘƂ:\f P:\f;(\f ,\f U5 P:\f R*" [vc-locking-user file vc-workfile-version rev locker "0" " @@" "-" user-login-name user-uid ":"] 4]) (defalias 'vc-find-file-hook #[nil "!!!\f?!lj" [buffer-file-name vc-file-clearprops vc-backend vc-mode-line vc-make-backup-files make-local-variable backup-inhibited t] 2]) (add-hook (quote find-file-hooks) (quote vc-find-file-hook)) #@116 When file is not found, try to check it out from RCS or SCCS. Returns t if checkout was successful, nil otherwise. (defalias 'vc-file-not-found-hook #[nil " !! !ȏ)?" [vc-backend buffer-file-name require vc file-name-directory default-directory nil (byte-code " !‡" [vc-checkout buffer-file-name nil] 2) ((error t))] 3 (#$ . 12297)]) (add-hook (quote find-file-not-found-hooks) (quote vc-file-not-found-hook)) (defalias 'vc-kill-buffer-hook #[nil " ; !!" [buffer-file-name vc-file-clearprops kill-local-variable vc-buffer-backend] 2]) (byte-code " \" !\\  # # # # # # # # # # # # #! # # # # # # # # # # # # # #@#@#@#A#@#@#@#@#B#CD#E#FG!" [lookup-key global-map "v" vc-prefix-map keymapp make-sparse-keymap define-key "a" vc-update-change-log "c" vc-cancel-version "d" vc-directory "h" vc-insert-headers "i" vc-register "l" vc-print-log "r" vc-retrieve-snapshot "s" vc-create-snapshot "u" vc-revert-buffer "v" vc-next-action "=" vc-diff "~" vc-version-other-window boundp vc-menu-map [vc-directory] ("Show Locked Files" . vc-directory) [separator1] ("----") [vc-rename-file] ("Rename File" . vc-rename-file) [vc-version-other-window] ("Show Other Version" . vc-version-other-window) [vc-diff] ("Compare with Last Version" . vc-diff) [vc-update-change-log] ("Update ChangeLog" . vc-update-change-log) [vc-print-log] ("Show History" . vc-print-log) [separator2] ("----") [undo] ("Undo Last Check-In" . vc-cancel-version) [vc-revert-buffer] ("Revert to Last Version" . vc-revert-buffer) [vc-insert-header] ("Insert Header" . vc-insert-headers) [vc-menu-check-in] ("Check In" . vc-next-action) [vc-check-out] ("Check Out" . vc-toggle-read-only) [vc-register] ("Register" . vc-register) put vc-rename-file menu-enable vc-mode (eq (vc-buffer-backend) (quote RCS)) (and vc-mode (not buffer-read-only)) vc-toggle-read-only (and vc-mode buffer-read-only) (and buffer-file-name (not vc-mode)) provide vc-hooks] 4)