summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-08-05 18:26:57 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-08-05 18:26:57 +0400
commit290d5b5890c5c8d096bd846eb48552d4608d5ed6 (patch)
tree2c1e39b6b5f1e82f179ee764eab34d012376076e /lisp/progmodes
parentb27a1bd53ac62bad378cbafcfb594ac37357bbc6 (diff)
downloademacs-290d5b5890c5c8d096bd846eb48552d4608d5ed6.tar.gz
emacs-290d5b5890c5c8d096bd846eb48552d4608d5ed6.tar.bz2
emacs-290d5b5890c5c8d096bd846eb48552d4608d5ed6.zip
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.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/ebrowse.el2
-rw-r--r--lisp/progmodes/etags.el2
-rw-r--r--lisp/progmodes/fortran.el3
-rw-r--r--lisp/progmodes/gdb-mi.el2
-rw-r--r--lisp/progmodes/verilog-mode.el2
6 files changed, 6 insertions, 7 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d9c482330cc..e909f1a5e5b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2492,7 +2492,7 @@ displays at the top of the window; there is no arrow."
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))
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 6a71ab330a8..865211d109c 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1605,7 +1605,7 @@ specifies where to find/view the result."
;; 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
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ff6321d74c3..a7b7e630bb9 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -982,7 +982,7 @@ See documentation of variable `tags-file-name'."
;; 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
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index ff667f80f9d..0fc805aae81 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -1080,8 +1080,7 @@ The next key typed is executed unless it is SPC."
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."))
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 4b51a5e7835..2017636435c 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2951,7 +2951,7 @@ If not in a source or disassembly buffer just set point."
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)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index ed911fcbba2..03364bddd9f 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -3256,7 +3256,7 @@ inserted using a single call to `verilog-insert'."
(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))