diff options
| author | Kim F. Storm | 2004-10-15 23:38:04 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-10-15 23:38:04 +0000 |
| commit | d12757b78761972a3d777096e7b3071bc9cfd5e5 (patch) | |
| tree | b402847e45b8d267244a5b2194d8000108668a82 | |
| parent | 9d2475efb0d73d57035b7f1d20068704a0e9ebcd (diff) | |
| download | emacs-d12757b78761972a3d777096e7b3071bc9cfd5e5.tar.gz emacs-d12757b78761972a3d777096e7b3071bc9cfd5e5.zip | |
(cvs-mode-view-file, cvs-mode-view-file-other-window): Add.
(cvs-mode-find-file): Add optional `view' arg to enter view mode.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/pcvs.el | 20 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8c0d9d23f3..f46bc155970 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2004-10-16 Kim F. Storm <storm@cua.dk> | 1 | 2004-10-16 Kim F. Storm <storm@cua.dk> |
| 2 | 2 | ||
| 3 | * fringe.el (fringe-bitmaps): Only initialize when defined. | ||
| 4 | |||
| 3 | * pcvs.el (cvs-mode-view-file, cvs-mode-view-file-other-window): Add. | 5 | * pcvs.el (cvs-mode-view-file, cvs-mode-view-file-other-window): Add. |
| 4 | (cvs-mode-find-file): Add optional `view' arg to enter view mode. | 6 | (cvs-mode-find-file): Add optional `view' arg to enter view mode. |
| 5 | 7 | ||
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 120acbbc2bc..0a666927c52 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -1925,6 +1925,18 @@ to hear about anymore." | |||
| 1925 | (cvs-mode-find-file e 'dont-select)) | 1925 | (cvs-mode-find-file e 'dont-select)) |
| 1926 | 1926 | ||
| 1927 | 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 | |||
| 1928 | (defun cvs-find-modif (fi) | 1940 | (defun cvs-find-modif (fi) |
| 1929 | (with-temp-buffer | 1941 | (with-temp-buffer |
| 1930 | (call-process cvs-program nil (current-buffer) nil | 1942 | (call-process cvs-program nil (current-buffer) nil |
| @@ -1935,7 +1947,7 @@ to hear about anymore." | |||
| 1935 | 1))) | 1947 | 1))) |
| 1936 | 1948 | ||
| 1937 | 1949 | ||
| 1938 | (defun cvs-mode-find-file (e &optional other) | 1950 | (defun cvs-mode-find-file (e &optional other view) |
| 1939 | "Select a buffer containing the file. | 1951 | "Select a buffer containing the file. |
| 1940 | With a prefix, opens the buffer in an OTHER window." | 1952 | With a prefix, opens the buffer in an OTHER window." |
| 1941 | (interactive (list last-input-event current-prefix-arg)) | 1953 | (interactive (list last-input-event current-prefix-arg)) |
| @@ -1963,8 +1975,10 @@ With a prefix, opens the buffer in an OTHER window." | |||
| 1963 | (let ((buf (if rev (cvs-retrieve-revision fi rev) | 1975 | (let ((buf (if rev (cvs-retrieve-revision fi rev) |
| 1964 | (find-file-noselect (cvs-fileinfo->full-path fi))))) | 1976 | (find-file-noselect (cvs-fileinfo->full-path fi))))) |
| 1965 | (funcall (cond ((eq other 'dont-select) 'display-buffer) | 1977 | (funcall (cond ((eq other 'dont-select) 'display-buffer) |
| 1966 | (other 'switch-to-buffer-other-window) | 1978 | (other |
| 1967 | (t 'switch-to-buffer)) | 1979 | (if view 'view-buffer-other-window |
| 1980 | 'switch-to-buffer-other-window)) | ||
| 1981 | (t (if view 'view-buffer 'switch-to-buffer))) | ||
| 1968 | buf) | 1982 | buf) |
| 1969 | (when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base)) | 1983 | (when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base)) |
| 1970 | (goto-line (cvs-find-modif fi))) | 1984 | (goto-line (cvs-find-modif fi))) |