diff options
| author | Richard M. Stallman | 1993-07-31 01:05:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-07-31 01:05:33 +0000 |
| commit | 4c2d8cf9b579f14ac94e2ad85efc851b7ec10d3f (patch) | |
| tree | 2632bfd254bc2004fc18e654f7e9a5903995142f | |
| parent | 825e4ec2b9313901ac2a4580a4dcf67848aa7360 (diff) | |
| download | emacs-4c2d8cf9b579f14ac94e2ad85efc851b7ec10d3f.tar.gz emacs-4c2d8cf9b579f14ac94e2ad85efc851b7ec10d3f.zip | |
(vc-shrink-to-fit): Deleted. All callers changed to use
the new, fixed `shrink-window-if-larger-than-buffer' instead.
In some places move it after a (goto-char (point-min)).
| -rw-r--r-- | lisp/vc.el | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 5df2c79b67e..7eb4b5c8f69 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -214,8 +214,8 @@ the master name of FILE; this is appended to an optional list of FLAGS." | |||
| 214 | (print (cons command squeezed)) | 214 | (print (cons command squeezed)) |
| 215 | (next-line 1) | 215 | (next-line 1) |
| 216 | (pop-to-buffer "*vc*") | 216 | (pop-to-buffer "*vc*") |
| 217 | (vc-shrink-to-fit) | ||
| 218 | (goto-char (point-min)) | 217 | (goto-char (point-min)) |
| 218 | (shrink-window-if-larger-than-buffer) | ||
| 219 | (error "Running %s...FAILED (%s)" command | 219 | (error "Running %s...FAILED (%s)" command |
| 220 | (if (integerp status) | 220 | (if (integerp status) |
| 221 | (format "status %d" status) | 221 | (format "status %d" status) |
| @@ -762,9 +762,8 @@ and two version designators specifying which versions to compare." | |||
| 762 | (progn | 762 | (progn |
| 763 | (setq unchanged t) | 763 | (setq unchanged t) |
| 764 | (message "No changes to %s since latest version." file)) | 764 | (message "No changes to %s since latest version." file)) |
| 765 | (vc-shrink-to-fit) | 765 | (goto-char (point-min)) |
| 766 | (goto-char (point-min))) | 766 | (shrink-window-if-larger-than-buffer) |
| 767 | |||
| 768 | ) | 767 | ) |
| 769 | (not unchanged) | 768 | (not unchanged) |
| 770 | ) | 769 | ) |
| @@ -951,8 +950,8 @@ on a buffer attached to the file named in the current Dired buffer line." | |||
| 951 | (if nonempty | 950 | (if nonempty |
| 952 | (progn | 951 | (progn |
| 953 | (pop-to-buffer "*vc-status*" t) | 952 | (pop-to-buffer "*vc-status*" t) |
| 954 | (vc-shrink-to-fit) | 953 | (goto-char (point-min)) |
| 955 | (goto-char (point-min))) | 954 | (shrink-window-if-larger-than-buffer))) |
| 956 | (message "No files are currently %s under %s" | 955 | (message "No files are currently %s under %s" |
| 957 | (if verbose "registered" "locked") default-directory)) | 956 | (if verbose "registered" "locked") default-directory)) |
| 958 | )) | 957 | )) |
| @@ -1052,8 +1051,8 @@ levels in the snapshot." | |||
| 1052 | (progn | 1051 | (progn |
| 1053 | (vc-backend-print-log buffer-file-name) | 1052 | (vc-backend-print-log buffer-file-name) |
| 1054 | (pop-to-buffer (get-buffer-create "*vc*")) | 1053 | (pop-to-buffer (get-buffer-create "*vc*")) |
| 1055 | (vc-shrink-to-fit) | ||
| 1056 | (goto-char (point-min)) | 1054 | (goto-char (point-min)) |
| 1055 | (shrink-window-if-larger-than-buffer) | ||
| 1057 | ) | 1056 | ) |
| 1058 | (vc-registration-error buffer-file-name) | 1057 | (vc-registration-error buffer-file-name) |
| 1059 | ) | 1058 | ) |
| @@ -1644,13 +1643,6 @@ Global user options: | |||
| 1644 | 1643 | ||
| 1645 | ;;; These things should probably be generally available | 1644 | ;;; These things should probably be generally available |
| 1646 | 1645 | ||
| 1647 | (defun vc-shrink-to-fit () | ||
| 1648 | "Shrink window vertically until it's just large enough to contain its text." | ||
| 1649 | (let ((minsize (1+ (count-lines (point-min) (point-max))))) | ||
| 1650 | (if (< minsize (window-height)) | ||
| 1651 | (let ((window-min-height 2)) | ||
| 1652 | (shrink-window (- (window-height) minsize)))))) | ||
| 1653 | |||
| 1654 | (defun vc-file-tree-walk (func &rest args) | 1646 | (defun vc-file-tree-walk (func &rest args) |
| 1655 | "Walk recursively through default directory. | 1647 | "Walk recursively through default directory. |
| 1656 | Invoke FUNC f ARGS on each non-directory file f underneath it." | 1648 | Invoke FUNC f ARGS on each non-directory file f underneath it." |