Commit 12b4c0ea authored by Dmitry Antipov's avatar Dmitry Antipov

Do not call to `selected-frame' where it is assumed by default.

Affected functions are `raise-frame', `redraw-frame',
`frame-first-window', `frame-terminal' and `delete-frame'.
* lisp/calendar/appt.el (appt-disp-window):
* lisp/epg.el (epg-wait-for-completion):
* lisp/follow.el (follow-delete-other-windows-and-split)
(follow-avoid-tail-recenter):
* lisp/international/mule.el (set-terminal-coding-system):
* lisp/mail/rmail.el (rmail-mail-return):
* lisp/net/newst-plainview.el (newsticker--buffer-set-uptodate):
* lisp/progmodes/f90.el (f90-add-imenu-menu):
* lisp/progmodes/idlw-toolbar.el (idlwave-toolbar-toggle):
* lisp/server.el (server-switch-buffer):
* lisp/simple.el (delete-completion-window):
* lisp/talk.el (talk):
* lisp/term/xterm.el (terminal-init-xterm-modify-other-keys)
(xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys):
* lisp/vc/ediff-util.el (ediff-status-info, ediff-show-diff-output):
* lisp/vc/ediff.el (ediff-documentation): Related users changed.
* lisp/frame.el (selected-terminal): Remove the leftover.
parent e412eb97
2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
Do not call to `selected-frame' where it is assumed by default.
Affected functions are `raise-frame', `redraw-frame',
`frame-first-window', `frame-terminal' and `delete-frame'.
* calendar/appt.el (appt-disp-window):
* epg.el (epg-wait-for-completion):
* follow.el (follow-delete-other-windows-and-split)
(follow-avoid-tail-recenter):
* international/mule.el (set-terminal-coding-system):
* mail/rmail.el (rmail-mail-return):
* net/newst-plainview.el (newsticker--buffer-set-uptodate):
* progmodes/f90.el (f90-add-imenu-menu):
* progmodes/idlw-toolbar.el (idlwave-toolbar-toggle):
* server.el (server-switch-buffer):
* simple.el (delete-completion-window):
* talk.el (talk):
* term/xterm.el (terminal-init-xterm-modify-other-keys)
(xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys):
* vc/ediff-util.el (ediff-status-info, ediff-show-diff-output):
* vc/ediff.el (ediff-documentation): Related users changed.
* frame.el (selected-terminal): Remove the leftover.
2013-08-05 Glenn Morris <rgm@gnu.org> 2013-08-05 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (calendar-generate-month): * calendar/calendar.el (calendar-generate-month):
......
...@@ -472,7 +472,7 @@ separate appointment." ...@@ -472,7 +472,7 @@ separate appointment."
(shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t))
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(setq buffer-read-only t) (setq buffer-read-only t)
(raise-frame (selected-frame)) (raise-frame)
(select-window this-window))) (select-window this-window)))
(defun appt-delete-window () (defun appt-delete-window ()
......
...@@ -1346,7 +1346,7 @@ This function is for internal use only." ...@@ -1346,7 +1346,7 @@ This function is for internal use only."
(> (float-time (or (nth 5 (file-attributes epg-agent-file)) (> (float-time (or (nth 5 (file-attributes epg-agent-file))
'(0 0 0 0))) '(0 0 0 0)))
(float-time epg-agent-mtime)))) (float-time epg-agent-mtime))))
(redraw-frame (selected-frame))) (redraw-frame))
(epg-context-set-result-for (epg-context-set-result-for
context 'error context 'error
(nreverse (epg-context-result-for context 'error)))) (nreverse (epg-context-result-for context 'error))))
......
...@@ -572,7 +572,7 @@ selected if the original window is the first one in the frame." ...@@ -572,7 +572,7 @@ selected if the original window is the first one in the frame."
(interactive "P") (interactive "P")
(let ((other (or (and (null arg) (let ((other (or (and (null arg)
(not (eq (selected-window) (not (eq (selected-window)
(frame-first-window (selected-frame))))) (frame-first-window))))
(and arg (and arg
(< (prefix-numeric-value arg) 0)))) (< (prefix-numeric-value arg) 0))))
(start (window-start))) (start (window-start)))
...@@ -1083,7 +1083,7 @@ should be a member of WINDOWS, starts at position START." ...@@ -1083,7 +1083,7 @@ should be a member of WINDOWS, starts at position START."
This is done by reading and rewriting the start position of This is done by reading and rewriting the start position of
non-first windows in Follow mode." non-first windows in Follow mode."
(let* ((orig-buffer (current-buffer)) (let* ((orig-buffer (current-buffer))
(top (frame-first-window (selected-frame))) (top (frame-first-window))
(win top) (win top)
who) ; list of (buffer . frame) who) ; list of (buffer . frame)
;; If the only window in the frame is a minibuffer ;; If the only window in the frame is a minibuffer
......
...@@ -1278,9 +1278,6 @@ keys and their meanings." ...@@ -1278,9 +1278,6 @@ keys and their meanings."
;;;; Frame/display capabilities. ;;;; Frame/display capabilities.
(defun selected-terminal ()
"Return the terminal that is now selected."
(frame-terminal (selected-frame)))
(declare-function msdos-mouse-p "dosfns.c") (declare-function msdos-mouse-p "dosfns.c")
......
...@@ -1346,7 +1346,7 @@ graphical terminals." ...@@ -1346,7 +1346,7 @@ graphical terminals."
(if coding-system (if coding-system
(setq default-terminal-coding-system coding-system)) (setq default-terminal-coding-system coding-system))
(set-terminal-coding-system-internal coding-system terminal) (set-terminal-coding-system-internal coding-system terminal)
(redraw-frame (selected-frame))) (redraw-frame))
(defvar default-keyboard-coding-system nil (defvar default-keyboard-coding-system nil
"Default value of the keyboard coding system. "Default value of the keyboard coding system.
......
...@@ -3725,7 +3725,7 @@ to switch to." ...@@ -3725,7 +3725,7 @@ to switch to."
;; If the frame was probably made for this buffer, the user ;; If the frame was probably made for this buffer, the user
;; probably wants to delete it now. ;; probably wants to delete it now.
((display-multi-frame-p) ((display-multi-frame-p)
(delete-frame (selected-frame))) (delete-frame))
;; The previous frame is where normally they have the Rmail buffer ;; The previous frame is where normally they have the Rmail buffer
;; displayed. ;; displayed.
(t (other-frame -1)))) (t (other-frame -1))))
......
...@@ -1188,7 +1188,7 @@ The mode-line is changed accordingly." ...@@ -1188,7 +1188,7 @@ The mode-line is changed accordingly."
"Redraw the newsticker window." "Redraw the newsticker window."
(if (fboundp 'force-window-update) (if (fboundp 'force-window-update)
(force-window-update (current-buffer)) (force-window-update (current-buffer))
(redraw-frame (selected-frame))) (redraw-frame))
(run-hooks 'newsticker-buffer-change-hook) (run-hooks 'newsticker-buffer-change-hook)
(sit-for 0)) (sit-for 0))
......
...@@ -1026,7 +1026,7 @@ Set subexpression 1 in the match-data to the name of the type." ...@@ -1026,7 +1026,7 @@ Set subexpression 1 in the match-data to the name of the type."
(if (lookup-key (current-local-map) [menu-bar index]) (if (lookup-key (current-local-map) [menu-bar index])
(message "%s" "F90-imenu already exists.") (message "%s" "F90-imenu already exists.")
(imenu-add-to-menubar "F90-imenu") (imenu-add-to-menubar "F90-imenu")
(redraw-frame (selected-frame)))) (redraw-frame)))
;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t.
......
...@@ -962,7 +962,7 @@ static char * file[] = { ...@@ -962,7 +962,7 @@ static char * file[] = {
(if (featurep 'xemacs) (if (featurep 'xemacs)
nil ; no action necessary, toolbar gets updated automatically nil ; no action necessary, toolbar gets updated automatically
;; On Emacs, redraw the frame to make sure the Toolbar is updated. ;; On Emacs, redraw the frame to make sure the Toolbar is updated.
(redraw-frame (selected-frame)))) (redraw-frame)))
(provide 'idlw-toolbar) (provide 'idlw-toolbar)
(provide 'idlwave-toolbar) (provide 'idlwave-toolbar)
......
...@@ -1593,7 +1593,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)." ...@@ -1593,7 +1593,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
(lambda (w) (lambda (w)
(and (not (window-dedicated-p w)) (and (not (window-dedicated-p w))
(equal (frame-terminal (window-frame w)) (equal (frame-terminal (window-frame w))
(frame-terminal (selected-frame))))) (frame-terminal))))
'nomini 'visible (selected-window)))) 'nomini 'visible (selected-window))))
(condition-case nil (condition-case nil
(switch-to-buffer next-buffer) (switch-to-buffer next-buffer)
......
...@@ -6630,7 +6630,7 @@ Go to the window from which completion was requested." ...@@ -6630,7 +6630,7 @@ Go to the window from which completion was requested."
(let ((buf completion-reference-buffer)) (let ((buf completion-reference-buffer))
(if (one-window-p t) (if (one-window-p t)
(if (window-dedicated-p (selected-window)) (if (window-dedicated-p (selected-window))
(delete-frame (selected-frame))) (delete-frame))
(delete-window (selected-window)) (delete-window (selected-window))
(if (get-buffer-window buf) (if (get-buffer-window buf)
(select-window (get-buffer-window buf)))))) (select-window (get-buffer-window buf))))))
......
...@@ -50,7 +50,7 @@ Each element has the form (DISPLAY FRAME BUFFER).") ...@@ -50,7 +50,7 @@ Each element has the form (DISPLAY FRAME BUFFER).")
(let ((type (frame-live-p (selected-frame)))) (let ((type (frame-live-p (selected-frame))))
(if (or (eq type t) (eq type 'x)) (if (or (eq type t) (eq type 'x))
(talk-add-display (talk-add-display
(terminal-name (frame-terminal (selected-frame)))) (terminal-name (frame-terminal)))
(error "Unknown frame type"))) (error "Unknown frame type")))
(talk-update-buffers)) (talk-update-buffers))
......
...@@ -606,7 +606,7 @@ We run the first FUNCTION whose STRING matches the input events." ...@@ -606,7 +606,7 @@ We run the first FUNCTION whose STRING matches the input events."
(add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys)
;; Add the selected frame to the list of frames that ;; Add the selected frame to the list of frames that
;; need to deal with modify-other-keys. ;; need to deal with modify-other-keys.
(push (frame-terminal (selected-frame)) (push (frame-terminal)
xterm-modify-other-keys-terminal-list) xterm-modify-other-keys-terminal-list)
(xterm-turn-on-modify-other-keys)) (xterm-turn-on-modify-other-keys))
...@@ -728,7 +728,7 @@ versions of xterm." ...@@ -728,7 +728,7 @@ versions of xterm."
(defun xterm-turn-on-modify-other-keys () (defun xterm-turn-on-modify-other-keys ()
"Turn the modifyOtherKeys feature of xterm back on." "Turn the modifyOtherKeys feature of xterm back on."
(let ((terminal (frame-terminal (selected-frame)))) (let ((terminal (frame-terminal)))
(when (and (terminal-live-p terminal) (when (and (terminal-live-p terminal)
(memq terminal xterm-modify-other-keys-terminal-list)) (memq terminal xterm-modify-other-keys-terminal-list))
(send-string-to-terminal "\e[>4;1m" terminal)))) (send-string-to-terminal "\e[>4;1m" terminal))))
...@@ -742,7 +742,7 @@ versions of xterm." ...@@ -742,7 +742,7 @@ versions of xterm."
(defun xterm-remove-modify-other-keys (&optional terminal) (defun xterm-remove-modify-other-keys (&optional terminal)
"Turn off the modifyOtherKeys feature of xterm for good." "Turn off the modifyOtherKeys feature of xterm for good."
(setq terminal (or terminal (frame-terminal (selected-frame)))) (setq terminal (or terminal (frame-terminal)))
(when (and (terminal-live-p terminal) (when (and (terminal-live-p terminal)
(memq terminal xterm-modify-other-keys-terminal-list)) (memq terminal xterm-modify-other-keys-terminal-list))
(setq xterm-modify-other-keys-terminal-list (setq xterm-modify-other-keys-terminal-list
......
...@@ -2818,7 +2818,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." ...@@ -2818,7 +2818,7 @@ Hit \\[ediff-recenter] to reset the windows afterward."
(with-output-to-temp-buffer ediff-msg-buffer (with-output-to-temp-buffer ediff-msg-buffer
(ediff-with-current-buffer standard-output (ediff-with-current-buffer standard-output
(fundamental-mode)) (fundamental-mode))
(raise-frame (selected-frame)) (raise-frame)
(princ (ediff-version)) (princ (ediff-version))
(princ "\n\n") (princ "\n\n")
(ediff-with-current-buffer ediff-buffer-A (ediff-with-current-buffer ediff-buffer-A
...@@ -3468,7 +3468,7 @@ Without an argument, it saves customized diff argument, if available ...@@ -3468,7 +3468,7 @@ Without an argument, it saves customized diff argument, if available
(ediff-with-current-buffer buf (ediff-with-current-buffer buf
(goto-char (point-min))) (goto-char (point-min)))
(switch-to-buffer buf) (switch-to-buffer buf)
(raise-frame (selected-frame))))) (raise-frame))))
(if (frame-live-p ediff-control-frame) (if (frame-live-p ediff-control-frame)
(ediff-reset-mouse ediff-control-frame)) (ediff-reset-mouse ediff-control-frame))
(if (window-live-p ediff-control-window) (if (window-live-p ediff-control-window)
......
...@@ -1499,7 +1499,7 @@ With optional NODE, goes to that node." ...@@ -1499,7 +1499,7 @@ With optional NODE, goes to that node."
(if node (if node
(Info-goto-node node) (Info-goto-node node)
(message "Type `i' to search for a specific topic")) (message "Type `i' to search for a specific topic"))
(raise-frame (selected-frame))) (raise-frame))
(error (beep 1) (error (beep 1)
(with-output-to-temp-buffer ediff-msg-buffer (with-output-to-temp-buffer ediff-msg-buffer
(ediff-with-current-buffer standard-output (ediff-with-current-buffer standard-output
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment