- (if (fboundp 'vc-state)
- ;; Emacs 21 handles VC state in a nice way.
- (condition-case nil
- (let ((state (vc-state (concat directory name))))
- (not (or (eq 'up-to-date state)
- (null state))))
- ;; An error means not in a VC system
- (error nil))
- (or
- ;; RCS file name
- (file-exists-p (concat directory "RCS/" name ",v"))
- (file-exists-p (concat directory "RCS/" name))
- ;; Local SCCS file name
- (file-exists-p (concat directory "SCCS/s." name))
- ;; Remote SCCS file name
- (let ((proj-dir (getenv "PROJECTDIR")))
- (if proj-dir
- (file-exists-p (concat proj-dir "/SCCS/s." name))
- nil))))