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>
* calendar/calendar.el (calendar-generate-month):
......
......@@ -472,7 +472,7 @@ separate appointment."
(shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t))
(set-buffer-modified-p nil)
(setq buffer-read-only t)
(raise-frame (selected-frame))
(raise-frame)
(select-window this-window)))
(defun appt-delete-window ()
......
......@@ -1346,7 +1346,7 @@ This function is for internal use only."
(> (float-time (or (nth 5 (file-attributes epg-agent-file))
'(0 0 0 0)))
(float-time epg-agent-mtime))))
(redraw-frame (selected-frame)))
(redraw-frame))
(epg-context-set-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."
(interactive "P")
(let ((other (or (and (null arg)
(not (eq (selected-window)
(frame-first-window (selected-frame)))))
(frame-first-window))))
(and arg
(< (prefix-numeric-value arg) 0))))
(start (window-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
non-first windows in Follow mode."
(let* ((orig-buffer (current-buffer))
(top (frame-first-window (selected-frame)))
(top (frame-first-window))
(win top)
who) ; list of (buffer . frame)
;; If the only window in the frame is a minibuffer
......
......@@ -1278,9 +1278,6 @@ keys and their meanings."
;;;; Frame/display capabilities.
(defun selected-terminal ()
"Return the terminal that is now selected."
(frame-terminal (selected-frame)))
(declare-function msdos-mouse-p "dosfns.c")
......
......@@ -1346,7 +1346,7 @@ graphical terminals."
(if coding-system
(setq default-terminal-coding-system coding-system))
(set-terminal-coding-system-internal coding-system terminal)
(redraw-frame (selected-frame)))
(redraw-frame))
(defvar default-keyboard-coding-system nil
"Default value of the keyboard coding system.
......
......@@ -3725,7 +3725,7 @@ to switch to."
;; If the frame was probably made for this buffer, the user
;; probably wants to delete it now.
((display-multi-frame-p)
(delete-frame (selected-frame)))
(delete-frame))
;; The previous frame is where normally they have the Rmail buffer
;; displayed.
(t (other-frame -1))))
......
......@@ -1188,7 +1188,7 @@ The mode-line is changed accordingly."
"Redraw the newsticker window."
(if (fboundp 'force-window-update)
(force-window-update (current-buffer))
(redraw-frame (selected-frame)))
(redraw-frame))
(run-hooks 'newsticker-buffer-change-hook)
(sit-for 0))
......
......@@ -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])
(message "%s" "F90-imenu already exists.")
(imenu-add-to-menubar "F90-imenu")
(redraw-frame (selected-frame))))
(redraw-frame)))
;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t.
......
......@@ -962,7 +962,7 @@ static char * file[] = {
(if (featurep 'xemacs)
nil ; no action necessary, toolbar gets updated automatically
;; On Emacs, redraw the frame to make sure the Toolbar is updated.
(redraw-frame (selected-frame))))
(redraw-frame)))
(provide 'idlw-toolbar)
(provide 'idlwave-toolbar)
......
......@@ -1593,7 +1593,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
(lambda (w)
(and (not (window-dedicated-p w))
(equal (frame-terminal (window-frame w))
(frame-terminal (selected-frame)))))
(frame-terminal))))
'nomini 'visible (selected-window))))
(condition-case nil
(switch-to-buffer next-buffer)
......
......@@ -6630,7 +6630,7 @@ Go to the window from which completion was requested."
(let ((buf completion-reference-buffer))
(if (one-window-p t)
(if (window-dedicated-p (selected-window))
(delete-frame (selected-frame)))
(delete-frame))
(delete-window (selected-window))
(if (get-buffer-window buf)
(select-window (get-buffer-window buf))))))
......
......@@ -50,7 +50,7 @@ Each element has the form (DISPLAY FRAME BUFFER).")
(let ((type (frame-live-p (selected-frame))))
(if (or (eq type t) (eq type 'x))
(talk-add-display
(terminal-name (frame-terminal (selected-frame))))
(terminal-name (frame-terminal)))
(error "Unknown frame type")))
(talk-update-buffers))
......
......@@ -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 the selected frame to the list of frames that
;; need to deal with modify-other-keys.
(push (frame-terminal (selected-frame))
(push (frame-terminal)
xterm-modify-other-keys-terminal-list)
(xterm-turn-on-modify-other-keys))
......@@ -728,7 +728,7 @@ versions of xterm."
(defun xterm-turn-on-modify-other-keys ()
"Turn the modifyOtherKeys feature of xterm back on."
(let ((terminal (frame-terminal (selected-frame))))
(let ((terminal (frame-terminal)))
(when (and (terminal-live-p terminal)
(memq terminal xterm-modify-other-keys-terminal-list))
(send-string-to-terminal "\e[>4;1m" terminal))))
......@@ -742,7 +742,7 @@ versions of xterm."
(defun xterm-remove-modify-other-keys (&optional terminal)
"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)
(memq terminal 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."
(with-output-to-temp-buffer ediff-msg-buffer
(ediff-with-current-buffer standard-output
(fundamental-mode))
(raise-frame (selected-frame))
(raise-frame)
(princ (ediff-version))
(princ "\n\n")
(ediff-with-current-buffer ediff-buffer-A
......@@ -3468,7 +3468,7 @@ Without an argument, it saves customized diff argument, if available
(ediff-with-current-buffer buf
(goto-char (point-min)))
(switch-to-buffer buf)
(raise-frame (selected-frame)))))
(raise-frame))))
(if (frame-live-p ediff-control-frame)
(ediff-reset-mouse ediff-control-frame))
(if (window-live-p ediff-control-window)
......
......@@ -1499,7 +1499,7 @@ With optional NODE, goes to that node."
(if node
(Info-goto-node node)
(message "Type `i' to search for a specific topic"))
(raise-frame (selected-frame)))
(raise-frame))
(error (beep 1)
(with-output-to-temp-buffer ediff-msg-buffer
(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