From 4c2d8cf9b579f14ac94e2ad85efc851b7ec10d3f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 31 Jul 1993 01:05:33 +0000 Subject: [PATCH] (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)). --- lisp/vc.el | 20 ++++++-------------- 1 file 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." (print (cons command squeezed)) (next-line 1) (pop-to-buffer "*vc*") - (vc-shrink-to-fit) (goto-char (point-min)) + (shrink-window-if-larger-than-buffer) (error "Running %s...FAILED (%s)" command (if (integerp status) (format "status %d" status) @@ -762,9 +762,8 @@ and two version designators specifying which versions to compare." (progn (setq unchanged t) (message "No changes to %s since latest version." file)) - (vc-shrink-to-fit) - (goto-char (point-min))) - + (goto-char (point-min)) + (shrink-window-if-larger-than-buffer) ) (not unchanged) ) @@ -951,8 +950,8 @@ on a buffer attached to the file named in the current Dired buffer line." (if nonempty (progn (pop-to-buffer "*vc-status*" t) - (vc-shrink-to-fit) - (goto-char (point-min))) + (goto-char (point-min)) + (shrink-window-if-larger-than-buffer))) (message "No files are currently %s under %s" (if verbose "registered" "locked") default-directory)) )) @@ -1052,8 +1051,8 @@ levels in the snapshot." (progn (vc-backend-print-log buffer-file-name) (pop-to-buffer (get-buffer-create "*vc*")) - (vc-shrink-to-fit) (goto-char (point-min)) + (shrink-window-if-larger-than-buffer) ) (vc-registration-error buffer-file-name) ) @@ -1644,13 +1643,6 @@ Global user options: ;;; These things should probably be generally available -(defun vc-shrink-to-fit () - "Shrink window vertically until it's just large enough to contain its text." - (let ((minsize (1+ (count-lines (point-min) (point-max))))) - (if (< minsize (window-height)) - (let ((window-min-height 2)) - (shrink-window (- (window-height) minsize)))))) - (defun vc-file-tree-walk (func &rest args) "Walk recursively through default directory. Invoke FUNC f ARGS on each non-directory file f underneath it."