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.
This commit is contained in:
parent
b27a1bd53a
commit
290d5b5890
60 changed files with 169 additions and 106 deletions
|
@ -1,3 +1,75 @@
|
|||
2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
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 <lekktu@gmail.com>
|
||||
|
||||
* frameset.el (frameset--set-id): Doc fix.
|
||||
|
|
|
@ -856,7 +856,7 @@ return value is that of `abbrev-insert'.)"
|
|||
(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))
|
||||
|
|
|
@ -1406,7 +1406,7 @@ for buffer selection."
|
|||
(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)
|
||||
|
|
|
@ -591,7 +591,7 @@ means list those buffers and no others."
|
|||
(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)))))
|
||||
|
|
|
@ -1441,7 +1441,7 @@ commands given here will actually operate on the *Calculator* stack."
|
|||
(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)))
|
||||
|
|
|
@ -1422,7 +1422,7 @@ Optional integers MON and YR are used instead of today's date."
|
|||
(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)
|
||||
|
|
|
@ -1011,8 +1011,7 @@ Entries that do not apply are made invisible. Holidays are shown
|
|||
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 @@ all entries, not just some, are visible. If there is no diary buffer, one
|
|||
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 @@ calendar."
|
|||
"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)
|
||||
|
|
|
@ -2296,7 +2296,7 @@ Security bug: your string can still be temporarily recovered with
|
|||
(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 @@ completions listing is dependent on the value of `comint-completion-autolist'.
|
|||
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 @@ Return `listed' if a completion listing was shown.
|
|||
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 @@ Typing SPC flushes the completions buffer."
|
|||
(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")))
|
||||
|
||||
|
|
|
@ -1626,7 +1626,7 @@ Prefix args ::
|
|||
;; 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)
|
||||
|
|
|
@ -457,7 +457,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
|
|||
(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 @@ of the start of the occurrence."
|
|||
;; 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)
|
||||
|
|
|
@ -119,7 +119,7 @@ Valid symbols are `truncation', `wrap', `escape', `control',
|
|||
(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
|
||||
|
|
|
@ -1262,7 +1262,7 @@ ARGS is a list of image descriptors."
|
|||
(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
|
||||
|
|
|
@ -227,7 +227,7 @@ Select buffer at point and display buffers marked \">\" in other windows."
|
|||
(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)))
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ BUFFER is put back into its original major mode."
|
|||
(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
|
||||
|
|
|
@ -604,7 +604,7 @@ BODY is executed after moving to the destination location."
|
|||
(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)
|
||||
|
|
|
@ -293,7 +293,7 @@ A lambda list keyword is a symbol that starts with `&'."
|
|||
"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 @@ Return the result of the last expression in BODY."
|
|||
((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))
|
||||
|
|
|
@ -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*"))
|
||||
|
|
|
@ -1298,7 +1298,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||
(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)
|
||||
|
|
|
@ -740,7 +740,7 @@ This is done after all necessary filtering has been done."
|
|||
(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)
|
||||
|
|
|
@ -1736,7 +1736,7 @@ Only intended for interactive use."
|
|||
;; 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)
|
||||
|
|
|
@ -136,9 +136,9 @@ and then returns."
|
|||
(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))
|
||||
|
|
|
@ -860,7 +860,7 @@ changes are made, so \\[highlight-changes-next-change] and
|
|||
(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)
|
||||
|
|
|
@ -296,7 +296,7 @@ undoes the expansion."
|
|||
(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 @@ undoes the expansion."
|
|||
(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 @@ The argument OLD has to be nil the first call of this function, and t
|
|||
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))
|
||||
|
|
|
@ -198,7 +198,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
|
|||
(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))
|
||||
|
|
|
@ -221,7 +221,7 @@ Conditions are:
|
|||
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))
|
||||
|
|
|
@ -1015,7 +1015,7 @@ NOPUSH is t and EDIT is t."
|
|||
(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)
|
||||
|
|
|
@ -482,7 +482,7 @@ non-nil in a repeated invocation of this function."
|
|||
(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
|
||||
|
|
|
@ -4768,9 +4768,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
|
|||
|
||||
;;;***
|
||||
|
||||
;;;### (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" "\
|
||||
|
|
|
@ -1288,7 +1288,7 @@ advance to the next message."
|
|||
(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)))
|
||||
|
|
|
@ -156,7 +156,7 @@ Keep the cursor on the screen as needed."
|
|||
"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
|
||||
|
|
|
@ -1513,7 +1513,7 @@ when constructing the set of constraints."
|
|||
(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 @@ This is used so that they can be compared with `eq', which is needed for
|
|||
(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
|
||||
|
|
|
@ -1331,7 +1331,7 @@ if ARG is omitted or nil."
|
|||
"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)
|
||||
|
|
|
@ -948,13 +948,13 @@ If the game is finished, this command requests for another game."
|
|||
|
||||
(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)))
|
||||
|
|
|
@ -843,13 +843,13 @@ If the game is finished, this command requests for another game."
|
|||
|
||||
(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)))
|
||||
|
|
|
@ -110,7 +110,7 @@ If the element is a function or a list of a function and a number,
|
|||
(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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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."))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -61,7 +61,7 @@ first comment line visible (if point is in a comment)."
|
|||
(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.
|
||||
|
|
|
@ -101,9 +101,9 @@ See also `toggle-rot13-mode'."
|
|||
(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)
|
||||
|
|
|
@ -1557,7 +1557,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
|||
(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 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
|||
(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 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
|||
;; 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)
|
||||
|
|
|
@ -1122,7 +1122,7 @@ Returns t if successful."
|
|||
(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 @@ Returns non-nil if successful."
|
|||
(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)))))
|
||||
|
||||
|
|
|
@ -4098,9 +4098,9 @@ Don't call it from programs: use `insert-buffer-substring' instead!"
|
|||
(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 @@ The variable `selective-display' has a separate value for each buffer."
|
|||
(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 @@ Go to the window from which completion was requested."
|
|||
(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))))))
|
||||
|
|
|
@ -2648,7 +2648,7 @@ Also resets scanner functions."
|
|||
(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 @@ interested in."
|
|||
(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 @@ interested in."
|
|||
(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 @@ interested in."
|
|||
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 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
|
|||
|
||||
(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.
|
||||
|
|
|
@ -1541,7 +1541,7 @@ a face or button specification."
|
|||
(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.
|
||||
|
|
|
@ -2218,7 +2218,7 @@ Global `ispell-quit' set to start location to continue spell session."
|
|||
(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)
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ nonsensical results."
|
|||
(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))))
|
||||
|
|
|
@ -896,7 +896,7 @@ Run the Viper tutorial? "))
|
|||
;; 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)
|
||||
|
|
|
@ -813,12 +813,12 @@ non-nil, otherwise in local time."
|
|||
|
||||
(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)
|
||||
|
|
|
@ -179,7 +179,7 @@ on third call it again advances points to the next difference and so on."
|
|||
'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))
|
||||
|
|
|
@ -253,7 +253,7 @@ the value of this variable and the variables `ediff-help-message-*' in
|
|||
|
||||
|
||||
(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 ?\ )))
|
||||
|
|
|
@ -537,7 +537,7 @@ to invocation.")
|
|||
;; 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 @@ the width of the A/B/C windows."
|
|||
(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)
|
||||
)
|
||||
|
|
|
@ -861,7 +861,7 @@ into icons, regardless of the window manager."
|
|||
;; 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 @@ into icons, regardless of the window manager."
|
|||
(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 @@ into icons, regardless of the window manager."
|
|||
|
||||
(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))
|
||||
|
|
|
@ -1770,7 +1770,7 @@ to the left margin, if they are in windows."
|
|||
(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))
|
||||
|
|
|
@ -97,7 +97,7 @@ try to split a new window instead."
|
|||
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 @@ BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
|
|||
;;; )
|
||||
)))
|
||||
(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)
|
||||
|
|
|
@ -1486,7 +1486,7 @@ This function changes neither the order of recently selected
|
|||
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 @@ is active. This function is run by `mouse-autoselect-window-timer'."
|
|||
;; 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 @@ is active. This function is run by `mouse-autoselect-window-timer'."
|
|||
;; 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)))
|
||||
|
|
|
@ -227,8 +227,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
|
|||
(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 @@ In other words, \"undo\" changes in window configuration."
|
|||
(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)))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue