diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-12 16:21:41 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-12 16:21:41 -0400 |
commit | 379add74c2635c38ee43f4e649a7d7aa12e03485 (patch) | |
tree | 7632f8f12e98ee7cd908db9a7979ed8fb3ce33e1 /lisp/term | |
parent | ae5e4c483a4700fed927f546eebf06d1b1e92057 (diff) | |
download | emacs-379add74c2635c38ee43f4e649a7d7aa12e03485.tar.gz |
* lisp/term/ns-win.el (parameters): Don't declare as dynamic.
(before-make-frame-hook): Don't add ineffective function.
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/ns-win.el | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index b4693a5451a..225f809d70b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -556,29 +556,9 @@ unless the current buffer is a scratch buffer." (interactive) (other-frame -1)) -;; If no position specified, make new frame offset by 25 from current. -;; You'd think this was a window manager's job, but apparently without -;; this, new frames open exactly on top of old ones (?). -;; http://lists.gnu.org/archive/html/emacs-devel/2010-10/msg00988.html -;; Note that AFAICS it is not documented that functions on -;; before-make-frame-hook can access PARAMETERS. -(defvar parameters) ; dynamically bound in make-frame -(add-hook 'before-make-frame-hook - (lambda () - (let ((left (cdr (assq 'left (frame-parameters)))) - (top (cdr (assq 'top (frame-parameters))))) - (if (consp left) (setq left (cadr left))) - (if (consp top) (setq top (cadr top))) - (cond - ((or (assq 'top parameters) (assq 'left parameters))) - ((or (not left) (not top))) - (t - (setq parameters (cons (cons 'left (+ left 25)) - (cons (cons 'top (+ top 25)) - parameters)))))))) - -;; frame will be focused anyway, so select it +;; Frame will be focused anyway, so select it ;; (if this is not done, mode line is dimmed until first interaction) +;; FIXME: Sounds like we're working around a bug in the underlying code. (add-hook 'after-make-frame-functions 'select-frame) (defvar tool-bar-mode) |