/[emacs]/emacs/lisp/vc.el
ViewVC logotype

Diff of /emacs/lisp/vc.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.331.2.10 by miles, Tue Apr 27 14:10:58 2004 UTC revision 1.331.2.11 by miles, Thu Sep 16 00:12:21 2004 UTC
# Line 1  Line 1 
1  ;;; vc.el --- drive a version-control system from within Emacs  ;;; vc.el --- drive a version-control system from within Emacs
2    
3  ;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003,2004  ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4  ;;           Free Software Foundation, Inc.  ;;   2000, 2001, 2003, 2004  Free Software Foundation, Inc.
5    
6  ;; Author:     FSF (see below for full credits)  ;; Author:     FSF (see below for full credits)
7  ;; Maintainer: Andre Spiegel <spiegel@gnu.org>  ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
# Line 394  Line 394 
394  ;;  ;;
395  ;;   Return the hostname that the backend will have to contact  ;;   Return the hostname that the backend will have to contact
396  ;;   in order to operate on a file in DIRNAME.  If the return value  ;;   in order to operate on a file in DIRNAME.  If the return value
397  ;;   is nil, it is means that the repository is local.  ;;   is nil, it means that the repository is local.
398  ;;   This function is used in `vc-stay-local-p' which backends can use  ;;   This function is used in `vc-stay-local-p' which backends can use
399  ;;   for their convenience.  ;;   for their convenience.
400  ;;  ;;
# Line 1017  Used by `vc-restore-buffer-context' to l Line 1017  Used by `vc-restore-buffer-context' to l
1017                             (vc-position-context (mark-marker))))                             (vc-position-context (mark-marker))))
1018          ;; Make the right thing happen in transient-mark-mode.          ;; Make the right thing happen in transient-mark-mode.
1019          (mark-active nil)          (mark-active nil)
1020          ;; We may want to reparse the compilation buffer after revert          ;; The new compilation code does not use compilation-error-list any
1021          (reparse (and (boundp 'compilation-error-list) ;compile loaded          ;; more, so the code below is now ineffective and might as well
1022                        ;; Construct a list; each elt is nil or a buffer          ;; be disabled.  -- Stef
1023                        ;; iff that buffer is a compilation output buffer          ;; ;; We may want to reparse the compilation buffer after revert
1024                        ;; that contains markers into the current buffer.          ;; (reparse (and (boundp 'compilation-error-list) ;compile loaded
1025                        (save-current-buffer          ;;            ;; Construct a list; each elt is nil or a buffer
1026                          (mapcar (lambda (buffer)          ;;            ;; iff that buffer is a compilation output buffer
1027                                    (set-buffer buffer)          ;;            ;; that contains markers into the current buffer.
1028                                    (let ((errors (or          ;;            (save-current-buffer
1029                                                   compilation-old-error-list          ;;              (mapcar (lambda (buffer)
1030                                                   compilation-error-list))          ;;                        (set-buffer buffer)
1031                                          (buffer-error-marked-p nil))          ;;                        (let ((errors (or
1032                                      (while (and (consp errors)          ;;                                       compilation-old-error-list
1033                                                  (not buffer-error-marked-p))          ;;                                       compilation-error-list))
1034                                        (and (markerp (cdr (car errors)))          ;;                              (buffer-error-marked-p nil))
1035                                             (eq buffer          ;;                          (while (and (consp errors)
1036                                                 (marker-buffer          ;;                                      (not buffer-error-marked-p))
1037                                                  (cdr (car errors))))          ;;                            (and (markerp (cdr (car errors)))
1038                                             (setq buffer-error-marked-p t))          ;;                                 (eq buffer
1039                                        (setq errors (cdr errors)))          ;;                                     (marker-buffer
1040                                      (if buffer-error-marked-p buffer)))          ;;                                      (cdr (car errors))))
1041                                  (buffer-list))))))          ;;                                 (setq buffer-error-marked-p t))
1042            ;;                            (setq errors (cdr errors)))
1043            ;;                          (if buffer-error-marked-p buffer)))
1044            ;;                      (buffer-list)))))
1045            (reparse nil))
1046      (list point-context mark-context reparse)))      (list point-context mark-context reparse)))
1047    
1048  (defun vc-restore-buffer-context (context)  (defun vc-restore-buffer-context (context)
# Line 1047  CONTEXT is that which `vc-buffer-context Line 1051  CONTEXT is that which `vc-buffer-context
1051    (let ((point-context (nth 0 context))    (let ((point-context (nth 0 context))
1052          (mark-context (nth 1 context))          (mark-context (nth 1 context))
1053          (reparse (nth 2 context)))          (reparse (nth 2 context)))
1054      ;; Reparse affected compilation buffers.      ;; The new compilation code does not use compilation-error-list any
1055      (while reparse      ;; more, so the code below is now ineffective and might as well
1056        (if (car reparse)      ;; be disabled.  -- Stef
1057            (with-current-buffer (car reparse)      ;; ;; Reparse affected compilation buffers.
1058              (let ((compilation-last-buffer (current-buffer)) ;select buffer      ;; (while reparse
1059                    ;; Record the position in the compilation buffer of      ;;   (if (car reparse)
1060                    ;; the last error next-error went to.      ;;    (with-current-buffer (car reparse)
1061                    (error-pos (marker-position      ;;      (let ((compilation-last-buffer (current-buffer)) ;select buffer
1062                                (car (car-safe compilation-error-list)))))      ;;            ;; Record the position in the compilation buffer of
1063                ;; Reparse the error messages as far as they were parsed before.      ;;            ;; the last error next-error went to.
1064                (compile-reinitialize-errors '(4) compilation-parsing-end)      ;;            (error-pos (marker-position
1065                ;; Move the pointer up to find the error we were at before      ;;                        (car (car-safe compilation-error-list)))))
1066                ;; reparsing.  Now next-error should properly go to the next one.      ;;        ;; Reparse the error messages as far as they were parsed before.
1067                (while (and compilation-error-list      ;;        (compile-reinitialize-errors '(4) compilation-parsing-end)
1068                            (/= error-pos (car (car compilation-error-list))))      ;;        ;; Move the pointer up to find the error we were at before
1069                  (setq compilation-error-list (cdr compilation-error-list))))))      ;;        ;; reparsing.  Now next-error should properly go to the next one.
1070        (setq reparse (cdr reparse)))      ;;        (while (and compilation-error-list
1071        ;;                    (/= error-pos (car (car compilation-error-list))))
1072        ;;          (setq compilation-error-list (cdr compilation-error-list))))))
1073        ;;   (setq reparse (cdr reparse)))
1074    
1075      ;; if necessary, restore point and mark      ;; if necessary, restore point and mark
1076      (if (not (vc-context-matches-p (point) point-context))      (if (not (vc-context-matches-p (point) point-context))
# Line 3705  Invoke FUNC f ARGS on each VC-managed fi Line 3712  Invoke FUNC f ARGS on each VC-managed fi
3712  ;;  ;;
3713  ;;    Thus, there is no explicit recovery code.  ;;    Thus, there is no explicit recovery code.
3714    
3715  ;;; arch-tag: ca82c1de-3091-4e26-af92-460abc6213a6  ;; arch-tag: ca82c1de-3091-4e26-af92-460abc6213a6
3716  ;;; vc.el ends here  ;;; vc.el ends here

Legend:
Removed from v.1.331.2.10  
changed lines
  Added in v.1.331.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26