Группа :: Редакторы
Пакет: emacs21
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: emacs-21.3-vc-cvs-registered-autoload-parts.patch
--- emacs-21.3/lisp/vc-cvs.el.noLoop 2003-03-30 19:44:31 +0400
+++ emacs-21.3/lisp/vc-cvs.el 2003-03-30 20:03:27 +0400
@@ -99,30 +99,34 @@
;;; State-querying functions
;;;
-;;;###autoload (defun vc-cvs-registered (f)
-;;;###autoload (when (file-readable-p (expand-file-name
-;;;###autoload "CVS/Entries" (file-name-directory f)))
-;;;###autoload (require 'vc-cvs)
-;;;###autoload (vc-cvs-registered f)))
-
-(defun vc-cvs-registered (file)
- "Check if FILE is CVS registered."
- (let ((dirname (or (file-name-directory file) ""))
+;;;###autoload
+(progn
+ ;; define the fast part of the function which is always available
+ (defun vc-cvs-registered (file)
+ "Check if FILE is CVS registered."
+ (let ((dirname (or (file-name-directory file) "")))
+ (if (file-readable-p (expand-file-name "CVS/Entries" dirname))
+ ;; call the heavy part which is loaded on demand
+ (vc-cvs-registered-1 file)
+ nil))))
+
+;;;###autoload
+(defun vc-cvs-registered-1 (file)
+ "Do the real work for `vc-cvs-registered'."
+ (let ((dirname (or (file-name-directory file) ""))
(basename (file-name-nondirectory file))
;; make sure that the file name is searched case-sensitively
(case-fold-search nil))
- (if (file-readable-p (expand-file-name "CVS/Entries" dirname))
- (with-temp-buffer
- (vc-insert-file (expand-file-name "CVS/Entries" dirname))
- (goto-char (point-min))
- (cond
- ((re-search-forward
- (concat "^/" (regexp-quote basename) "/") nil t)
- (beginning-of-line)
- (vc-cvs-parse-entry file)
- t)
- (t nil)))
- nil)))
+ (with-temp-buffer
+ (vc-insert-file (expand-file-name "CVS/Entries" dirname))
+ (goto-char (point-min))
+ (cond
+ ((re-search-forward
+ (concat "^/" (regexp-quote basename) "/") nil t)
+ (beginning-of-line)
+ (vc-cvs-parse-entry file)
+ t)
+ (t nil)))))
(defun vc-cvs-state (file)
"CVS-specific version of `vc-state'."