emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113705: Do not call to `selected-window' where it i


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r113705: Do not call to `selected-window' where it is assumed by default.
Date: Mon, 05 Aug 2013 14:27:28 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113705
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-08-05 18:26:57 +0400
message:
  Do not call to `selected-window' where it is assumed by default.
  Affected functions are `window-minibuffer-p', `window-dedicated-p',
  `window-hscroll', `window-width', `window-height', `window-buffer',
  `window-frame', `window-start', `window-point', `next-window'
  and `window-display-table'.
  * abbrev.el (abbrev--default-expand):
  * bs.el (bs--show-with-configuration):
  * buff-menu.el (Buffer-menu-mouse-select):
  * calc/calc.el (calc):
  * calendar/calendar.el (calendar-generate-window):
  * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
  (diary-make-entry):
  * comint.el (send-invisible, comint-dynamic-complete-filename)
  (comint-dynamic-simple-complete, comint-dynamic-list-completions):
  * completion.el (complete):
  * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
  * disp-table.el (describe-current-display-table):
  * doc-view.el (doc-view-insert-image):
  * ebuff-menu.el (Electric-buffer-menu-mouse-select):
  * ehelp.el (with-electric-help):
  * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
  * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
  * emacs-lisp/helper.el (Helper-help-scroller):
  * emulation/cua-base.el (cua--post-command-handler-1):
  * eshell/esh-mode.el (eshell-output-filter):
  * ffap.el (ffap-gnus-wrapper):
  * help-macro.el (make-help-screen):
  * hilit-chg.el (highlight-compare-buffers):
  * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
  * hl-line.el (global-hl-line-highlight):
  * icomplete.el (icomplete-simple-completing-p):
  * isearch.el (isearch-done):
  * jit-lock.el (jit-lock-stealth-fontify):
  * mail/rmailsum.el (rmail-summary-scroll-msg-up):
  * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
  * mpc.el (mpc-tagbrowser, mpc):
  * net/rcirc.el (rcirc-any-buffer):
  * play/gomoku.el (gomoku-max-width, gomoku-max-height):
  * play/landmark.el (landmark-max-width, landmark-max-height):
  * play/zone.el (zone):
  * progmodes/compile.el (compilation-goto-locus):
  * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
  * progmodes/etags.el (find-tag-other-window):
  * progmodes/fortran.el (fortran-column-ruler):
  * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
  * progmodes/verilog-mode.el (verilog-point-text):
  * reposition.el (reposition-window):
  * rot13.el (toggle-rot13-mode):
  * server.el (server-switch-buffer):
  * shell.el (shell-dynamic-complete-command)
  (shell-dynamic-complete-environment-variable):
  * simple.el (insert-buffer, set-selective-display)
  (delete-completion-window):
  * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
  (speedbar-recenter):
  * startup.el (fancy-splash-head):
  * textmodes/ispell.el (ispell-command-loop):
  * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
  * tutorial.el (help-with-tutorial):
  * vc/add-log.el (add-change-log-entry):
  * vc/compare-w.el (compare-windows):
  * vc/ediff-help.el (ediff-indent-help-message):
  * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
  * vc/ediff-wind.el (ediff-skip-unsuitable-frames)
  (ediff-setup-control-frame):
  * vc/emerge.el (emerge-position-region):
  * vc/pcvs-util.el (cvs-bury-buffer):
  * window.el (walk-windows, mouse-autoselect-window-select):
  * winner.el (winner-set-conf, winner-undo): Related users changed.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/abbrev.el                 abbrev.el-20091113204419-o5vbwnq5f7feedwu-281
  lisp/bs.el                     bs.el-20091113204419-o5vbwnq5f7feedwu-1737
  lisp/buff-menu.el              buffmenu.el-20091113204419-o5vbwnq5f7feedwu-197
  lisp/calc/calc.el              calc.el-20091113204419-o5vbwnq5f7feedwu-2306
  lisp/calendar/calendar.el      calendar.el-20091113204419-o5vbwnq5f7feedwu-478
  lisp/calendar/diary-lib.el     diarylib.el-20091113204419-o5vbwnq5f7feedwu-902
  lisp/comint.el                 comint.el-20091113204419-o5vbwnq5f7feedwu-149
  lisp/completion.el             
completion.el-20091113204419-o5vbwnq5f7feedwu-115
  lisp/dabbrev.el                dabbrev.el-20091113204419-o5vbwnq5f7feedwu-234
  lisp/disp-table.el             disptable.el-20091113204419-o5vbwnq5f7feedwu-64
  lisp/doc-view.el               docview.el-20091113204419-o5vbwnq5f7feedwu-6334
  lisp/ebuff-menu.el             
ebuffmenu.el-20091113204419-o5vbwnq5f7feedwu-401
  lisp/ehelp.el                  ehelp.el-20091113204419-o5vbwnq5f7feedwu-65
  lisp/emacs-lisp/easy-mmode.el  
easymmode.el-20091113204419-o5vbwnq5f7feedwu-1190
  lisp/emacs-lisp/edebug.el      edebug.el-20091113204419-o5vbwnq5f7feedwu-483
  lisp/emacs-lisp/helper.el      helper.el-20091113204419-o5vbwnq5f7feedwu-67
  lisp/emulation/cua-base.el     cuabase.el-20091113204419-o5vbwnq5f7feedwu-2415
  lisp/eshell/esh-mode.el        eshmode.el-20091113204419-o5vbwnq5f7feedwu-1848
  lisp/ffap.el                   ffap.el-20091113204419-o5vbwnq5f7feedwu-953
  lisp/help-macro.el             
helpmacro.el-20091113204419-o5vbwnq5f7feedwu-563
  lisp/hilit-chg.el              
hilitchg.el-20091113204419-o5vbwnq5f7feedwu-1287
  lisp/hippie-exp.el             
hippieexp.el-20091113204419-o5vbwnq5f7feedwu-531
  lisp/hl-line.el                hlline.el-20091113204419-o5vbwnq5f7feedwu-1318
  lisp/icomplete.el              
icomplete.el-20091113204419-o5vbwnq5f7feedwu-643
  lisp/isearch.el                isearch.el-20091113204419-o5vbwnq5f7feedwu-486
  lisp/jit-lock.el               jitlock.el-20091113204419-o5vbwnq5f7feedwu-1321
  lisp/mail/rmail.el             rmail.el-20091113204419-o5vbwnq5f7feedwu-8812
  lisp/mail/rmailsum.el          
rmailsum.el-20091113204419-o5vbwnq5f7feedwu-8819
  lisp/mouse-drag.el             
mousedrag.el-20091113204419-o5vbwnq5f7feedwu-1015
  lisp/mpc.el                    mpc.el-20091201190351-ubdosyf8lle4bzd3-10
  lisp/net/rcirc.el              rcirc.el-20091113204419-o5vbwnq5f7feedwu-4032
  lisp/play/gomoku.el            gomoku.el-20091113204419-o5vbwnq5f7feedwu-80
  lisp/play/landmark.el          
landmark.el-20091113204419-o5vbwnq5f7feedwu-1175
  lisp/play/zone.el              zone.el-20091113204419-o5vbwnq5f7feedwu-1890
  lisp/progmodes/compile.el      compile.el-20091113204419-o5vbwnq5f7feedwu-126
  lisp/progmodes/ebrowse.el      ebrowse.el-20091113204419-o5vbwnq5f7feedwu-1799
  lisp/progmodes/etags.el        etags.el-20091113204419-o5vbwnq5f7feedwu-267
  lisp/progmodes/fortran.el      fortran.el-20091113204419-o5vbwnq5f7feedwu-263
  lisp/progmodes/gdb-mi.el       gdbmi.el-20100327132052-973a0aspo2g2bze8-1
  lisp/progmodes/verilog-mode.el 
verilogmode.el-20091113204419-o5vbwnq5f7feedwu-8207
  lisp/reposition.el             
reposition.el-20091113204419-o5vbwnq5f7feedwu-198
  lisp/rot13.el                  rot13.el-20091113204419-o5vbwnq5f7feedwu-470
  lisp/server.el                 server.el-20091113204419-o5vbwnq5f7feedwu-107
  lisp/shell.el                  shell.el-20091113204419-o5vbwnq5f7feedwu-150
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
  lisp/speedbar.el               
speedbar.el-20091113204419-o5vbwnq5f7feedwu-1271
  lisp/startup.el                startup.el-20091113204419-o5vbwnq5f7feedwu-260
  lisp/textmodes/ispell.el       ispell.el-20091113204419-o5vbwnq5f7feedwu-694
  lisp/textmodes/makeinfo.el     makeinfo.el-20091113204419-o5vbwnq5f7feedwu-599
  lisp/tutorial.el               
tutorial.el-20091113204419-o5vbwnq5f7feedwu-4434
  lisp/vc/add-log.el             addlog.el-20091113204419-o5vbwnq5f7feedwu-481
  lisp/vc/compare-w.el           comparew.el-20091113204419-o5vbwnq5f7feedwu-222
  lisp/vc/ediff-help.el          
ediffhelp.el-20091113204419-o5vbwnq5f7feedwu-1014
  lisp/vc/ediff-util.el          
ediffutil.el-20091113204419-o5vbwnq5f7feedwu-848
  lisp/vc/ediff-wind.el          
ediffwind.el-20091113204419-o5vbwnq5f7feedwu-849
  lisp/vc/emerge.el              emerge.el-20091113204419-o5vbwnq5f7feedwu-464
  lisp/vc/pcvs-util.el           
pcvsutil.el-20091113204419-o5vbwnq5f7feedwu-1781
  lisp/window.el                 window.el-20091113204419-o5vbwnq5f7feedwu-94
  lisp/winner.el                 winner.el-20091113204419-o5vbwnq5f7feedwu-1104
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-08-05 13:06:29 +0000
+++ b/lisp/ChangeLog    2013-08-05 14:26:57 +0000
@@ -1,3 +1,75 @@
+2013-08-05  Dmitry Antipov  <address@hidden>
+
+       Do not call to `selected-window' where it is assumed by default.
+       Affected functions are `window-minibuffer-p', `window-dedicated-p',
+       `window-hscroll', `window-width', `window-height', `window-buffer',
+       `window-frame', `window-start', `window-point', `next-window'
+       and `window-display-table'.
+       * abbrev.el (abbrev--default-expand):
+       * bs.el (bs--show-with-configuration):
+       * buff-menu.el (Buffer-menu-mouse-select):
+       * calc/calc.el (calc):
+       * calendar/calendar.el (calendar-generate-window):
+       * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
+       (diary-make-entry):
+       * comint.el (send-invisible, comint-dynamic-complete-filename)
+       (comint-dynamic-simple-complete, comint-dynamic-list-completions):
+       * completion.el (complete):
+       * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
+       * disp-table.el (describe-current-display-table):
+       * doc-view.el (doc-view-insert-image):
+       * ebuff-menu.el (Electric-buffer-menu-mouse-select):
+       * ehelp.el (with-electric-help):
+       * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
+       * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
+       * emacs-lisp/helper.el (Helper-help-scroller):
+       * emulation/cua-base.el (cua--post-command-handler-1):
+       * eshell/esh-mode.el (eshell-output-filter):
+       * ffap.el (ffap-gnus-wrapper):
+       * help-macro.el (make-help-screen):
+       * hilit-chg.el (highlight-compare-buffers):
+       * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
+       * hl-line.el (global-hl-line-highlight):
+       * icomplete.el (icomplete-simple-completing-p):
+       * isearch.el (isearch-done):
+       * jit-lock.el (jit-lock-stealth-fontify):
+       * mail/rmailsum.el (rmail-summary-scroll-msg-up):
+       * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
+       * mpc.el (mpc-tagbrowser, mpc):
+       * net/rcirc.el (rcirc-any-buffer):
+       * play/gomoku.el (gomoku-max-width, gomoku-max-height):
+       * play/landmark.el (landmark-max-width, landmark-max-height):
+       * play/zone.el (zone):
+       * progmodes/compile.el (compilation-goto-locus):
+       * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
+       * progmodes/etags.el (find-tag-other-window):
+       * progmodes/fortran.el (fortran-column-ruler):
+       * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
+       * progmodes/verilog-mode.el (verilog-point-text):
+       * reposition.el (reposition-window):
+       * rot13.el (toggle-rot13-mode):
+       * server.el (server-switch-buffer):
+       * shell.el (shell-dynamic-complete-command)
+       (shell-dynamic-complete-environment-variable):
+       * simple.el (insert-buffer, set-selective-display)
+       (delete-completion-window):
+       * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
+       (speedbar-recenter):
+       * startup.el (fancy-splash-head):
+       * textmodes/ispell.el (ispell-command-loop):
+       * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
+       * tutorial.el (help-with-tutorial):
+       * vc/add-log.el (add-change-log-entry):
+       * vc/compare-w.el (compare-windows):
+       * vc/ediff-help.el (ediff-indent-help-message):
+       * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
+       * vc/ediff-wind.el (ediff-skip-unsuitable-frames)
+       (ediff-setup-control-frame):
+       * vc/emerge.el (emerge-position-region):
+       * vc/pcvs-util.el (cvs-bury-buffer):
+       * window.el (walk-windows, mouse-autoselect-window-select):
+       * winner.el (winner-set-conf, winner-undo): Related users changed.
+
 2013-08-05  Juanma Barranquero  <address@hidden>
 
        * frameset.el (frameset--set-id): Doc fix.

=== modified file 'lisp/abbrev.el'
--- a/lisp/abbrev.el    2013-04-18 00:12:33 +0000
+++ b/lisp/abbrev.el    2013-08-05 14:26:57 +0000
@@ -856,7 +856,7 @@
               (endmark (copy-marker wordend t)))
           (unless (or ;; executing-kbd-macro
                    noninteractive
-                   (window-minibuffer-p (selected-window)))
+                   (window-minibuffer-p))
             ;; Add an undo boundary, in case we are doing this for
             ;; a self-inserting command which has avoided making one so far.
             (undo-boundary))

=== modified file 'lisp/bs.el'
--- a/lisp/bs.el        2013-06-22 02:33:33 +0000
+++ b/lisp/bs.el        2013-08-05 14:26:57 +0000
@@ -1406,7 +1406,7 @@
          (select-window active-window)
        (bs--restore-window-config)
        (setq bs--window-config-coming-from (current-window-configuration))
-       (when (> (window-height (selected-window)) 7)
+       (when (> (window-height) 7)
           ;; Errors would mess with the window configuration (bug#10882).
           (ignore-errors (select-window (split-window-below)))))
       (bs-show-in-buffer liste)

=== modified file 'lisp/buff-menu.el'
--- a/lisp/buff-menu.el 2013-07-03 23:11:58 +0000
+++ b/lisp/buff-menu.el 2013-08-05 14:26:57 +0000
@@ -591,7 +591,7 @@
   (select-window (posn-window (event-end event)))
   (let ((buffer (tabulated-list-get-id (posn-point (event-end event)))))
     (when (buffer-live-p buffer)
-      (if (and (window-dedicated-p (selected-window))
+      (if (and (window-dedicated-p)
               (eq (selected-window) (frame-root-window)))
          (switch-to-buffer-other-frame buffer)
        (switch-to-buffer buffer)))))

=== modified file 'lisp/calc/calc.el'
--- a/lisp/calc/calc.el 2013-06-20 14:15:42 +0000
+++ b/lisp/calc/calc.el 2013-08-05 14:26:57 +0000
@@ -1441,7 +1441,7 @@
            (calc-keypad))))
     (when (get-buffer-window "*Calc Keypad*")
       (calc-keypad)
-      (set-buffer (window-buffer (selected-window))))
+      (set-buffer (window-buffer)))
     (if (eq major-mode 'calc-mode)
        (calc-quit)
       (let ((oldbuf (current-buffer)))

=== modified file 'lisp/calendar/calendar.el'
--- a/lisp/calendar/calendar.el 2013-08-05 06:54:30 +0000
+++ b/lisp/calendar/calendar.el 2013-08-05 14:26:57 +0000
@@ -1422,7 +1422,7 @@
          (year (calendar-extract-year today))
          (today-visible (or (not mon)
                             (<= (abs (calendar-interval mon yr month year)) 
1)))
-         (in-calendar-window (eq (window-buffer (selected-window))
+         (in-calendar-window (eq (window-buffer)
                                  (get-buffer calendar-buffer))))
     (calendar-generate (or mon month) (or yr year))
     (calendar-update-mode-line)

=== modified file 'lisp/calendar/diary-lib.el'
--- a/lisp/calendar/diary-lib.el        2013-06-18 16:05:01 +0000
+++ b/lisp/calendar/diary-lib.el        2013-08-05 14:26:57 +0000
@@ -1011,8 +1011,7 @@
 in the mode line.  This is an option for `diary-display-function'."
   ;; If selected window is dedicated (to the calendar), need a new one
   ;; to display the diary.
