Mercurial > emacs
comparison lisp/vc.el @ 86100:ac69f23a84ce
(vc-diff-internal): Pop-to-buffer later.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 15 Nov 2007 16:33:08 +0000 |
parents | f064a093bf93 |
children | cde7fc4f5945 |
comparison
equal
deleted
inserted
replaced
86099:48dc79c663f4 | 86100:ac69f23a84ce |
---|---|
1936 (not (get-buffer-process (current-buffer)))) | 1936 (not (get-buffer-process (current-buffer)))) |
1937 ;; Treat this case specially so as not to pop the buffer. | 1937 ;; Treat this case specially so as not to pop the buffer. |
1938 (progn | 1938 (progn |
1939 (message "No changes between %s and %s" rev1-name rev2-name) | 1939 (message "No changes between %s and %s" rev1-name rev2-name) |
1940 nil) | 1940 nil) |
1941 (pop-to-buffer (current-buffer)) | |
1942 (diff-mode) | 1941 (diff-mode) |
1943 ;; Make the *vc-diff* buffer read only, the diff-mode key | 1942 ;; Make the *vc-diff* buffer read only, the diff-mode key |
1944 ;; bindings are nicer for read only buffers. pcl-cvs does the | 1943 ;; bindings are nicer for read only buffers. pcl-cvs does the |
1945 ;; same thing. | 1944 ;; same thing. |
1946 (setq buffer-read-only t) | 1945 (setq buffer-read-only t) |
1947 (vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name)) | 1946 (vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name)) |
1947 ;; Display the buffer, but at the end because it can change point. | |
1948 (pop-to-buffer (current-buffer)) | |
1948 ;; In the async case, we return t even if there are no differences | 1949 ;; In the async case, we return t even if there are no differences |
1949 ;; because we don't know that yet. | 1950 ;; because we don't know that yet. |
1950 t))) | 1951 t))) |
1951 | 1952 |
1952 ;;;###autoload | 1953 ;;;###autoload |