1925 |
(cvs-mode-find-file e 'dont-select)) |
(cvs-mode-find-file e 'dont-select)) |
1926 |
|
|
1927 |
|
|
1928 |
|
(defun cvs-mode-view-file (e) |
1929 |
|
"View the file." |
1930 |
|
(interactive (list last-input-event)) |
1931 |
|
(cvs-mode-find-file e nil t)) |
1932 |
|
|
1933 |
|
|
1934 |
|
(defun cvs-mode-view-file-other-window (e) |
1935 |
|
"View the file." |
1936 |
|
(interactive (list last-input-event)) |
1937 |
|
(cvs-mode-find-file e t t)) |
1938 |
|
|
1939 |
|
|
1940 |
(defun cvs-find-modif (fi) |
(defun cvs-find-modif (fi) |
1941 |
(with-temp-buffer |
(with-temp-buffer |
1942 |
(call-process cvs-program nil (current-buffer) nil |
(call-process cvs-program nil (current-buffer) nil |
1947 |
1))) |
1))) |
1948 |
|
|
1949 |
|
|
1950 |
(defun cvs-mode-find-file (e &optional other) |
(defun cvs-mode-find-file (e &optional other view) |
1951 |
"Select a buffer containing the file. |
"Select a buffer containing the file. |
1952 |
With a prefix, opens the buffer in an OTHER window." |
With a prefix, opens the buffer in an OTHER window." |
1953 |
(interactive (list last-input-event current-prefix-arg)) |
(interactive (list last-input-event current-prefix-arg)) |
1975 |
(let ((buf (if rev (cvs-retrieve-revision fi rev) |
(let ((buf (if rev (cvs-retrieve-revision fi rev) |
1976 |
(find-file-noselect (cvs-fileinfo->full-path fi))))) |
(find-file-noselect (cvs-fileinfo->full-path fi))))) |
1977 |
(funcall (cond ((eq other 'dont-select) 'display-buffer) |
(funcall (cond ((eq other 'dont-select) 'display-buffer) |
1978 |
(other 'switch-to-buffer-other-window) |
(other |
1979 |
(t 'switch-to-buffer)) |
(if view 'view-buffer-other-window |
1980 |
|
'switch-to-buffer-other-window)) |
1981 |
|
(t (if view 'view-buffer 'switch-to-buffer))) |
1982 |
buf) |
buf) |
1983 |
(when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base)) |
(when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base)) |
1984 |
(goto-line (cvs-find-modif fi))) |
(goto-line (cvs-find-modif fi))) |