# HG changeset patch # User Stefan Monnier # Date 1080314107 0 # Node ID 2a426019394d20d63628b95704fc8a87447fdfa6 # Parent 76b831799f4d9bf06833449de6055217c85cd8d1 (Electric-pop-up-window): Avoid popping up a new frame. diff -r 76b831799f4d -r 2a426019394d lisp/electric.el --- a/lisp/electric.el Fri Mar 26 15:12:33 2004 +0000 +++ b/lisp/electric.el Fri Mar 26 15:15:07 2004 +0000 @@ -1,6 +1,6 @@ ;;; electric.el --- window maker and Command loop for `electric' modes -;; Copyright (C) 1985, 1986, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1995, 2004 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -144,12 +144,12 @@ (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) - (save-excursion - (set-buffer buf) + (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))