diff options
| author | Dmitry Antipov | 2013-08-05 14:35:55 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-05 14:35:55 +0400 |
| commit | 12b4c0ea03a8c7905254be1cefa234bc8d8a8a88 (patch) | |
| tree | a80fd7a077d1cca4b01e757b4dc7641dfe41efb8 /lisp | |
| parent | e412eb97cc4e1f9edb1118163f09a77ab9925704 (diff) | |
| download | emacs-12b4c0ea03a8c7905254be1cefa234bc8d8a8a88.tar.gz emacs-12b4c0ea03a8c7905254be1cefa234bc8d8a8a88.zip | |
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 @@ | |||
| 1 | 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Do not call to `selected-frame' where it is assumed by default. | ||
| 4 | Affected functions are `raise-frame', `redraw-frame', | ||
| 5 | `frame-first-window', `frame-terminal' and `delete-frame'. | ||
| 6 | * calendar/appt.el (appt-disp-window): | ||
| 7 | * epg.el (epg-wait-for-completion): | ||
| 8 | * follow.el (follow-delete-other-windows-and-split) | ||
| 9 | (follow-avoid-tail-recenter): | ||
| 10 | * international/mule.el (set-terminal-coding-system): | ||
| 11 | * mail/rmail.el (rmail-mail-return): | ||
| 12 | * net/newst-plainview.el (newsticker--buffer-set-uptodate): | ||
| 13 | * progmodes/f90.el (f90-add-imenu-menu): | ||
| 14 | * progmodes/idlw-toolbar.el (idlwave-toolbar-toggle): | ||
| 15 | * server.el (server-switch-buffer): | ||
| 16 | * simple.el (delete-completion-window): | ||
| 17 | * talk.el (talk): | ||
| 18 | * term/xterm.el (terminal-init-xterm-modify-other-keys) | ||
| 19 | (xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys): | ||
| 20 | * vc/ediff-util.el (ediff-status-info, ediff-show-diff-output): | ||
| 21 | * vc/ediff.el (ediff-documentation): Related users changed. | ||
| 22 | * frame.el (selected-terminal): Remove the leftover. | ||
| 23 | |||
| 1 | 2013-08-05 Glenn Morris <rgm@gnu.org> | 24 | 2013-08-05 Glenn Morris <rgm@gnu.org> |
| 2 | 25 | ||
| 3 | * calendar/calendar.el (calendar-generate-month): | 26 | * 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." | |||
| 472 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) | 472 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) |
| 473 | (set-buffer-modified-p nil) | 473 | (set-buffer-modified-p nil) |
| 474 | (setq buffer-read-only t) | 474 | (setq buffer-read-only t) |
| 475 | (raise-frame (selected-frame)) | 475 | (raise-frame) |
| 476 | (select-window this-window))) | 476 | (select-window this-window))) |
| 477 | 477 | ||
| 478 | (defun appt-delete-window () | 478 | (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." | |||
| 1346 | (> (float-time (or (nth 5 (file-attributes epg-agent-file)) | 1346 | (> (float-time (or (nth 5 (file-attributes epg-agent-file)) |
| 1347 | '(0 0 0 0))) | 1347 | '(0 0 0 0))) |
| 1348 | (float-time epg-agent-mtime)))) | 1348 | (float-time epg-agent-mtime)))) |
| 1349 | (redraw-frame (selected-frame))) | 1349 | (redraw-frame)) |
| 1350 | (epg-context-set-result-for | 1350 | (epg-context-set-result-for |
| 1351 | context 'error | 1351 | context 'error |
| 1352 | (nreverse (epg-context-result-for context 'error)))) | 1352 | (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." | |||
| 572 | (interactive "P") | 572 | (interactive "P") |
| 573 | (let ((other (or (and (null arg) | 573 | (let ((other (or (and (null arg) |
| 574 | (not (eq (selected-window) | 574 | (not (eq (selected-window) |
| 575 | (frame-first-window (selected-frame))))) | 575 | (frame-first-window)))) |
| 576 | (and arg | 576 | (and arg |
| 577 | (< (prefix-numeric-value arg) 0)))) | 577 | (< (prefix-numeric-value arg) 0)))) |
| 578 | (start (window-start))) | 578 | (start (window-start))) |
| @@ -1083,7 +1083,7 @@ should be a member of WINDOWS, starts at position START." | |||
| 1083 | This is done by reading and rewriting the start position of | 1083 | This is done by reading and rewriting the start position of |
| 1084 | non-first windows in Follow mode." | 1084 | non-first windows in Follow mode." |
| 1085 | (let* ((orig-buffer (current-buffer)) | 1085 | (let* ((orig-buffer (current-buffer)) |
| 1086 | (top (frame-first-window (selected-frame))) | 1086 | (top (frame-first-window)) |
| 1087 | (win top) | 1087 | (win top) |
| 1088 | who) ; list of (buffer . frame) | 1088 | who) ; list of (buffer . frame) |
| 1089 | ;; If the only window in the frame is a minibuffer | 1089 | ;; 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." | |||
| 1278 | 1278 | ||
| 1279 | 1279 | ||
| 1280 | ;;;; Frame/display capabilities. | 1280 | ;;;; Frame/display capabilities. |
| 1281 | (defun selected-terminal () | ||
| 1282 | "Return the terminal that is now selected." | ||
| 1283 | (frame-terminal (selected-frame))) | ||
| 1284 | 1281 | ||
| 1285 | (declare-function msdos-mouse-p "dosfns.c") | 1282 | (declare-function msdos-mouse-p "dosfns.c") |
| 1286 | 1283 | ||
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." | |||
| 1346 | (if coding-system | 1346 | (if coding-system |
| 1347 | (setq default-terminal-coding-system coding-system)) | 1347 | (setq default-terminal-coding-system coding-system)) |
| 1348 | (set-terminal-coding-system-internal coding-system terminal) | 1348 | (set-terminal-coding-system-internal coding-system terminal) |
| 1349 | (redraw-frame (selected-frame))) | 1349 | (redraw-frame)) |
| 1350 | 1350 | ||
| 1351 | (defvar default-keyboard-coding-system nil | 1351 | (defvar default-keyboard-coding-system nil |
| 1352 | "Default value of the keyboard coding system. | 1352 | "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." | |||
| 3725 | ;; If the frame was probably made for this buffer, the user | 3725 | ;; If the frame was probably made for this buffer, the user |
| 3726 | ;; probably wants to delete it now. | 3726 | ;; probably wants to delete it now. |
| 3727 | ((display-multi-frame-p) | 3727 | ((display-multi-frame-p) |
| 3728 | (delete-frame (selected-frame))) | 3728 | (delete-frame)) |
| 3729 | ;; The previous frame is where normally they have the Rmail buffer | 3729 | ;; The previous frame is where normally they have the Rmail buffer |
| 3730 | ;; displayed. | 3730 | ;; displayed. |
| 3731 | (t (other-frame -1)))) | 3731 | (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." | |||
| 1188 | "Redraw the newsticker window." | 1188 | "Redraw the newsticker window." |
| 1189 | (if (fboundp 'force-window-update) | 1189 | (if (fboundp 'force-window-update) |
| 1190 | (force-window-update (current-buffer)) | 1190 | (force-window-update (current-buffer)) |
| 1191 | (redraw-frame (selected-frame))) | 1191 | (redraw-frame)) |
| 1192 | (run-hooks 'newsticker-buffer-change-hook) | 1192 | (run-hooks 'newsticker-buffer-change-hook) |
| 1193 | (sit-for 0)) | 1193 | (sit-for 0)) |
| 1194 | 1194 | ||
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." | |||
| 1026 | (if (lookup-key (current-local-map) [menu-bar index]) | 1026 | (if (lookup-key (current-local-map) [menu-bar index]) |
| 1027 | (message "%s" "F90-imenu already exists.") | 1027 | (message "%s" "F90-imenu already exists.") |
| 1028 | (imenu-add-to-menubar "F90-imenu") | 1028 | (imenu-add-to-menubar "F90-imenu") |
| 1029 | (redraw-frame (selected-frame)))) | 1029 | (redraw-frame))) |
| 1030 | 1030 | ||
| 1031 | 1031 | ||
| 1032 | ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. | 1032 | ;; 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[] = { | |||
| 962 | (if (featurep 'xemacs) | 962 | (if (featurep 'xemacs) |
| 963 | nil ; no action necessary, toolbar gets updated automatically | 963 | nil ; no action necessary, toolbar gets updated automatically |
| 964 | ;; On Emacs, redraw the frame to make sure the Toolbar is updated. | 964 | ;; On Emacs, redraw the frame to make sure the Toolbar is updated. |
| 965 | (redraw-frame (selected-frame)))) | 965 | (redraw-frame))) |
| 966 | 966 | ||
| 967 | (provide 'idlw-toolbar) | 967 | (provide 'idlw-toolbar) |
| 968 | (provide 'idlwave-toolbar) | 968 | (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)." | |||
| 1593 | (lambda (w) | 1593 | (lambda (w) |
| 1594 | (and (not (window-dedicated-p w)) | 1594 | (and (not (window-dedicated-p w)) |
| 1595 | (equal (frame-terminal (window-frame w)) | 1595 | (equal (frame-terminal (window-frame w)) |
| 1596 | (frame-terminal (selected-frame))))) | 1596 | (frame-terminal)))) |
| 1597 | 'nomini 'visible (selected-window)))) | 1597 | 'nomini 'visible (selected-window)))) |
| 1598 | (condition-case nil | 1598 | (condition-case nil |
| 1599 | (switch-to-buffer next-buffer) | 1599 | (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." | |||
| 6630 | (let ((buf completion-reference-buffer)) | 6630 | (let ((buf completion-reference-buffer)) |
| 6631 | (if (one-window-p t) | 6631 | (if (one-window-p t) |
| 6632 | (if (window-dedicated-p (selected-window)) | 6632 | (if (window-dedicated-p (selected-window)) |
| 6633 | (delete-frame (selected-frame))) | 6633 | (delete-frame)) |
| 6634 | (delete-window (selected-window)) | 6634 | (delete-window (selected-window)) |
| 6635 | (if (get-buffer-window buf) | 6635 | (if (get-buffer-window buf) |
| 6636 | (select-window (get-buffer-window buf)))))) | 6636 | (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).") | |||
| 50 | (let ((type (frame-live-p (selected-frame)))) | 50 | (let ((type (frame-live-p (selected-frame)))) |
| 51 | (if (or (eq type t) (eq type 'x)) | 51 | (if (or (eq type t) (eq type 'x)) |
| 52 | (talk-add-display | 52 | (talk-add-display |
| 53 | (terminal-name (frame-terminal (selected-frame)))) | 53 | (terminal-name (frame-terminal))) |
| 54 | (error "Unknown frame type"))) | 54 | (error "Unknown frame type"))) |
| 55 | (talk-update-buffers)) | 55 | (talk-update-buffers)) |
| 56 | 56 | ||
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." | |||
| 606 | (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) | 606 | (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) |
| 607 | ;; Add the selected frame to the list of frames that | 607 | ;; Add the selected frame to the list of frames that |
| 608 | ;; need to deal with modify-other-keys. | 608 | ;; need to deal with modify-other-keys. |
| 609 | (push (frame-terminal (selected-frame)) | 609 | (push (frame-terminal) |
| 610 | xterm-modify-other-keys-terminal-list) | 610 | xterm-modify-other-keys-terminal-list) |
| 611 | (xterm-turn-on-modify-other-keys)) | 611 | (xterm-turn-on-modify-other-keys)) |
| 612 | 612 | ||
| @@ -728,7 +728,7 @@ versions of xterm." | |||
| 728 | 728 | ||
| 729 | (defun xterm-turn-on-modify-other-keys () | 729 | (defun xterm-turn-on-modify-other-keys () |
| 730 | "Turn the modifyOtherKeys feature of xterm back on." | 730 | "Turn the modifyOtherKeys feature of xterm back on." |
| 731 | (let ((terminal (frame-terminal (selected-frame)))) | 731 | (let ((terminal (frame-terminal))) |
| 732 | (when (and (terminal-live-p terminal) | 732 | (when (and (terminal-live-p terminal) |
| 733 | (memq terminal xterm-modify-other-keys-terminal-list)) | 733 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 734 | (send-string-to-terminal "\e[>4;1m" terminal)))) | 734 | (send-string-to-terminal "\e[>4;1m" terminal)))) |
| @@ -742,7 +742,7 @@ versions of xterm." | |||
| 742 | 742 | ||
| 743 | (defun xterm-remove-modify-other-keys (&optional terminal) | 743 | (defun xterm-remove-modify-other-keys (&optional terminal) |
| 744 | "Turn off the modifyOtherKeys feature of xterm for good." | 744 | "Turn off the modifyOtherKeys feature of xterm for good." |
| 745 | (setq terminal (or terminal (frame-terminal (selected-frame)))) | 745 | (setq terminal (or terminal (frame-terminal))) |
| 746 | (when (and (terminal-live-p terminal) | 746 | (when (and (terminal-live-p terminal) |
| 747 | (memq terminal xterm-modify-other-keys-terminal-list)) | 747 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 748 | (setq xterm-modify-other-keys-terminal-list | 748 | (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." | |||
| 2818 | (with-output-to-temp-buffer ediff-msg-buffer | 2818 | (with-output-to-temp-buffer ediff-msg-buffer |
| 2819 | (ediff-with-current-buffer standard-output | 2819 | (ediff-with-current-buffer standard-output |
| 2820 | (fundamental-mode)) | 2820 | (fundamental-mode)) |
| 2821 | (raise-frame (selected-frame)) | 2821 | (raise-frame) |
| 2822 | (princ (ediff-version)) | 2822 | (princ (ediff-version)) |
| 2823 | (princ "\n\n") | 2823 | (princ "\n\n") |
| 2824 | (ediff-with-current-buffer ediff-buffer-A | 2824 | (ediff-with-current-buffer ediff-buffer-A |
| @@ -3468,7 +3468,7 @@ Without an argument, it saves customized diff argument, if available | |||
| 3468 | (ediff-with-current-buffer buf | 3468 | (ediff-with-current-buffer buf |
| 3469 | (goto-char (point-min))) | 3469 | (goto-char (point-min))) |
| 3470 | (switch-to-buffer buf) | 3470 | (switch-to-buffer buf) |
| 3471 | (raise-frame (selected-frame))))) | 3471 | (raise-frame)))) |
| 3472 | (if (frame-live-p ediff-control-frame) | 3472 | (if (frame-live-p ediff-control-frame) |
| 3473 | (ediff-reset-mouse ediff-control-frame)) | 3473 | (ediff-reset-mouse ediff-control-frame)) |
| 3474 | (if (window-live-p ediff-control-window) | 3474 | (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." | |||
| 1499 | (if node | 1499 | (if node |
| 1500 | (Info-goto-node node) | 1500 | (Info-goto-node node) |
| 1501 | (message "Type `i' to search for a specific topic")) | 1501 | (message "Type `i' to search for a specific topic")) |
| 1502 | (raise-frame (selected-frame))) | 1502 | (raise-frame)) |
| 1503 | (error (beep 1) | 1503 | (error (beep 1) |
| 1504 | (with-output-to-temp-buffer ediff-msg-buffer | 1504 | (with-output-to-temp-buffer ediff-msg-buffer |
| 1505 | (ediff-with-current-buffer standard-output | 1505 | (ediff-with-current-buffer standard-output |