-  (let* ((pop-up-frames (or pop-up-frames
-                            (window-dedicated-p (selected-window))))
+  (let* ((pop-up-frames (or pop-up-frames (window-dedicated-p)))
          (dbuff (find-buffer-visiting diary-file))
          (empty (diary-display-no-entries)))
     ;; This may be too wide, but when simple diary is used there is
@@ -1216,8 +1215,7 @@
 is created."
   (interactive)
   (let* ((d-file (diary-check-diary-file))
-         (pop-up-frames (or pop-up-frames
-                            (window-dedicated-p (selected-window))))
+         (pop-up-frames (or pop-up-frames (window-dedicated-p)))
          (win (selected-window))
          (height (window-height)))
     (with-current-buffer (or (find-buffer-visiting d-file)
@@ -2116,8 +2114,7 @@
   "Insert a diary entry STRING which may be NONMARKING in FILE.
 If omitted, NONMARKING defaults to nil and FILE defaults to
 `diary-file'."
-  (let ((pop-up-frames (or pop-up-frames
-                           (window-dedicated-p (selected-window)))))
+  (let ((pop-up-frames (or pop-up-frames (window-dedicated-p))))
     (find-file-other-window (or file diary-file)))
   (when (eq major-mode (default-value 'major-mode)) (diary-mode))
   (widen)

=== modified file 'lisp/comint.el'
--- a/lisp/comint.el    2013-06-21 09:37:04 +0000
+++ b/lisp/comint.el    2013-08-05 14:26:57 +0000
@@ -2296,7 +2296,7 @@
   (interactive "P")                    ; Defeat snooping via C-x ESC ESC
   (let ((proc (get-buffer-process (current-buffer)))
        (prefix
-        (if (eq (window-buffer (selected-window)) (current-buffer))
+        (if (eq (window-buffer) (current-buffer))
             ""
           (format "(In buffer %s) "
                   (current-buffer)))))
@@ -3108,7 +3108,7 @@
 Returns t if successful."
   (interactive)
   (when (comint--match-partial-filename)
-    (unless (window-minibuffer-p (selected-window))
+    (unless (window-minibuffer-p)
       (message "Completing file name..."))
     (let ((data (comint--complete-file-name-data)))
       (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)))))
@@ -3211,7 +3211,7 @@
 See also `comint-dynamic-complete-filename'."
   (declare (obsolete completion-in-region "24.1"))
   (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt 
cygwin)))
-        (minibuffer-p (window-minibuffer-p (selected-window)))
+        (minibuffer-p (window-minibuffer-p))
         (suffix (cond ((not comint-completion-addsuffix) "")
                       ((not (consp comint-completion-addsuffix)) " ")
                       (t (cdr comint-completion-addsuffix))))
@@ -3308,7 +3308,7 @@
            (current-window-configuration))
       (with-output-to-temp-buffer "*Completions*"
        (display-completion-list completions common-substring))
-      (if (window-minibuffer-p (selected-window))
+      (if (window-minibuffer-p)
          (minibuffer-message "Type space to flush; repeat completion command 
to scroll")
        (message "Type space to flush; repeat completion command to scroll")))
 

=== modified file 'lisp/completion.el'
--- a/lisp/completion.el        2013-05-15 23:55:41 +0000
+++ b/lisp/completion.el        2013-08-05 14:26:57 +0000
@@ -1626,7 +1626,7 @@
   ;; Get the next completion
   (let* ((print-status-p
          (and (>= baud-rate completion-prompt-speed-threshold)
-              (not (window-minibuffer-p (selected-window)))))
+              (not (window-minibuffer-p))))
         (insert-point (point))
         (entry (completion-search-next cmpl-current-index))
         string)

=== modified file 'lisp/dabbrev.el'
--- a/lisp/dabbrev.el   2013-01-01 09:11:05 +0000
+++ b/lisp/dabbrev.el   2013-08-05 14:26:57 +0000
@@ -457,7 +457,7 @@
               (markerp dabbrev--last-abbrev-location)
               (marker-position dabbrev--last-abbrev-location)
               (or (eq last-command this-command)
-                  (and (window-minibuffer-p (selected-window))
+                  (and (window-minibuffer-p)
                        (= dabbrev--last-abbrev-location
                           (point)))))
          ;; Find a different expansion for the same abbrev as last time.
@@ -793,7 +793,7 @@
     ;; In a minibuffer, search the buffer it was activated from,
     ;; first after the minibuffer itself.  Unless we aren't supposed
     ;; to search the current buffer either.
-    (if (and (window-minibuffer-p (selected-window))
+    (if (and (window-minibuffer-p)
             (not dabbrev-search-these-buffers-only))
        (setq list
              (cons (dabbrev--minibuffer-origin)

=== modified file 'lisp/disp-table.el'
--- a/lisp/disp-table.el        2013-01-01 09:11:05 +0000
+++ b/lisp/disp-table.el        2013-08-05 14:26:57 +0000
@@ -119,7 +119,7 @@
 (defun describe-current-display-table ()
   "Describe the display table in use in the selected window and buffer."
   (interactive)
-  (let ((disptab (or (window-display-table (selected-window))
+  (let ((disptab (or (window-display-table)
                     buffer-display-table
                     standard-display-table)))
     (if disptab

=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el  2013-07-12 03:54:57 +0000
+++ b/lisp/doc-view.el  2013-08-05 14:26:57 +0000
@@ -1262,7 +1262,7 @@
                                            (car (image-size image 'pixels)))
                                         img-width)
                                    img-width))
-            (window-width (window-width (selected-window))))
+            (window-width (window-width)))
        (setf (doc-view-current-image) image)
        (move-overlay ol (point-min) (point-max))
        ;; In case the window is wider than the image, center the image

=== modified file 'lisp/ebuff-menu.el'
--- a/lisp/ebuff-menu.el        2013-01-01 09:11:05 +0000
+++ b/lisp/ebuff-menu.el        2013-08-05 14:26:57 +0000
@@ -227,7 +227,7 @@
 (defun Electric-buffer-menu-mouse-select (event)
   (interactive "e")
   (select-window (posn-window (event-end event)))
-  (set-buffer (window-buffer (selected-window)))
+  (set-buffer (window-buffer))
   (goto-char (posn-point (event-end event)))
   (throw 'electric-buffer-menu-select (point)))
 

=== modified file 'lisp/ehelp.el'
--- a/lisp/ehelp.el     2013-02-12 04:46:18 +0000
+++ b/lisp/ehelp.el     2013-08-05 14:26:57 +0000
@@ -146,7 +146,7 @@
     (unwind-protect
          (save-excursion
            (when one
-            (goto-char (window-start (selected-window))))
+            (goto-char (window-start)))
            (let ((pop-up-windows t))
              (pop-to-buffer buffer))
            (with-current-buffer buffer

=== modified file 'lisp/emacs-lisp/easy-mmode.el'
--- a/lisp/emacs-lisp/easy-mmode.el     2013-08-02 21:23:07 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el     2013-08-05 14:26:57 +0000
@@ -604,7 +604,7 @@
                       (goto-char (or ,(if endfun `(funcall #',endfun)) 
(point-max)))
                     (user-error "No next %s" ,name))
                 (goto-char (match-beginning 0))
-                (when (and (eq (current-buffer) (window-buffer 
(selected-window)))
+                (when (and (eq (current-buffer) (window-buffer))
                            (called-interactively-p 'interactive))
                   (let ((endpt (or (save-excursion
                                      ,(if endfun `(funcall #',endfun)

=== modified file 'lisp/emacs-lisp/edebug.el'
--- a/lisp/emacs-lisp/edebug.el 2013-08-04 20:18:11 +0000
+++ b/lisp/emacs-lisp/edebug.el 2013-08-05 14:26:57 +0000
@@ -293,7 +293,7 @@
   "Return t if there are two windows."
   (and (not (one-window-p))
        (eq (selected-window)
-          (next-window (next-window (selected-window))))))
+          (next-window (next-window)))))
 
 (defun edebug-sort-alist (alist function)
   ;; Return the ALIST sorted with comparison function FUNCTION.
@@ -334,7 +334,7 @@
         ((and (edebug-window-live-p window)
               (eq (window-buffer window) buffer))
          window)
-        ((eq (window-buffer (selected-window)) buffer)
+        ((eq (window-buffer) buffer)
          ;; Selected window already displays BUFFER.
          (selected-window))
         ((get-buffer-window buffer 0))

=== modified file 'lisp/emacs-lisp/helper.el'
--- a/lisp/emacs-lisp/helper.el 2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lisp/helper.el 2013-08-05 14:26:57 +0000
@@ -59,7 +59,7 @@
                        Helper-return-blurb)
                   "return")))
     (save-window-excursion
-      (goto-char (window-start (selected-window)))
+      (goto-char (window-start))
       (if (get-buffer-window "*Help*")
          (pop-to-buffer "*Help*")
        (switch-to-buffer "*Help*"))

=== modified file 'lisp/emulation/cua-base.el'
--- a/lisp/emulation/cua-base.el        2013-01-01 09:11:05 +0000
+++ b/lisp/emulation/cua-base.el        2013-08-05 14:26:57 +0000
@@ -1298,7 +1298,7 @@
                             (mark t) (point) cua--explicit-region-start))))
 
   ;; Disable transient-mark-mode if rectangle active in current buffer.
-  (if (not (window-minibuffer-p (selected-window)))
+  (if (not (window-minibuffer-p))
       (setq transient-mark-mode (and (not cua--rectangle)
                                     (if cua-highlight-region-shift-only
                                         (not cua--explicit-region-start)

=== modified file 'lisp/eshell/esh-mode.el'
--- a/lisp/eshell/esh-mode.el   2013-06-05 01:19:33 +0000
+++ b/lisp/eshell/esh-mode.el   2013-08-05 14:26:57 +0000
@@ -740,7 +740,7 @@
              (if (<= (point) oend)
                  (setq oend (+ oend nchars)))
              (insert-before-markers string)
-             (if (= (window-start (selected-window)) (point))
+             (if (= (window-start) (point))
                  (set-window-start (selected-window)
                                    (- (point) nchars)))
              (if (= (point) eshell-last-input-end)

=== modified file 'lisp/ffap.el'
--- a/lisp/ffap.el      2013-07-24 15:56:24 +0000
+++ b/lisp/ffap.el      2013-08-05 14:26:57 +0000
@@ -1736,7 +1736,7 @@
   ;; Preserve selected buffer, but do not do save-window-excursion,
   ;; since we want to see any window created by the form.  Temporarily
   ;; select the article buffer, so we can see any point movement.
-  (let ((sb (window-buffer (selected-window))))
+  (let ((sb (window-buffer)))
     (gnus-configure-windows 'article)
     (pop-to-buffer gnus-article-buffer)
     (widen)

=== modified file 'lisp/help-macro.el'
--- a/lisp/help-macro.el        2013-01-02 16:13:04 +0000
+++ b/lisp/help-macro.el        2013-08-05 14:26:57 +0000
@@ -136,9 +136,9 @@
                     (setq config (current-window-configuration))
                     (pop-to-buffer " *Metahelp*" nil t)
                     (and (fboundp 'make-frame)
-                         (not (eq (window-frame (selected-window))
+                         (not (eq (window-frame)
                                   prev-frame))
-                         (setq new-frame (window-frame (selected-window))
+                         (setq new-frame (window-frame)
                                config nil))
                     (setq buffer-read-only nil)
                     (let ((inhibit-read-only t))

=== modified file 'lisp/hilit-chg.el'
--- a/lisp/hilit-chg.el 2013-01-02 16:13:04 +0000
+++ b/lisp/hilit-chg.el 2013-08-05 14:26:57 +0000
@@ -860,7 +860,7 @@
     (get-buffer (read-buffer "buffer-a " (current-buffer) t))
     (get-buffer
      (read-buffer "buffer-b "
-                 (window-buffer (next-window (selected-window))) t))))
+                 (window-buffer (next-window)) t))))
   (let ((file-a (buffer-file-name buf-a))
        (file-b (buffer-file-name buf-b)))
     (highlight-markup-buffers buf-a file-a buf-b file-b)

=== modified file 'lisp/hippie-exp.el'
--- a/lisp/hippie-exp.el        2013-01-01 09:11:05 +0000
+++ b/lisp/hippie-exp.el        2013-08-05 14:26:57 +0000
@@ -296,7 +296,7 @@
                  (message "No further expansions found"))
              (ding))
            (if (and hippie-expand-verbose
-                    (not (window-minibuffer-p (selected-window))))
+                    (not (window-minibuffer-p)))
                (message "Using %s"
                         (nth he-num hippie-expand-try-functions-list)))))
       (if (and (>= he-num 0)
@@ -305,7 +305,7 @@
            (setq he-num -1)
            (he-reset-string)
            (if (and hippie-expand-verbose
-                    (not (window-minibuffer-p (selected-window))))
+                    (not (window-minibuffer-p)))
                (message "Undoing expansions"))))))
 
 ;; Initializes the region to expand (to between BEG and END).
@@ -978,7 +978,7 @@
 for subsequent calls (for further possible expansions of the same
 string).  It returns t if a new expansion is found, nil otherwise."
   (let ((expansion ())
-       (flag (if (frame-visible-p (window-frame (selected-window)))
+       (flag (if (frame-visible-p (window-frame))
                  'visible t)))
     (unless old
       (he-init-string (he-dabbrev-beg) (point))

=== modified file 'lisp/hl-line.el'
--- a/lisp/hl-line.el   2013-01-01 09:11:05 +0000
+++ b/lisp/hl-line.el   2013-08-05 14:26:57 +0000
@@ -198,7 +198,7 @@
 (defun global-hl-line-highlight ()
   "Highlight the current line in the current window."
   (when global-hl-line-mode    ; Might be changed outside the mode function.
-    (unless (window-minibuffer-p (selected-window))
+    (unless (window-minibuffer-p)
       (unless global-hl-line-overlay
         (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved
         (overlay-put global-hl-line-overlay 'face hl-line-face))

=== modified file 'lisp/icomplete.el'
--- a/lisp/icomplete.el 2013-02-15 19:19:29 +0000
+++ b/lisp/icomplete.el 2013-08-05 14:26:57 +0000
@@ -221,7 +221,7 @@
        indicate some non-standard, non-simple completion mechanism,
        like file-name and other custom-func completions)."
 
-  (and (window-minibuffer-p (selected-window))
+  (and (window-minibuffer-p)
        (not executing-kbd-macro)
        minibuffer-completion-table
        (or (not (functionp minibuffer-completion-table))

=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el   2013-06-13 22:08:45 +0000
+++ b/lisp/isearch.el   2013-08-05 14:26:57 +0000
@@ -1015,7 +1015,7 @@
   (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout)
   (isearch-dehighlight)
   (lazy-highlight-cleanup lazy-highlight-cleanup)
-  (let ((found-start (window-start (selected-window)))
+  (let ((found-start (window-start))
        (found-point (point)))
     (when isearch-window-configuration
       (set-window-configuration isearch-window-configuration)

=== modified file 'lisp/jit-lock.el'
--- a/lisp/jit-lock.el  2013-05-15 23:55:41 +0000
+++ b/lisp/jit-lock.el  2013-08-05 14:26:57 +0000
@@ -482,7 +482,7 @@
     (cancel-timer jit-lock-stealth-repeat-timer))
   (unless (or executing-kbd-macro
              memory-full
-             (window-minibuffer-p (selected-window))
+             (window-minibuffer-p)
              ;; For first invocation set up `jit-lock-stealth-buffers'.
              ;; In repeated invocations it's already been set up.
              (null (if repeat

=== modified file 'lisp/mail/rmail.el'
--- a/lisp/mail/rmail.el        2013-08-05 10:35:55 +0000
+++ b/lisp/mail/rmail.el        2013-08-05 14:26:57 +0000
@@ -4768,9 +4768,7 @@
 
 ;;;***
 
-;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
-;;;;;;  rmail-summary-by-regexp rmail-summary-by-recipients 
rmail-summary-by-labels
-;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" 
"61e7ad0931be1e07034dd57825ff326a")
+;;;### (autoloads nil "rmailsum" "rmailsum.el" 
"a9b3bbd9b82dd566524a1209b5cdb7dd")
 ;;; Generated autoloads from rmailsum.el
 
 (autoload 'rmail-summary "rmailsum" "\

=== modified file 'lisp/mail/rmailsum.el'
--- a/lisp/mail/rmailsum.el     2013-05-05 14:08:50 +0000
+++ b/lisp/mail/rmailsum.el     2013-08-05 14:26:57 +0000
@@ -1288,7 +1288,7 @@
                (prog1
                    ;; Is EOB visible in the buffer?
                    (save-excursion
-                     (let ((ht (window-height (selected-window))))
+                     (let ((ht (window-height)))
                        (move-to-window-line (- ht 2))
                        (end-of-line)
                        (eobp)))

=== modified file 'lisp/mouse-drag.el'
--- a/lisp/mouse-drag.el        2013-01-01 09:11:05 +0000
+++ b/lisp/mouse-drag.el        2013-08-05 14:26:57 +0000
@@ -156,7 +156,7 @@
   "Determine if it's wise to enable col-scrolling for the current window.
 Basically, we check for existing horizontal scrolling."
   (or truncate-lines
-      (> (window-hscroll (selected-window)) 0)
+      (> (window-hscroll) 0)
       (not (window-full-width-p))
       (and
        mouse-drag-electric-col-scrolling

=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el       2013-04-10 13:17:27 +0000
+++ b/lisp/mpc.el       2013-08-05 14:26:57 +0000
@@ -1513,7 +1513,7 @@
   (let* ((newbuf (mpc-tagbrowser-buf tag))
          (win (get-buffer-window newbuf 0)))
     (if win (select-window win)
-      (if (with-current-buffer (window-buffer (selected-window))
+      (if (with-current-buffer (window-buffer)
             (derived-mode-p 'mpc-tagbrowser-mode))
           (setq win (selected-window))
         ;; Find a tagbrowser-mode buffer.
@@ -2618,8 +2618,7 @@
          (song-win (get-buffer-window song-buf 0)))
     (if song-win
         (select-window song-win)
-      (if (or (window-dedicated-p (selected-window))
-              (window-minibuffer-p))
+      (if (or (window-dedicated-p) (window-minibuffer-p))
           (ignore-errors (select-frame (make-frame mpc-frame-alist)))
         (with-current-buffer song-buf
           (setq-local mpc-previous-window-config

=== modified file 'lisp/net/rcirc.el'
--- a/lisp/net/rcirc.el 2013-02-17 16:26:38 +0000
+++ b/lisp/net/rcirc.el 2013-08-05 14:26:57 +0000
@@ -1331,7 +1331,7 @@
   "Return a buffer for PROCESS, either the one selected or the process buffer."
   (if rcirc-always-use-server-buffer-flag
       (process-buffer process)
-    (let ((buffer (window-buffer (selected-window))))
+    (let ((buffer (window-buffer)))
       (if (and buffer
               (with-current-buffer buffer
                 (and (eq major-mode 'rcirc-mode)

=== modified file 'lisp/play/gomoku.el'
--- a/lisp/play/gomoku.el       2013-01-01 09:11:05 +0000
+++ b/lisp/play/gomoku.el       2013-08-05 14:26:57 +0000
@@ -948,13 +948,13 @@
 
 (defun gomoku-max-width ()
   "Largest possible board width for the current window."
-  (1+ (/ (- (window-width (selected-window))
+  (1+ (/ (- (window-width)
            gomoku-x-offset gomoku-x-offset 1)
         gomoku-square-width)))
 
 (defun gomoku-max-height ()
   "Largest possible board height for the current window."
-  (1+ (/ (- (window-height (selected-window))
+  (1+ (/ (- (window-height)
            gomoku-y-offset gomoku-y-offset 2)
         ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
         gomoku-square-height)))

=== modified file 'lisp/play/landmark.el'
--- a/lisp/play/landmark.el     2013-01-01 09:11:05 +0000
+++ b/lisp/play/landmark.el     2013-08-05 14:26:57 +0000
@@ -843,13 +843,13 @@
 
 (defun landmark-max-width ()
   "Largest possible board width for the current window."
-  (1+ (/ (- (window-width (selected-window))
+  (1+ (/ (- (window-width)
            landmark-x-offset landmark-x-offset 1)
         landmark-square-width)))
 
 (defun landmark-max-height ()
   "Largest possible board height for the current window."
-  (1+ (/ (- (window-height (selected-window))
+  (1+ (/ (- (window-height)
            landmark-y-offset landmark-y-offset 2)
         ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
         landmark-square-height)))

=== modified file 'lisp/play/zone.el'
--- a/lisp/play/zone.el 2013-01-01 09:11:05 +0000
+++ b/lisp/play/zone.el 2013-08-05 14:26:57 +0000
@@ -110,7 +110,7 @@
     (let ((f (selected-frame))
           (outbuf (get-buffer-create "*zone*"))
           (text (buffer-substring (window-start) (window-end)))
-          (wp (1+ (- (window-point (selected-window))
+          (wp (1+ (- (window-point)
                      (window-start)))))
       (put 'zone 'orig-buffer (current-buffer))
       (switch-to-buffer outbuf)

=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2013-06-04 23:52:06 +0000
+++ b/lisp/progmodes/compile.el 2013-08-05 14:26:57 +0000
@@ -2492,7 +2492,7 @@
 All arguments are markers.  If END-MK is non-nil, mark is set there
 and overlay is highlighted between MK and END-MK."
   ;; Show compilation buffer in other window, scrolled to this error.
-  (let* ((from-compilation-buffer (eq (window-buffer (selected-window))
+  (let* ((from-compilation-buffer (eq (window-buffer)
                                       (marker-buffer msg)))
          ;; Use an existing window if it is in a visible frame.
          (pre-existing (get-buffer-window (marker-buffer msg) 0))

=== modified file 'lisp/progmodes/ebrowse.el'
--- a/lisp/progmodes/ebrowse.el 2013-07-12 03:54:57 +0000
+++ b/lisp/progmodes/ebrowse.el 2013-08-05 14:26:57 +0000
@@ -1605,7 +1605,7 @@
   ;; Get the source file to view or find.
   (setf file (ebrowse-find-source-file file tags-file))
   ;; If current window is dedicated, use another frame.
-  (when (window-dedicated-p (selected-window))
+  (when (window-dedicated-p)
     (setf where 'other-window))
   (cond (view
         (setf ebrowse-temp-position-to-view struc

=== modified file 'lisp/progmodes/etags.el'
--- a/lisp/progmodes/etags.el   2013-01-19 20:38:13 +0000
+++ b/lisp/progmodes/etags.el   2013-08-05 14:26:57 +0000
@@ -982,7 +982,7 @@
   ;; selected window's buffer; without the hair, point is moved in both
   ;; windows.  To prevent this, we save the selected window's point before
   ;; doing find-tag-noselect, and restore it after.
-  (let* ((window-point (window-point (selected-window)))
+  (let* ((window-point (window-point))
         (tagbuf (find-tag-noselect tagname next-p regexp-p))
         (tagpoint (progn (set-buffer tagbuf) (point))))
     (set-window-point (prog1

=== modified file 'lisp/progmodes/fortran.el'
--- a/lisp/progmodes/fortran.el 2013-01-01 09:11:05 +0000
+++ b/lisp/progmodes/fortran.el 2013-08-05 14:26:57 +0000
@@ -1080,8 +1080,7 @@
      fortran-column-ruler-fixed)
    (save-excursion
      (beginning-of-line)
-     (if (eq (window-start (selected-window))
-             (window-point (selected-window)))
+     (if (eq (window-start) (window-point))
          (line-beginning-position 2)
        (point)))
    nil "Type SPC or any command to erase ruler."))

=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el  2013-07-20 19:25:05 +0000
+++ b/lisp/progmodes/gdb-mi.el  2013-08-05 14:26:57 +0000
@@ -2951,7 +2951,7 @@
         obj)
     (when (numberp pos)
       (with-selected-window (posn-window posn)
-       (with-current-buffer (window-buffer (selected-window))
+       (with-current-buffer (window-buffer)
          (goto-char pos)
          (dolist (overlay (overlays-in pos pos))
            (when (overlay-get overlay 'put-break)

=== modified file 'lisp/progmodes/verilog-mode.el'
--- a/lisp/progmodes/verilog-mode.el    2013-05-16 16:11:38 +0000
+++ b/lisp/progmodes/verilog-mode.el    2013-08-05 14:26:57 +0000
@@ -3256,7 +3256,7 @@
 (defun verilog-point-text (&optional pointnum)
   "Return text describing where POINTNUM or current point is (for errors).
 Use filename, if current buffer being edited shorten to just buffer name."
-  (concat (or (and (equal (window-buffer (selected-window)) (current-buffer))
+  (concat (or (and (equal (window-buffer) (current-buffer))
                   (buffer-name))
              buffer-file-name
              (buffer-name))

=== modified file 'lisp/reposition.el'
--- a/lisp/reposition.el        2013-01-01 09:11:05 +0000
+++ b/lisp/reposition.el        2013-08-05 14:26:57 +0000
@@ -61,7 +61,7 @@
         (here (point))
         ;; change this name once I've gotten rid of references to ht.
         ;; this is actually the number of the last screen line
-        (ht (- (window-height (selected-window)) 2))
+        (ht (- (window-height) 2))
         (line (repos-count-screen-lines (window-start) (point)))
         (comment-height
          ;; The call to max deals with the case of cursor between defuns.

=== modified file 'lisp/rot13.el'
--- a/lisp/rot13.el     2013-01-01 09:11:05 +0000
+++ b/lisp/rot13.el     2013-08-05 14:26:57 +0000
@@ -101,9 +101,9 @@
 (defun toggle-rot13-mode ()
   "Toggle the use of ROT13 encoding for the current window."
   (interactive)
-  (if (eq (window-display-table (selected-window)) rot13-display-table)
+  (if (eq (window-display-table) rot13-display-table)
       (set-window-display-table (selected-window) nil)
-    (if (null (window-display-table (selected-window)))
+    (if (null (window-display-table))
        (set-window-display-table (selected-window) rot13-display-table))))
 
 (provide 'rot13)

=== modified file 'lisp/server.el'
--- a/lisp/server.el    2013-08-05 10:35:55 +0000
+++ b/lisp/server.el    2013-08-05 14:26:57 +0000
@@ -1557,7 +1557,7 @@
                (setq next-buffer (car (process-get proc 'buffers))))
              (setq rest (cdr rest)))))
        (and next-buffer (server-switch-buffer next-buffer killed-one))
-       (unless (or next-buffer killed-one (window-dedicated-p 
(selected-window)))
+       (unless (or next-buffer killed-one (window-dedicated-p))
          ;; (switch-to-buffer (other-buffer))
          (message "No server buffers remain to edit")))
     (if (not (buffer-live-p next-buffer))
@@ -1584,10 +1584,10 @@
                   (unless (frame-live-p server-window)
                     (setq server-window (make-frame)))
                   (select-window (frame-selected-window server-window))))
-           (when (window-minibuffer-p (selected-window))
+           (when (window-minibuffer-p)
              (select-window (next-window nil 'nomini 0)))
            ;; Move to a non-dedicated window, if we have one.
-           (when (window-dedicated-p (selected-window))
+           (when (window-dedicated-p)
              (select-window
               (get-window-with-predicate
                (lambda (w)
@@ -1601,7 +1601,7 @@
              ;; a minibuffer/dedicated-window (if there's no other).
              (error (pop-to-buffer next-buffer)))))))
     (when server-raise-frame
-      (select-frame-set-input-focus (window-frame (selected-window))))))
+      (select-frame-set-input-focus (window-frame)))))
 
 ;;;###autoload
 (defun server-save-buffers-kill-terminal (arg)

=== modified file 'lisp/shell.el'
--- a/lisp/shell.el     2013-07-15 02:33:54 +0000
+++ b/lisp/shell.el     2013-08-05 14:26:57 +0000
@@ -1122,7 +1122,7 @@
   (interactive)
   (let ((data (shell-command-completion)))
     (if data
-       (prog2 (unless (window-minibuffer-p (selected-window))
+       (prog2 (unless (window-minibuffer-p)
                 (message "Completing command name..."))
            (apply #'completion-in-region data)))))
 
@@ -1232,7 +1232,7 @@
   (interactive)
   (let ((data (shell-environment-variable-completion)))
     (if data
-       (prog2 (unless (window-minibuffer-p (selected-window))
+       (prog2 (unless (window-minibuffer-p)
                 (message "Completing variable name..."))
            (apply #'completion-in-region data)))))
 

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2013-08-05 10:35:55 +0000
+++ b/lisp/simple.el    2013-08-05 14:26:57 +0000
@@ -4098,9 +4098,9 @@
     (progn
       (barf-if-buffer-read-only)
       (read-buffer "Insert buffer: "
-                  (if (eq (selected-window) (next-window (selected-window)))
+                  (if (eq (selected-window) (next-window))
                       (other-buffer (current-buffer))
-                    (window-buffer (next-window (selected-window))))
+                    (window-buffer (next-window)))
                   t))))
   (push-mark
    (save-excursion
@@ -5965,7 +5965,7 @@
     (setq selective-display
          (and arg (prefix-numeric-value arg)))
     (recenter current-vpos))
-  (set-window-start (selected-window) (window-start (selected-window)))
+  (set-window-start (selected-window) (window-start))
   (princ "selective-display set to " t)
   (prin1 selective-display t)
   (princ "." t))
@@ -6629,8 +6629,7 @@
   (interactive)
   (let ((buf completion-reference-buffer))
     (if (one-window-p t)
-       (if (window-dedicated-p (selected-window))
-           (delete-frame))
+       (if (window-dedicated-p) (delete-frame))
       (delete-window (selected-window))
       (if (get-buffer-window buf)
          (select-window (get-buffer-window buf))))))

=== modified file 'lisp/speedbar.el'
--- a/lisp/speedbar.el  2013-08-01 18:46:10 +0000
+++ b/lisp/speedbar.el  2013-08-05 14:26:57 +0000
@@ -2648,7 +2648,7 @@
              (dframe-select-attached-frame speedbar-frame)
              ;; make sure we at least choose a window to
              ;; get a good directory from
-             (if (window-minibuffer-p (selected-window))
+             (if (window-minibuffer-p)
                  nil
                ;; Check for special modes
                (speedbar-maybe-add-localized-support (current-buffer))
@@ -3512,7 +3512,7 @@
     (set-buffer speedbar-buffer)
 
     (if (<= (count-lines (point-min) (point-max))
-           (1- (window-height (selected-window))))
+           (1- (window-height)))
        ;; whole buffer fits
        (let ((cp (point)))
 
@@ -3545,7 +3545,7 @@
              (setq end (point-max)))))
        ;; Now work out the details of centering
        (let ((nl (count-lines start end))
-              (wl (1- (window-height (selected-window))))
+              (wl (1- (window-height)))
              (cp (point)))
          (if (> nl wl)
              ;; We can't fit it all, so just center on cursor
@@ -3558,12 +3558,12 @@
                nil
              ;; we need to do something...
              (goto-char start)
-             (let ((newcent (/ (- (window-height (selected-window)) nl) 2))
+             (let ((newcent (/ (- (window-height) nl) 2))
                    (lte (count-lines start (point-max))))
-               (if (and (< (+ newcent lte) (window-height (selected-window)))
-                        (> (- (window-height (selected-window)) lte 1)
+               (if (and (< (+ newcent lte) (window-height))
+                        (> (- (window-height) lte 1)
                            newcent))
-                   (setq newcent (- (window-height (selected-window))
+                   (setq newcent (- (window-height)
                                     lte 1)))
                (recenter newcent))))
           (goto-char cp))))))
@@ -3997,7 +3997,7 @@
 
 (defun speedbar-recenter ()
   "Recenter the current buffer so point is in the center of the window."
-  (recenter (/ (window-height (selected-window)) 2)))
+  (recenter (/ (window-height) 2)))
 
 
 ;;; Color loading section.

=== modified file 'lisp/startup.el'
--- a/lisp/startup.el   2013-06-30 22:29:23 +0000
+++ b/lisp/startup.el   2013-08-05 14:26:57 +0000
@@ -1541,7 +1541,7 @@
                           (t "splash.pbm")))
         (img (create-image image-file))
         (image-width (and img (car (image-size img))))
-        (window-width (window-width (selected-window))))
+        (window-width (window-width)))
     (when img
       (when (> window-width image-width)
        ;; Center the image in the window.

=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el  2013-04-17 17:48:10 +0000
+++ b/lisp/textmodes/ispell.el  2013-08-05 14:26:57 +0000
@@ -2218,7 +2218,7 @@
        (window-min-height (min window-min-height
                                ispell-choices-win-default-height))
        (command-characters '( ?  ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m ))
-       (dedicated (window-dedicated-p (selected-window)))
+       (dedicated (window-dedicated-p))
        (skipped 0)
        char num result textwin dedicated-win)
 

=== modified file 'lisp/textmodes/makeinfo.el'
--- a/lisp/textmodes/makeinfo.el        2013-01-01 09:11:05 +0000
+++ b/lisp/textmodes/makeinfo.el        2013-08-05 14:26:57 +0000
@@ -211,7 +211,7 @@
          (with-current-buffer buffer
            (revert-buffer t t))
        (setq buffer (find-file-noselect makeinfo-output-file-name)))
-      (if (window-dedicated-p (selected-window))
+      (if (window-dedicated-p)
          (switch-to-buffer-other-window buffer)
        (switch-to-buffer buffer)))
     (goto-char (point-min))))

=== modified file 'lisp/tutorial.el'
--- a/lisp/tutorial.el  2013-02-11 01:50:45 +0000
+++ b/lisp/tutorial.el  2013-08-05 14:26:57 +0000
@@ -896,7 +896,7 @@
           ;; inserted at the start of the buffer, the "type C-v to
           ;; move to the next screen" might not be visible on the
           ;; first screen (n < 0).  How will the novice know what to do?
-          (let ((n (- (window-height (selected-window))
+          (let ((n (- (window-height)
                       (count-lines (point-min) (point))
                       6)))
             (if (< n 8)

=== modified file 'lisp/vc/add-log.el'
--- a/lisp/vc/add-log.el        2013-01-02 16:13:04 +0000
+++ b/lisp/vc/add-log.el        2013-08-05 14:26:57 +0000
@@ -813,12 +813,12 @@
 
     (unless (equal file-name buffer-file-name)
       (cond
-       ((equal file-name (buffer-file-name (window-buffer (selected-window))))
+       ((equal file-name (buffer-file-name (window-buffer)))
         ;; If the selected window already shows the desired buffer don't show
         ;; it again (particularly important if other-window is true).
         ;; This is important for diff-add-change-log-entries-other-window.
-        (set-buffer (window-buffer (selected-window))))
-       ((or other-window (window-dedicated-p (selected-window)))
+        (set-buffer (window-buffer)))
+       ((or other-window (window-dedicated-p))
         (find-file-other-window file-name))
        (t (find-file file-name))))
     (or (derived-mode-p 'change-log-mode)

=== modified file 'lisp/vc/compare-w.el'
--- a/lisp/vc/compare-w.el      2013-05-06 07:10:31 +0000
+++ b/lisp/vc/compare-w.el      2013-08-05 14:26:57 +0000
@@ -179,7 +179,7 @@
                            'compare-windows-sync-regexp
                          compare-windows-sync)))
     (setq p1 (point) b1 (current-buffer))
-    (setq w2 (next-window (selected-window)))
+    (setq w2 (next-window))
     (if (eq w2 (selected-window))
        (setq w2 (next-window (selected-window) nil 'visible)))
     (if (eq w2 (selected-window))

=== modified file 'lisp/vc/ediff-help.el'
--- a/lisp/vc/ediff-help.el     2013-01-01 09:11:05 +0000
+++ b/lisp/vc/ediff-help.el     2013-08-05 14:26:57 +0000
@@ -253,7 +253,7 @@
 
 
 (defun ediff-indent-help-message ()
-  (let* ((shift (/ (max 0 (- (window-width (selected-window))
+  (let* ((shift (/ (max 0 (- (window-width)
                             (ediff-help-message-line-length)))
                   2))
         (str (make-string shift ?\ )))

=== modified file 'lisp/vc/ediff-util.el'
--- a/lisp/vc/ediff-util.el     2013-08-05 10:35:55 +0000
+++ b/lisp/vc/ediff-util.el     2013-08-05 14:26:57 +0000
@@ -537,7 +537,7 @@
 ;; to reside.
 (defun ediff-setup-control-buffer (ctl-buf)
   "Set up window for control buffer."
-  (if (window-dedicated-p (selected-window))
+  (if (window-dedicated-p)
       (set-buffer ctl-buf) ; we are in control frame but just in case
     (switch-to-buffer ctl-buf))
   (let ((window-min-height 2))
@@ -1629,7 +1629,7 @@
            (setq lines (1+ lines)))
          ;; And position the beginning on the right line
          (goto-char beg)
-         (recenter (/ (1+ (max (- (1- (window-height (selected-window)))
+         (recenter (/ (1+ (max (- (1- (window-height))
                                   lines)
                                1)
                           )

=== modified file 'lisp/vc/ediff-wind.el'
--- a/lisp/vc/ediff-wind.el     2013-05-23 07:10:05 +0000
+++ b/lisp/vc/ediff-wind.el     2013-08-05 14:26:57 +0000
@@ -861,7 +861,7 @@
 ;; create a new splittable frame if none is found
 (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
   (if (ediff-window-display-p)
-      (let ((wind-frame (window-frame (selected-window)))
+      (let ((wind-frame (window-frame))
             seen-windows)
        (while (and (not (memq (selected-window) seen-windows))
                    (or
@@ -877,7 +877,7 @@
          (setq seen-windows (cons (selected-window) seen-windows))
          ;; try new window
          (other-window 1 t)
-         (setq wind-frame (window-frame (selected-window)))
+         (setq wind-frame (window-frame))
          )
        (if (memq (selected-window) seen-windows)
            ;; fed up, no appropriate frames
@@ -939,7 +939,7 @@
 
     (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
     (select-frame ctl-frame)
-    (if (window-dedicated-p (selected-window))
+    (if (window-dedicated-p)
        ()
       (delete-other-windows)
       (switch-to-buffer ctl-buffer))

=== modified file 'lisp/vc/emerge.el'
--- a/lisp/vc/emerge.el 2012-09-24 12:23:25 +0000
+++ b/lisp/vc/emerge.el 2013-08-05 14:26:57 +0000
@@ -1770,7 +1770,7 @@
                (setq lines (1+ lines)))
              ;; And position the beginning on the right line
              (goto-char beg)
-             (recenter (/ (1+ (- (1- (window-height (selected-window)))
+             (recenter (/ (1+ (- (1- (window-height))
                                  lines))
                           2))))))
   (goto-char pos))

=== modified file 'lisp/vc/pcvs-util.el'
--- a/lisp/vc/pcvs-util.el      2013-01-01 09:11:05 +0000
+++ b/lisp/vc/pcvs-util.el      2013-08-05 14:26:57 +0000
@@ -97,7 +97,7 @@
 BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
   (interactive (list (current-buffer)))
   (save-current-buffer
-    (let ((win (if (eq buf (window-buffer (selected-window))) (selected-window)
+    (let ((win (if (eq buf (window-buffer)) (selected-window)
                 (get-buffer-window buf t))))
       (when win
        (if (window-dedicated-p win)
@@ -111,8 +111,8 @@
 ;;;          )
          )))
     (with-current-buffer buf
-      (bury-buffer (unless (and (eq buf (window-buffer (selected-window)))
-                               (not (window-dedicated-p (selected-window))))
+      (bury-buffer (unless (and (eq buf (window-buffer))
+                               (not (window-dedicated-p)))
                     buf)))
     (when mainbuf
       (let ((mainwin (or (get-buffer-window mainbuf)

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2013-07-25 09:58:27 +0000
+++ b/lisp/window.el    2013-08-05 14:26:57 +0000
@@ -1486,7 +1486,7 @@
 windows nor the buffer list."
   ;; If we start from the minibuffer window, don't fail to come
   ;; back to it.
-  (when (window-minibuffer-p (selected-window))
+  (when (window-minibuffer-p)
     (setq minibuf t))
   ;; Make sure to not mess up the order of recently selected
   ;; windows.  Use `save-selected-window' and `select-window'
@@ -6676,7 +6676,7 @@
        ;; minibuffer.  Use `unread-command-events' in order to execute pre-
        ;; and post-command hooks and trigger idle timers.  To avoid delaying
        ;; autoselection again, set `mouse-autoselect-window-state'."
-       (unless (window-minibuffer-p (selected-window))
+       (unless (window-minibuffer-p)
         (setq mouse-autoselect-window-state 'select)
         (setq unread-command-events
               (cons (list 'select-window (list window))
@@ -6702,7 +6702,7 @@
                ;; minibuffer gets unselected unexpectedly, and where
                ;; you then have to move your mouse all the way down to
                ;; the minibuffer to select it.
-               (window-minibuffer-p (selected-window))
+               (window-minibuffer-p)
                ;; Don't switch to minibuffer window unless it's active.
                (and (window-minibuffer-p window)
                     (not (minibuffer-window-active-p window)))

=== modified file 'lisp/winner.el'
--- a/lisp/winner.el    2013-07-22 22:51:29 +0000
+++ b/lisp/winner.el    2013-08-05 14:26:57 +0000
@@ -227,8 +227,7 @@
       (set-window-configuration winconf))
     (cond
      ((window-live-p chosen) (select-window chosen))
-     ((window-minibuffer-p (selected-window))
-      (other-window 1)))
+     ((window-minibuffer-p) (other-window 1)))
     (when (/= minisize (window-height miniwin))
       (with-selected-window miniwin
         (setf (window-height) minisize)))))
@@ -381,7 +380,7 @@
        (setq winner-undone-data (list (winner-win-data))))
       (cl-incf winner-undo-counter)    ; starting at 1
       (when (and (winner-undo-this)
-                (not (window-minibuffer-p (selected-window))))
+                (not (window-minibuffer-p)))
        (message "Winner undo (%d / %d)"
                 winner-undo-counter
                 (1- (ring-length winner-pending-undo-ring)))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]