diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-08-05 14:35:55 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-08-05 14:35:55 +0400 |
commit | 12b4c0ea03a8c7905254be1cefa234bc8d8a8a88 (patch) | |
tree | a80fd7a077d1cca4b01e757b4dc7641dfe41efb8 /lisp | |
parent | e412eb97cc4e1f9edb1118163f09a77ab9925704 (diff) | |
download | emacs-12b4c0ea03a8c7905254be1cefa234bc8d8a8a88.tar.gz |
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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 23 | ||||
-rw-r--r-- | lisp/calendar/appt.el | 2 | ||||
-rw-r--r-- | lisp/epg.el | 2 | ||||
-rw-r--r-- | lisp/follow.el | 4 | ||||
-rw-r--r-- | lisp/frame.el | 3 | ||||
-rw-r--r-- | lisp/international/mule.el | 2 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 2 | ||||
-rw-r--r-- | lisp/net/newst-plainview.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/f90.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/idlw-toolbar.el | 2 | ||||
-rw-r--r-- | lisp/server.el | 2 | ||||
-rw-r--r-- | lisp/simple.el | 2 | ||||
-rw-r--r-- | lisp/talk.el | 2 | ||||
-rw-r--r-- | lisp/term/xterm.el | 6 | ||||
-rw-r--r-- | lisp/vc/ediff-util.el | 4 | ||||
-rw-r--r-- | lisp/vc/ediff.el | 2 |
16 files changed, 41 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b766235e04..6ca96741b63 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +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): diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index ea3a5b2caf2..97b20f6b02b 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -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 () diff --git a/lisp/epg.el b/lisp/epg.el index 06d972d6ffa..b832ead4d68 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -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)))) diff --git a/lisp/follow.el b/lisp/follow.el index ef26788c0b1..53b32e57031 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -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 diff --git a/lisp/frame.el b/lisp/frame.el index 22cf484e54a..9d3c839fa35 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -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") diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 11c4db5977d..ed98c03fdcc 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -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. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e29becedb6e..8eeb0991653 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -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)))) diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index c7a3a107078..2ba4e5c2716 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el @@ -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)) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 9bde2900a67..80f663360e4 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -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. diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index d255b8b1a3f..98f9ee3b530 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -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) diff --git a/lisp/server.el b/lisp/server.el index 8a2a466a315..8208e0b44d8 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -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) diff --git a/lisp/simple.el b/lisp/simple.el index 1fb2fa6014c..6bb05c14a58 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)))))) diff --git a/lisp/talk.el b/lisp/talk.el index 741571a8d78..8c991c8d995 100644 --- a/lisp/talk.el +++ b/lisp/talk.el @@ -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)) diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 86f4583b987..af0b0b606e5 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -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 diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index ec227f44e8f..8f84dfb14ef 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -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) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index e9a6a97409c..d35c3e53e9a 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -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 |