emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/electric.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/electric.el
Date: Sun, 02 Jan 2005 18:23:08 -0500

Index: emacs/lisp/electric.el
diff -c emacs/lisp/electric.el:1.22 emacs/lisp/electric.el:1.23
*** emacs/lisp/electric.el:1.22 Fri Mar 26 15:15:07 2004
--- emacs/lisp/electric.el      Sun Jan  2 23:11:03 2005
***************
*** 144,174 ****
         (buf (get-buffer buffer))
         (one-window (one-window-p t))
         (pop-up-windows t)
!        (pop-up-frames nil)
!        (target-height)
!        (lines))
      (if (not buf)
        (error "Buffer %s does not exist" buffer)
-       (with-current-buffer buf
-       (setq lines (count-lines (point-min) (point-max)))
-       (setq target-height
-             (min (max (if max-height (min max-height (1+ lines)) (1+ lines))
-                       window-min-height)
-                  (save-window-excursion
-                    (delete-other-windows)
-                    (1- (window-height (selected-window)))))))
        (cond ((and (eq (window-buffer win) buf))
             (select-window win))
            (one-window
             (pop-to-buffer buffer)
!            (setq win (selected-window))
!            (enlarge-window (- target-height (window-height win))))
            (t
             (switch-to-buffer buf)))
!       (if (and (not max-height)
!              (> target-height (window-height (selected-window))))
!         (progn (goto-char (window-start win))
!                (enlarge-window (- target-height (window-height win)))))
        (goto-char (point-min))
        win)))
  
--- 144,160 ----
         (buf (get-buffer buffer))
         (one-window (one-window-p t))
         (pop-up-windows t)
!        (pop-up-frames nil))
      (if (not buf)
        (error "Buffer %s does not exist" buffer)
        (cond ((and (eq (window-buffer win) buf))
             (select-window win))
            (one-window
             (pop-to-buffer buffer)
!            (setq win (selected-window)))
            (t
             (switch-to-buffer buf)))
!       (fit-window-to-buffer win max-height)
        (goto-char (point-min))
        win)))
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]