mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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>
|
2013-08-05 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
* frameset.el (frameset--set-id): Doc fix.
|
* frameset.el (frameset--set-id): Doc fix.
|
||||||
|
|
|
||||||
|
|
@ -856,7 +856,7 @@ return value is that of `abbrev-insert'.)"
|
||||||
(endmark (copy-marker wordend t)))
|
(endmark (copy-marker wordend t)))
|
||||||
(unless (or ;; executing-kbd-macro
|
(unless (or ;; executing-kbd-macro
|
||||||
noninteractive
|
noninteractive
|
||||||
(window-minibuffer-p (selected-window)))
|
(window-minibuffer-p))
|
||||||
;; Add an undo boundary, in case we are doing this for
|
;; Add an undo boundary, in case we are doing this for
|
||||||
;; a self-inserting command which has avoided making one so far.
|
;; a self-inserting command which has avoided making one so far.
|
||||||
(undo-boundary))
|
(undo-boundary))
|
||||||
|
|
|
||||||
|
|
@ -1406,7 +1406,7 @@ for buffer selection."
|
||||||
(select-window active-window)
|
(select-window active-window)
|
||||||
(bs--restore-window-config)
|
(bs--restore-window-config)
|
||||||
(setq bs--window-config-coming-from (current-window-configuration))
|
(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).
|
;; Errors would mess with the window configuration (bug#10882).
|
||||||
(ignore-errors (select-window (split-window-below)))))
|
(ignore-errors (select-window (split-window-below)))))
|
||||||
(bs-show-in-buffer liste)
|
(bs-show-in-buffer liste)
|
||||||
|
|
|
||||||
|
|
@ -591,7 +591,7 @@ means list those buffers and no others."
|
||||||
(select-window (posn-window (event-end event)))
|
(select-window (posn-window (event-end event)))
|
||||||
(let ((buffer (tabulated-list-get-id (posn-point (event-end event)))))
|
(let ((buffer (tabulated-list-get-id (posn-point (event-end event)))))
|
||||||
(when (buffer-live-p buffer)
|
(when (buffer-live-p buffer)
|
||||||
(if (and (window-dedicated-p (selected-window))
|
(if (and (window-dedicated-p)
|
||||||
(eq (selected-window) (frame-root-window)))
|
(eq (selected-window) (frame-root-window)))
|
||||||
(switch-to-buffer-other-frame buffer)
|
(switch-to-buffer-other-frame buffer)
|
||||||
(switch-to-buffer buffer)))))
|
(switch-to-buffer buffer)))))
|
||||||
|
|
|
||||||
|
|
@ -1441,7 +1441,7 @@ commands given here will actually operate on the *Calculator* stack."
|
||||||
(calc-keypad))))
|
(calc-keypad))))
|
||||||
(when (get-buffer-window "*Calc Keypad*")
|
(when (get-buffer-window "*Calc Keypad*")
|
||||||
(calc-keypad)
|
(calc-keypad)
|
||||||
(set-buffer (window-buffer (selected-window))))
|
(set-buffer (window-buffer)))
|
||||||
(if (eq major-mode 'calc-mode)
|
(if (eq major-mode 'calc-mode)
|
||||||
(calc-quit)
|
(calc-quit)
|
||||||
(let ((oldbuf (current-buffer)))
|
(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))
|
(year (calendar-extract-year today))
|
||||||
(today-visible (or (not mon)
|
(today-visible (or (not mon)
|
||||||
(<= (abs (calendar-interval mon yr month year)) 1)))
|
(<= (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))))
|
(get-buffer calendar-buffer))))
|
||||||
(calendar-generate (or mon month) (or yr year))
|
(calendar-generate (or mon month) (or yr year))
|
||||||
(calendar-update-mode-line)
|
(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'."
|
in the mode line. This is an option for `diary-display-function'."
|
||||||
;; If selected window is dedicated (to the calendar), need a new one
|
;; If selected window is dedicated (to the calendar), need a new one
|
||||||
;; to display the diary.
|
;; to display the diary.
|
||||||
(let* ((pop-up-frames (or pop-up-frames
|
(let* ((pop-up-frames (or pop-up-frames (window-dedicated-p)))
|
||||||
(window-dedicated-p (selected-window))))
|
|
||||||
(dbuff (find-buffer-visiting diary-file))
|
(dbuff (find-buffer-visiting diary-file))
|
||||||
(empty (diary-display-no-entries)))
|
(empty (diary-display-no-entries)))
|
||||||
;; This may be too wide, but when simple diary is used there is
|
;; 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."
|
is created."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((d-file (diary-check-diary-file))
|
(let* ((d-file (diary-check-diary-file))
|
||||||
(pop-up-frames (or pop-up-frames
|
(pop-up-frames (or pop-up-frames (window-dedicated-p)))
|
||||||
(window-dedicated-p (selected-window))))
|
|
||||||
(win (selected-window))
|
(win (selected-window))
|
||||||
(height (window-height)))
|
(height (window-height)))
|
||||||
(with-current-buffer (or (find-buffer-visiting d-file)
|
(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.
|
"Insert a diary entry STRING which may be NONMARKING in FILE.
|
||||||
If omitted, NONMARKING defaults to nil and FILE defaults to
|
If omitted, NONMARKING defaults to nil and FILE defaults to
|
||||||
`diary-file'."
|
`diary-file'."
|
||||||
(let ((pop-up-frames (or pop-up-frames
|
(let ((pop-up-frames (or pop-up-frames (window-dedicated-p))))
|
||||||
(window-dedicated-p (selected-window)))))
|
|
||||||
(find-file-other-window (or file diary-file)))
|
(find-file-other-window (or file diary-file)))
|
||||||
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
|
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
|
||||||
(widen)
|
(widen)
|
||||||
|
|
|
||||||
|
|
@ -2296,7 +2296,7 @@ Security bug: your string can still be temporarily recovered with
|
||||||
(interactive "P") ; Defeat snooping via C-x ESC ESC
|
(interactive "P") ; Defeat snooping via C-x ESC ESC
|
||||||
(let ((proc (get-buffer-process (current-buffer)))
|
(let ((proc (get-buffer-process (current-buffer)))
|
||||||
(prefix
|
(prefix
|
||||||
(if (eq (window-buffer (selected-window)) (current-buffer))
|
(if (eq (window-buffer) (current-buffer))
|
||||||
""
|
""
|
||||||
(format "(In buffer %s) "
|
(format "(In buffer %s) "
|
||||||
(current-buffer)))))
|
(current-buffer)))))
|
||||||
|
|
@ -3108,7 +3108,7 @@ completions listing is dependent on the value of `comint-completion-autolist'.
|
||||||
Returns t if successful."
|
Returns t if successful."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (comint--match-partial-filename)
|
(when (comint--match-partial-filename)
|
||||||
(unless (window-minibuffer-p (selected-window))
|
(unless (window-minibuffer-p)
|
||||||
(message "Completing file name..."))
|
(message "Completing file name..."))
|
||||||
(let ((data (comint--complete-file-name-data)))
|
(let ((data (comint--complete-file-name-data)))
|
||||||
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 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'."
|
See also `comint-dynamic-complete-filename'."
|
||||||
(declare (obsolete completion-in-region "24.1"))
|
(declare (obsolete completion-in-region "24.1"))
|
||||||
(let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
|
(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) "")
|
(suffix (cond ((not comint-completion-addsuffix) "")
|
||||||
((not (consp comint-completion-addsuffix)) " ")
|
((not (consp comint-completion-addsuffix)) " ")
|
||||||
(t (cdr comint-completion-addsuffix))))
|
(t (cdr comint-completion-addsuffix))))
|
||||||
|
|
@ -3308,7 +3308,7 @@ Typing SPC flushes the completions buffer."
|
||||||
(current-window-configuration))
|
(current-window-configuration))
|
||||||
(with-output-to-temp-buffer "*Completions*"
|
(with-output-to-temp-buffer "*Completions*"
|
||||||
(display-completion-list completions common-substring))
|
(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")
|
(minibuffer-message "Type space to flush; repeat completion command to scroll")
|
||||||
(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
|
;; Get the next completion
|
||||||
(let* ((print-status-p
|
(let* ((print-status-p
|
||||||
(and (>= baud-rate completion-prompt-speed-threshold)
|
(and (>= baud-rate completion-prompt-speed-threshold)
|
||||||
(not (window-minibuffer-p (selected-window)))))
|
(not (window-minibuffer-p))))
|
||||||
(insert-point (point))
|
(insert-point (point))
|
||||||
(entry (completion-search-next cmpl-current-index))
|
(entry (completion-search-next cmpl-current-index))
|
||||||
string)
|
string)
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
|
||||||
(markerp dabbrev--last-abbrev-location)
|
(markerp dabbrev--last-abbrev-location)
|
||||||
(marker-position dabbrev--last-abbrev-location)
|
(marker-position dabbrev--last-abbrev-location)
|
||||||
(or (eq last-command this-command)
|
(or (eq last-command this-command)
|
||||||
(and (window-minibuffer-p (selected-window))
|
(and (window-minibuffer-p)
|
||||||
(= dabbrev--last-abbrev-location
|
(= dabbrev--last-abbrev-location
|
||||||
(point)))))
|
(point)))))
|
||||||
;; Find a different expansion for the same abbrev as last time.
|
;; 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,
|
;; In a minibuffer, search the buffer it was activated from,
|
||||||
;; first after the minibuffer itself. Unless we aren't supposed
|
;; first after the minibuffer itself. Unless we aren't supposed
|
||||||
;; to search the current buffer either.
|
;; to search the current buffer either.
|
||||||
(if (and (window-minibuffer-p (selected-window))
|
(if (and (window-minibuffer-p)
|
||||||
(not dabbrev-search-these-buffers-only))
|
(not dabbrev-search-these-buffers-only))
|
||||||
(setq list
|
(setq list
|
||||||
(cons (dabbrev--minibuffer-origin)
|
(cons (dabbrev--minibuffer-origin)
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ Valid symbols are `truncation', `wrap', `escape', `control',
|
||||||
(defun describe-current-display-table ()
|
(defun describe-current-display-table ()
|
||||||
"Describe the display table in use in the selected window and buffer."
|
"Describe the display table in use in the selected window and buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((disptab (or (window-display-table (selected-window))
|
(let ((disptab (or (window-display-table)
|
||||||
buffer-display-table
|
buffer-display-table
|
||||||
standard-display-table)))
|
standard-display-table)))
|
||||||
(if disptab
|
(if disptab
|
||||||
|
|
|
||||||
|
|
@ -1262,7 +1262,7 @@ ARGS is a list of image descriptors."
|
||||||
(car (image-size image 'pixels)))
|
(car (image-size image 'pixels)))
|
||||||
img-width)
|
img-width)
|
||||||
img-width))
|
img-width))
|
||||||
(window-width (window-width (selected-window))))
|
(window-width (window-width)))
|
||||||
(setf (doc-view-current-image) image)
|
(setf (doc-view-current-image) image)
|
||||||
(move-overlay ol (point-min) (point-max))
|
(move-overlay ol (point-min) (point-max))
|
||||||
;; In case the window is wider than the image, center the image
|
;; 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)
|
(defun Electric-buffer-menu-mouse-select (event)
|
||||||
(interactive "e")
|
(interactive "e")
|
||||||
(select-window (posn-window (event-end event)))
|
(select-window (posn-window (event-end event)))
|
||||||
(set-buffer (window-buffer (selected-window)))
|
(set-buffer (window-buffer))
|
||||||
(goto-char (posn-point (event-end event)))
|
(goto-char (posn-point (event-end event)))
|
||||||
(throw 'electric-buffer-menu-select (point)))
|
(throw 'electric-buffer-menu-select (point)))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ BUFFER is put back into its original major mode."
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when one
|
(when one
|
||||||
(goto-char (window-start (selected-window))))
|
(goto-char (window-start)))
|
||||||
(let ((pop-up-windows t))
|
(let ((pop-up-windows t))
|
||||||
(pop-to-buffer buffer))
|
(pop-to-buffer buffer))
|
||||||
(with-current-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)))
|
(goto-char (or ,(if endfun `(funcall #',endfun)) (point-max)))
|
||||||
(user-error "No next %s" ,name))
|
(user-error "No next %s" ,name))
|
||||||
(goto-char (match-beginning 0))
|
(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))
|
(called-interactively-p 'interactive))
|
||||||
(let ((endpt (or (save-excursion
|
(let ((endpt (or (save-excursion
|
||||||
,(if endfun `(funcall #',endfun)
|
,(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."
|
"Return t if there are two windows."
|
||||||
(and (not (one-window-p))
|
(and (not (one-window-p))
|
||||||
(eq (selected-window)
|
(eq (selected-window)
|
||||||
(next-window (next-window (selected-window))))))
|
(next-window (next-window)))))
|
||||||
|
|
||||||
(defun edebug-sort-alist (alist function)
|
(defun edebug-sort-alist (alist function)
|
||||||
;; Return the ALIST sorted with comparison function 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)
|
((and (edebug-window-live-p window)
|
||||||
(eq (window-buffer window) buffer))
|
(eq (window-buffer window) buffer))
|
||||||
window)
|
window)
|
||||||
((eq (window-buffer (selected-window)) buffer)
|
((eq (window-buffer) buffer)
|
||||||
;; Selected window already displays BUFFER.
|
;; Selected window already displays BUFFER.
|
||||||
(selected-window))
|
(selected-window))
|
||||||
((get-buffer-window buffer 0))
|
((get-buffer-window buffer 0))
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
Helper-return-blurb)
|
Helper-return-blurb)
|
||||||
"return")))
|
"return")))
|
||||||
(save-window-excursion
|
(save-window-excursion
|
||||||
(goto-char (window-start (selected-window)))
|
(goto-char (window-start))
|
||||||
(if (get-buffer-window "*Help*")
|
(if (get-buffer-window "*Help*")
|
||||||
(pop-to-buffer "*Help*")
|
(pop-to-buffer "*Help*")
|
||||||
(switch-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))))
|
(mark t) (point) cua--explicit-region-start))))
|
||||||
|
|
||||||
;; Disable transient-mark-mode if rectangle active in current buffer.
|
;; 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)
|
(setq transient-mark-mode (and (not cua--rectangle)
|
||||||
(if cua-highlight-region-shift-only
|
(if cua-highlight-region-shift-only
|
||||||
(not cua--explicit-region-start)
|
(not cua--explicit-region-start)
|
||||||
|
|
|
||||||
|
|
@ -740,7 +740,7 @@ This is done after all necessary filtering has been done."
|
||||||
(if (<= (point) oend)
|
(if (<= (point) oend)
|
||||||
(setq oend (+ oend nchars)))
|
(setq oend (+ oend nchars)))
|
||||||
(insert-before-markers string)
|
(insert-before-markers string)
|
||||||
(if (= (window-start (selected-window)) (point))
|
(if (= (window-start) (point))
|
||||||
(set-window-start (selected-window)
|
(set-window-start (selected-window)
|
||||||
(- (point) nchars)))
|
(- (point) nchars)))
|
||||||
(if (= (point) eshell-last-input-end)
|
(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,
|
;; Preserve selected buffer, but do not do save-window-excursion,
|
||||||
;; since we want to see any window created by the form. Temporarily
|
;; since we want to see any window created by the form. Temporarily
|
||||||
;; select the article buffer, so we can see any point movement.
|
;; 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)
|
(gnus-configure-windows 'article)
|
||||||
(pop-to-buffer gnus-article-buffer)
|
(pop-to-buffer gnus-article-buffer)
|
||||||
(widen)
|
(widen)
|
||||||
|
|
|
||||||
|
|
@ -136,9 +136,9 @@ and then returns."
|
||||||
(setq config (current-window-configuration))
|
(setq config (current-window-configuration))
|
||||||
(pop-to-buffer " *Metahelp*" nil t)
|
(pop-to-buffer " *Metahelp*" nil t)
|
||||||
(and (fboundp 'make-frame)
|
(and (fboundp 'make-frame)
|
||||||
(not (eq (window-frame (selected-window))
|
(not (eq (window-frame)
|
||||||
prev-frame))
|
prev-frame))
|
||||||
(setq new-frame (window-frame (selected-window))
|
(setq new-frame (window-frame)
|
||||||
config nil))
|
config nil))
|
||||||
(setq buffer-read-only nil)
|
(setq buffer-read-only nil)
|
||||||
(let ((inhibit-read-only t))
|
(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-a " (current-buffer) t))
|
||||||
(get-buffer
|
(get-buffer
|
||||||
(read-buffer "buffer-b "
|
(read-buffer "buffer-b "
|
||||||
(window-buffer (next-window (selected-window))) t))))
|
(window-buffer (next-window)) t))))
|
||||||
(let ((file-a (buffer-file-name buf-a))
|
(let ((file-a (buffer-file-name buf-a))
|
||||||
(file-b (buffer-file-name buf-b)))
|
(file-b (buffer-file-name buf-b)))
|
||||||
(highlight-markup-buffers buf-a file-a buf-b file-b)
|
(highlight-markup-buffers buf-a file-a buf-b file-b)
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ undoes the expansion."
|
||||||
(message "No further expansions found"))
|
(message "No further expansions found"))
|
||||||
(ding))
|
(ding))
|
||||||
(if (and hippie-expand-verbose
|
(if (and hippie-expand-verbose
|
||||||
(not (window-minibuffer-p (selected-window))))
|
(not (window-minibuffer-p)))
|
||||||
(message "Using %s"
|
(message "Using %s"
|
||||||
(nth he-num hippie-expand-try-functions-list)))))
|
(nth he-num hippie-expand-try-functions-list)))))
|
||||||
(if (and (>= he-num 0)
|
(if (and (>= he-num 0)
|
||||||
|
|
@ -305,7 +305,7 @@ undoes the expansion."
|
||||||
(setq he-num -1)
|
(setq he-num -1)
|
||||||
(he-reset-string)
|
(he-reset-string)
|
||||||
(if (and hippie-expand-verbose
|
(if (and hippie-expand-verbose
|
||||||
(not (window-minibuffer-p (selected-window))))
|
(not (window-minibuffer-p)))
|
||||||
(message "Undoing expansions"))))))
|
(message "Undoing expansions"))))))
|
||||||
|
|
||||||
;; Initializes the region to expand (to between BEG and END).
|
;; 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
|
for subsequent calls (for further possible expansions of the same
|
||||||
string). It returns t if a new expansion is found, nil otherwise."
|
string). It returns t if a new expansion is found, nil otherwise."
|
||||||
(let ((expansion ())
|
(let ((expansion ())
|
||||||
(flag (if (frame-visible-p (window-frame (selected-window)))
|
(flag (if (frame-visible-p (window-frame))
|
||||||
'visible t)))
|
'visible t)))
|
||||||
(unless old
|
(unless old
|
||||||
(he-init-string (he-dabbrev-beg) (point))
|
(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 ()
|
(defun global-hl-line-highlight ()
|
||||||
"Highlight the current line in the current window."
|
"Highlight the current line in the current window."
|
||||||
(when global-hl-line-mode ; Might be changed outside the mode function.
|
(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
|
(unless global-hl-line-overlay
|
||||||
(setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved
|
(setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved
|
||||||
(overlay-put global-hl-line-overlay 'face hl-line-face))
|
(overlay-put global-hl-line-overlay 'face hl-line-face))
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ Conditions are:
|
||||||
indicate some non-standard, non-simple completion mechanism,
|
indicate some non-standard, non-simple completion mechanism,
|
||||||
like file-name and other custom-func completions)."
|
like file-name and other custom-func completions)."
|
||||||
|
|
||||||
(and (window-minibuffer-p (selected-window))
|
(and (window-minibuffer-p)
|
||||||
(not executing-kbd-macro)
|
(not executing-kbd-macro)
|
||||||
minibuffer-completion-table
|
minibuffer-completion-table
|
||||||
(or (not (functionp 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)
|
(setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout)
|
||||||
(isearch-dehighlight)
|
(isearch-dehighlight)
|
||||||
(lazy-highlight-cleanup lazy-highlight-cleanup)
|
(lazy-highlight-cleanup lazy-highlight-cleanup)
|
||||||
(let ((found-start (window-start (selected-window)))
|
(let ((found-start (window-start))
|
||||||
(found-point (point)))
|
(found-point (point)))
|
||||||
(when isearch-window-configuration
|
(when isearch-window-configuration
|
||||||
(set-window-configuration 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))
|
(cancel-timer jit-lock-stealth-repeat-timer))
|
||||||
(unless (or executing-kbd-macro
|
(unless (or executing-kbd-macro
|
||||||
memory-full
|
memory-full
|
||||||
(window-minibuffer-p (selected-window))
|
(window-minibuffer-p)
|
||||||
;; For first invocation set up `jit-lock-stealth-buffers'.
|
;; For first invocation set up `jit-lock-stealth-buffers'.
|
||||||
;; In repeated invocations it's already been set up.
|
;; In repeated invocations it's already been set up.
|
||||||
(null (if repeat
|
(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
|
;;;### (autoloads nil "rmailsum" "rmailsum.el" "a9b3bbd9b82dd566524a1209b5cdb7dd")
|
||||||
;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
|
|
||||||
;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "61e7ad0931be1e07034dd57825ff326a")
|
|
||||||
;;; Generated autoloads from rmailsum.el
|
;;; Generated autoloads from rmailsum.el
|
||||||
|
|
||||||
(autoload 'rmail-summary "rmailsum" "\
|
(autoload 'rmail-summary "rmailsum" "\
|
||||||
|
|
|
||||||
|
|
@ -1288,7 +1288,7 @@ advance to the next message."
|
||||||
(prog1
|
(prog1
|
||||||
;; Is EOB visible in the buffer?
|
;; Is EOB visible in the buffer?
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((ht (window-height (selected-window))))
|
(let ((ht (window-height)))
|
||||||
(move-to-window-line (- ht 2))
|
(move-to-window-line (- ht 2))
|
||||||
(end-of-line)
|
(end-of-line)
|
||||||
(eobp)))
|
(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.
|
"Determine if it's wise to enable col-scrolling for the current window.
|
||||||
Basically, we check for existing horizontal scrolling."
|
Basically, we check for existing horizontal scrolling."
|
||||||
(or truncate-lines
|
(or truncate-lines
|
||||||
(> (window-hscroll (selected-window)) 0)
|
(> (window-hscroll) 0)
|
||||||
(not (window-full-width-p))
|
(not (window-full-width-p))
|
||||||
(and
|
(and
|
||||||
mouse-drag-electric-col-scrolling
|
mouse-drag-electric-col-scrolling
|
||||||
|
|
|
||||||
|
|
@ -1513,7 +1513,7 @@ when constructing the set of constraints."
|
||||||
(let* ((newbuf (mpc-tagbrowser-buf tag))
|
(let* ((newbuf (mpc-tagbrowser-buf tag))
|
||||||
(win (get-buffer-window newbuf 0)))
|
(win (get-buffer-window newbuf 0)))
|
||||||
(if win (select-window win)
|
(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))
|
(derived-mode-p 'mpc-tagbrowser-mode))
|
||||||
(setq win (selected-window))
|
(setq win (selected-window))
|
||||||
;; Find a tagbrowser-mode buffer.
|
;; 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)))
|
(song-win (get-buffer-window song-buf 0)))
|
||||||
(if song-win
|
(if song-win
|
||||||
(select-window song-win)
|
(select-window song-win)
|
||||||
(if (or (window-dedicated-p (selected-window))
|
(if (or (window-dedicated-p) (window-minibuffer-p))
|
||||||
(window-minibuffer-p))
|
|
||||||
(ignore-errors (select-frame (make-frame mpc-frame-alist)))
|
(ignore-errors (select-frame (make-frame mpc-frame-alist)))
|
||||||
(with-current-buffer song-buf
|
(with-current-buffer song-buf
|
||||||
(setq-local mpc-previous-window-config
|
(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."
|
"Return a buffer for PROCESS, either the one selected or the process buffer."
|
||||||
(if rcirc-always-use-server-buffer-flag
|
(if rcirc-always-use-server-buffer-flag
|
||||||
(process-buffer process)
|
(process-buffer process)
|
||||||
(let ((buffer (window-buffer (selected-window))))
|
(let ((buffer (window-buffer)))
|
||||||
(if (and buffer
|
(if (and buffer
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(and (eq major-mode 'rcirc-mode)
|
(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 ()
|
(defun gomoku-max-width ()
|
||||||
"Largest possible board width for the current window."
|
"Largest possible board width for the current window."
|
||||||
(1+ (/ (- (window-width (selected-window))
|
(1+ (/ (- (window-width)
|
||||||
gomoku-x-offset gomoku-x-offset 1)
|
gomoku-x-offset gomoku-x-offset 1)
|
||||||
gomoku-square-width)))
|
gomoku-square-width)))
|
||||||
|
|
||||||
(defun gomoku-max-height ()
|
(defun gomoku-max-height ()
|
||||||
"Largest possible board height for the current window."
|
"Largest possible board height for the current window."
|
||||||
(1+ (/ (- (window-height (selected-window))
|
(1+ (/ (- (window-height)
|
||||||
gomoku-y-offset gomoku-y-offset 2)
|
gomoku-y-offset gomoku-y-offset 2)
|
||||||
;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
|
;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
|
||||||
gomoku-square-height)))
|
gomoku-square-height)))
|
||||||
|
|
|
||||||
|
|
@ -843,13 +843,13 @@ If the game is finished, this command requests for another game."
|
||||||
|
|
||||||
(defun landmark-max-width ()
|
(defun landmark-max-width ()
|
||||||
"Largest possible board width for the current window."
|
"Largest possible board width for the current window."
|
||||||
(1+ (/ (- (window-width (selected-window))
|
(1+ (/ (- (window-width)
|
||||||
landmark-x-offset landmark-x-offset 1)
|
landmark-x-offset landmark-x-offset 1)
|
||||||
landmark-square-width)))
|
landmark-square-width)))
|
||||||
|
|
||||||
(defun landmark-max-height ()
|
(defun landmark-max-height ()
|
||||||
"Largest possible board height for the current window."
|
"Largest possible board height for the current window."
|
||||||
(1+ (/ (- (window-height (selected-window))
|
(1+ (/ (- (window-height)
|
||||||
landmark-y-offset landmark-y-offset 2)
|
landmark-y-offset landmark-y-offset 2)
|
||||||
;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
|
;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line !
|
||||||
landmark-square-height)))
|
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))
|
(let ((f (selected-frame))
|
||||||
(outbuf (get-buffer-create "*zone*"))
|
(outbuf (get-buffer-create "*zone*"))
|
||||||
(text (buffer-substring (window-start) (window-end)))
|
(text (buffer-substring (window-start) (window-end)))
|
||||||
(wp (1+ (- (window-point (selected-window))
|
(wp (1+ (- (window-point)
|
||||||
(window-start)))))
|
(window-start)))))
|
||||||
(put 'zone 'orig-buffer (current-buffer))
|
(put 'zone 'orig-buffer (current-buffer))
|
||||||
(switch-to-buffer outbuf)
|
(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
|
All arguments are markers. If END-MK is non-nil, mark is set there
|
||||||
and overlay is highlighted between MK and END-MK."
|
and overlay is highlighted between MK and END-MK."
|
||||||
;; Show compilation buffer in other window, scrolled to this error.
|
;; 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)))
|
(marker-buffer msg)))
|
||||||
;; Use an existing window if it is in a visible frame.
|
;; Use an existing window if it is in a visible frame.
|
||||||
(pre-existing (get-buffer-window (marker-buffer msg) 0))
|
(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.
|
;; Get the source file to view or find.
|
||||||
(setf file (ebrowse-find-source-file file tags-file))
|
(setf file (ebrowse-find-source-file file tags-file))
|
||||||
;; If current window is dedicated, use another frame.
|
;; If current window is dedicated, use another frame.
|
||||||
(when (window-dedicated-p (selected-window))
|
(when (window-dedicated-p)
|
||||||
(setf where 'other-window))
|
(setf where 'other-window))
|
||||||
(cond (view
|
(cond (view
|
||||||
(setf ebrowse-temp-position-to-view struc
|
(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
|
;; selected window's buffer; without the hair, point is moved in both
|
||||||
;; windows. To prevent this, we save the selected window's point before
|
;; windows. To prevent this, we save the selected window's point before
|
||||||
;; doing find-tag-noselect, and restore it after.
|
;; 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))
|
(tagbuf (find-tag-noselect tagname next-p regexp-p))
|
||||||
(tagpoint (progn (set-buffer tagbuf) (point))))
|
(tagpoint (progn (set-buffer tagbuf) (point))))
|
||||||
(set-window-point (prog1
|
(set-window-point (prog1
|
||||||
|
|
|
||||||
|
|
@ -1080,8 +1080,7 @@ The next key typed is executed unless it is SPC."
|
||||||
fortran-column-ruler-fixed)
|
fortran-column-ruler-fixed)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(if (eq (window-start (selected-window))
|
(if (eq (window-start) (window-point))
|
||||||
(window-point (selected-window)))
|
|
||||||
(line-beginning-position 2)
|
(line-beginning-position 2)
|
||||||
(point)))
|
(point)))
|
||||||
nil "Type SPC or any command to erase ruler."))
|
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)
|
obj)
|
||||||
(when (numberp pos)
|
(when (numberp pos)
|
||||||
(with-selected-window (posn-window posn)
|
(with-selected-window (posn-window posn)
|
||||||
(with-current-buffer (window-buffer (selected-window))
|
(with-current-buffer (window-buffer)
|
||||||
(goto-char pos)
|
(goto-char pos)
|
||||||
(dolist (overlay (overlays-in pos pos))
|
(dolist (overlay (overlays-in pos pos))
|
||||||
(when (overlay-get overlay 'put-break)
|
(when (overlay-get overlay 'put-break)
|
||||||
|
|
|
||||||
|
|
@ -3256,7 +3256,7 @@ inserted using a single call to `verilog-insert'."
|
||||||
(defun verilog-point-text (&optional pointnum)
|
(defun verilog-point-text (&optional pointnum)
|
||||||
"Return text describing where POINTNUM or current point is (for errors).
|
"Return text describing where POINTNUM or current point is (for errors).
|
||||||
Use filename, if current buffer being edited shorten to just buffer name."
|
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-name))
|
||||||
buffer-file-name
|
buffer-file-name
|
||||||
(buffer-name))
|
(buffer-name))
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ first comment line visible (if point is in a comment)."
|
||||||
(here (point))
|
(here (point))
|
||||||
;; change this name once I've gotten rid of references to ht.
|
;; change this name once I've gotten rid of references to ht.
|
||||||
;; this is actually the number of the last screen line
|
;; 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)))
|
(line (repos-count-screen-lines (window-start) (point)))
|
||||||
(comment-height
|
(comment-height
|
||||||
;; The call to max deals with the case of cursor between defuns.
|
;; 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 ()
|
(defun toggle-rot13-mode ()
|
||||||
"Toggle the use of ROT13 encoding for the current window."
|
"Toggle the use of ROT13 encoding for the current window."
|
||||||
(interactive)
|
(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)
|
(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))))
|
(set-window-display-table (selected-window) rot13-display-table))))
|
||||||
|
|
||||||
(provide 'rot13)
|
(provide 'rot13)
|
||||||
|
|
|
||||||
|
|
@ -1557,7 +1557,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
||||||
(setq next-buffer (car (process-get proc 'buffers))))
|
(setq next-buffer (car (process-get proc 'buffers))))
|
||||||
(setq rest (cdr rest)))))
|
(setq rest (cdr rest)))))
|
||||||
(and next-buffer (server-switch-buffer next-buffer killed-one))
|
(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))
|
;; (switch-to-buffer (other-buffer))
|
||||||
(message "No server buffers remain to edit")))
|
(message "No server buffers remain to edit")))
|
||||||
(if (not (buffer-live-p next-buffer))
|
(if (not (buffer-live-p next-buffer))
|
||||||
|
|
@ -1584,10 +1584,10 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
||||||
(unless (frame-live-p server-window)
|
(unless (frame-live-p server-window)
|
||||||
(setq server-window (make-frame)))
|
(setq server-window (make-frame)))
|
||||||
(select-window (frame-selected-window server-window))))
|
(select-window (frame-selected-window server-window))))
|
||||||
(when (window-minibuffer-p (selected-window))
|
(when (window-minibuffer-p)
|
||||||
(select-window (next-window nil 'nomini 0)))
|
(select-window (next-window nil 'nomini 0)))
|
||||||
;; Move to a non-dedicated window, if we have one.
|
;; Move to a non-dedicated window, if we have one.
|
||||||
(when (window-dedicated-p (selected-window))
|
(when (window-dedicated-p)
|
||||||
(select-window
|
(select-window
|
||||||
(get-window-with-predicate
|
(get-window-with-predicate
|
||||||
(lambda (w)
|
(lambda (w)
|
||||||
|
|
@ -1601,7 +1601,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)."
|
||||||
;; a minibuffer/dedicated-window (if there's no other).
|
;; a minibuffer/dedicated-window (if there's no other).
|
||||||
(error (pop-to-buffer next-buffer)))))))
|
(error (pop-to-buffer next-buffer)))))))
|
||||||
(when server-raise-frame
|
(when server-raise-frame
|
||||||
(select-frame-set-input-focus (window-frame (selected-window))))))
|
(select-frame-set-input-focus (window-frame)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun server-save-buffers-kill-terminal (arg)
|
(defun server-save-buffers-kill-terminal (arg)
|
||||||
|
|
|
||||||
|
|
@ -1122,7 +1122,7 @@ Returns t if successful."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((data (shell-command-completion)))
|
(let ((data (shell-command-completion)))
|
||||||
(if data
|
(if data
|
||||||
(prog2 (unless (window-minibuffer-p (selected-window))
|
(prog2 (unless (window-minibuffer-p)
|
||||||
(message "Completing command name..."))
|
(message "Completing command name..."))
|
||||||
(apply #'completion-in-region data)))))
|
(apply #'completion-in-region data)))))
|
||||||
|
|
||||||
|
|
@ -1232,7 +1232,7 @@ Returns non-nil if successful."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((data (shell-environment-variable-completion)))
|
(let ((data (shell-environment-variable-completion)))
|
||||||
(if data
|
(if data
|
||||||
(prog2 (unless (window-minibuffer-p (selected-window))
|
(prog2 (unless (window-minibuffer-p)
|
||||||
(message "Completing variable name..."))
|
(message "Completing variable name..."))
|
||||||
(apply #'completion-in-region data)))))
|
(apply #'completion-in-region data)))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4098,9 +4098,9 @@ Don't call it from programs: use `insert-buffer-substring' instead!"
|
||||||
(progn
|
(progn
|
||||||
(barf-if-buffer-read-only)
|
(barf-if-buffer-read-only)
|
||||||
(read-buffer "Insert buffer: "
|
(read-buffer "Insert buffer: "
|
||||||
(if (eq (selected-window) (next-window (selected-window)))
|
(if (eq (selected-window) (next-window))
|
||||||
(other-buffer (current-buffer))
|
(other-buffer (current-buffer))
|
||||||
(window-buffer (next-window (selected-window))))
|
(window-buffer (next-window)))
|
||||||
t))))
|
t))))
|
||||||
(push-mark
|
(push-mark
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
@ -5965,7 +5965,7 @@ The variable `selective-display' has a separate value for each buffer."
|
||||||
(setq selective-display
|
(setq selective-display
|
||||||
(and arg (prefix-numeric-value arg)))
|
(and arg (prefix-numeric-value arg)))
|
||||||
(recenter current-vpos))
|
(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)
|
(princ "selective-display set to " t)
|
||||||
(prin1 selective-display t)
|
(prin1 selective-display t)
|
||||||
(princ "." t))
|
(princ "." t))
|
||||||
|
|
@ -6629,8 +6629,7 @@ Go to the window from which completion was requested."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((buf completion-reference-buffer))
|
(let ((buf completion-reference-buffer))
|
||||||
(if (one-window-p t)
|
(if (one-window-p t)
|
||||||
(if (window-dedicated-p (selected-window))
|
(if (window-dedicated-p) (delete-frame))
|
||||||
(delete-frame))
|
|
||||||
(delete-window (selected-window))
|
(delete-window (selected-window))
|
||||||
(if (get-buffer-window buf)
|
(if (get-buffer-window buf)
|
||||||
(select-window (get-buffer-window buf))))))
|
(select-window (get-buffer-window buf))))))
|
||||||
|
|
|
||||||
|
|
@ -2648,7 +2648,7 @@ Also resets scanner functions."
|
||||||
(dframe-select-attached-frame speedbar-frame)
|
(dframe-select-attached-frame speedbar-frame)
|
||||||
;; make sure we at least choose a window to
|
;; make sure we at least choose a window to
|
||||||
;; get a good directory from
|
;; get a good directory from
|
||||||
(if (window-minibuffer-p (selected-window))
|
(if (window-minibuffer-p)
|
||||||
nil
|
nil
|
||||||
;; Check for special modes
|
;; Check for special modes
|
||||||
(speedbar-maybe-add-localized-support (current-buffer))
|
(speedbar-maybe-add-localized-support (current-buffer))
|
||||||
|
|
@ -3512,7 +3512,7 @@ interested in."
|
||||||
(set-buffer speedbar-buffer)
|
(set-buffer speedbar-buffer)
|
||||||
|
|
||||||
(if (<= (count-lines (point-min) (point-max))
|
(if (<= (count-lines (point-min) (point-max))
|
||||||
(1- (window-height (selected-window))))
|
(1- (window-height)))
|
||||||
;; whole buffer fits
|
;; whole buffer fits
|
||||||
(let ((cp (point)))
|
(let ((cp (point)))
|
||||||
|
|
||||||
|
|
@ -3545,7 +3545,7 @@ interested in."
|
||||||
(setq end (point-max)))))
|
(setq end (point-max)))))
|
||||||
;; Now work out the details of centering
|
;; Now work out the details of centering
|
||||||
(let ((nl (count-lines start end))
|
(let ((nl (count-lines start end))
|
||||||
(wl (1- (window-height (selected-window))))
|
(wl (1- (window-height)))
|
||||||
(cp (point)))
|
(cp (point)))
|
||||||
(if (> nl wl)
|
(if (> nl wl)
|
||||||
;; We can't fit it all, so just center on cursor
|
;; We can't fit it all, so just center on cursor
|
||||||
|
|
@ -3558,12 +3558,12 @@ interested in."
|
||||||
nil
|
nil
|
||||||
;; we need to do something...
|
;; we need to do something...
|
||||||
(goto-char start)
|
(goto-char start)
|
||||||
(let ((newcent (/ (- (window-height (selected-window)) nl) 2))
|
(let ((newcent (/ (- (window-height) nl) 2))
|
||||||
(lte (count-lines start (point-max))))
|
(lte (count-lines start (point-max))))
|
||||||
(if (and (< (+ newcent lte) (window-height (selected-window)))
|
(if (and (< (+ newcent lte) (window-height))
|
||||||
(> (- (window-height (selected-window)) lte 1)
|
(> (- (window-height) lte 1)
|
||||||
newcent))
|
newcent))
|
||||||
(setq newcent (- (window-height (selected-window))
|
(setq newcent (- (window-height)
|
||||||
lte 1)))
|
lte 1)))
|
||||||
(recenter newcent))))
|
(recenter newcent))))
|
||||||
(goto-char cp))))))
|
(goto-char cp))))))
|
||||||
|
|
@ -3997,7 +3997,7 @@ TEXT is the buffer's name, TOKEN and INDENT are unused."
|
||||||
|
|
||||||
(defun speedbar-recenter ()
|
(defun speedbar-recenter ()
|
||||||
"Recenter the current buffer so point is in the center of the window."
|
"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.
|
;;; Color loading section.
|
||||||
|
|
|
||||||
|
|
@ -1541,7 +1541,7 @@ a face or button specification."
|
||||||
(t "splash.pbm")))
|
(t "splash.pbm")))
|
||||||
(img (create-image image-file))
|
(img (create-image image-file))
|
||||||
(image-width (and img (car (image-size img))))
|
(image-width (and img (car (image-size img))))
|
||||||
(window-width (window-width (selected-window))))
|
(window-width (window-width)))
|
||||||
(when img
|
(when img
|
||||||
(when (> window-width image-width)
|
(when (> window-width image-width)
|
||||||
;; Center the image in the window.
|
;; 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
|
(window-min-height (min window-min-height
|
||||||
ispell-choices-win-default-height))
|
ispell-choices-win-default-height))
|
||||||
(command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m ))
|
(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)
|
(skipped 0)
|
||||||
char num result textwin dedicated-win)
|
char num result textwin dedicated-win)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ nonsensical results."
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(revert-buffer t t))
|
(revert-buffer t t))
|
||||||
(setq buffer (find-file-noselect makeinfo-output-file-name)))
|
(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-other-window buffer)
|
||||||
(switch-to-buffer buffer)))
|
(switch-to-buffer buffer)))
|
||||||
(goto-char (point-min))))
|
(goto-char (point-min))))
|
||||||
|
|
|
||||||
|
|
@ -896,7 +896,7 @@ Run the Viper tutorial? "))
|
||||||
;; inserted at the start of the buffer, the "type C-v to
|
;; inserted at the start of the buffer, the "type C-v to
|
||||||
;; move to the next screen" might not be visible on the
|
;; move to the next screen" might not be visible on the
|
||||||
;; first screen (n < 0). How will the novice know what to do?
|
;; 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))
|
(count-lines (point-min) (point))
|
||||||
6)))
|
6)))
|
||||||
(if (< n 8)
|
(if (< n 8)
|
||||||
|
|
|
||||||
|
|
@ -813,12 +813,12 @@ non-nil, otherwise in local time."
|
||||||
|
|
||||||
(unless (equal file-name buffer-file-name)
|
(unless (equal file-name buffer-file-name)
|
||||||
(cond
|
(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
|
;; If the selected window already shows the desired buffer don't show
|
||||||
;; it again (particularly important if other-window is true).
|
;; it again (particularly important if other-window is true).
|
||||||
;; This is important for diff-add-change-log-entries-other-window.
|
;; This is important for diff-add-change-log-entries-other-window.
|
||||||
(set-buffer (window-buffer (selected-window))))
|
(set-buffer (window-buffer)))
|
||||||
((or other-window (window-dedicated-p (selected-window)))
|
((or other-window (window-dedicated-p))
|
||||||
(find-file-other-window file-name))
|
(find-file-other-window file-name))
|
||||||
(t (find-file file-name))))
|
(t (find-file file-name))))
|
||||||
(or (derived-mode-p 'change-log-mode)
|
(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-regexp
|
||||||
compare-windows-sync)))
|
compare-windows-sync)))
|
||||||
(setq p1 (point) b1 (current-buffer))
|
(setq p1 (point) b1 (current-buffer))
|
||||||
(setq w2 (next-window (selected-window)))
|
(setq w2 (next-window))
|
||||||
(if (eq w2 (selected-window))
|
(if (eq w2 (selected-window))
|
||||||
(setq w2 (next-window (selected-window) nil 'visible)))
|
(setq w2 (next-window (selected-window) nil 'visible)))
|
||||||
(if (eq w2 (selected-window))
|
(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 ()
|
(defun ediff-indent-help-message ()
|
||||||
(let* ((shift (/ (max 0 (- (window-width (selected-window))
|
(let* ((shift (/ (max 0 (- (window-width)
|
||||||
(ediff-help-message-line-length)))
|
(ediff-help-message-line-length)))
|
||||||
2))
|
2))
|
||||||
(str (make-string shift ?\ )))
|
(str (make-string shift ?\ )))
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ to invocation.")
|
||||||
;; to reside.
|
;; to reside.
|
||||||
(defun ediff-setup-control-buffer (ctl-buf)
|
(defun ediff-setup-control-buffer (ctl-buf)
|
||||||
"Set up window for control buffer."
|
"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
|
(set-buffer ctl-buf) ; we are in control frame but just in case
|
||||||
(switch-to-buffer ctl-buf))
|
(switch-to-buffer ctl-buf))
|
||||||
(let ((window-min-height 2))
|
(let ((window-min-height 2))
|
||||||
|
|
@ -1629,7 +1629,7 @@ the width of the A/B/C windows."
|
||||||
(setq lines (1+ lines)))
|
(setq lines (1+ lines)))
|
||||||
;; And position the beginning on the right line
|
;; And position the beginning on the right line
|
||||||
(goto-char beg)
|
(goto-char beg)
|
||||||
(recenter (/ (1+ (max (- (1- (window-height (selected-window)))
|
(recenter (/ (1+ (max (- (1- (window-height))
|
||||||
lines)
|
lines)
|
||||||
1)
|
1)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -861,7 +861,7 @@ into icons, regardless of the window manager."
|
||||||
;; create a new splittable frame if none is found
|
;; create a new splittable frame if none is found
|
||||||
(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
|
(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
|
||||||
(if (ediff-window-display-p)
|
(if (ediff-window-display-p)
|
||||||
(let ((wind-frame (window-frame (selected-window)))
|
(let ((wind-frame (window-frame))
|
||||||
seen-windows)
|
seen-windows)
|
||||||
(while (and (not (memq (selected-window) seen-windows))
|
(while (and (not (memq (selected-window) seen-windows))
|
||||||
(or
|
(or
|
||||||
|
|
@ -877,7 +877,7 @@ into icons, regardless of the window manager."
|
||||||
(setq seen-windows (cons (selected-window) seen-windows))
|
(setq seen-windows (cons (selected-window) seen-windows))
|
||||||
;; try new window
|
;; try new window
|
||||||
(other-window 1 t)
|
(other-window 1 t)
|
||||||
(setq wind-frame (window-frame (selected-window)))
|
(setq wind-frame (window-frame))
|
||||||
)
|
)
|
||||||
(if (memq (selected-window) seen-windows)
|
(if (memq (selected-window) seen-windows)
|
||||||
;; fed up, no appropriate frames
|
;; 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))
|
(setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame))
|
||||||
(select-frame ctl-frame)
|
(select-frame ctl-frame)
|
||||||
(if (window-dedicated-p (selected-window))
|
(if (window-dedicated-p)
|
||||||
()
|
()
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
(switch-to-buffer ctl-buffer))
|
(switch-to-buffer ctl-buffer))
|
||||||
|
|
|
||||||
|
|
@ -1770,7 +1770,7 @@ to the left margin, if they are in windows."
|
||||||
(setq lines (1+ lines)))
|
(setq lines (1+ lines)))
|
||||||
;; And position the beginning on the right line
|
;; And position the beginning on the right line
|
||||||
(goto-char beg)
|
(goto-char beg)
|
||||||
(recenter (/ (1+ (- (1- (window-height (selected-window)))
|
(recenter (/ (1+ (- (1- (window-height))
|
||||||
lines))
|
lines))
|
||||||
2))))))
|
2))))))
|
||||||
(goto-char pos))
|
(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."
|
BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
|
||||||
(interactive (list (current-buffer)))
|
(interactive (list (current-buffer)))
|
||||||
(save-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))))
|
(get-buffer-window buf t))))
|
||||||
(when win
|
(when win
|
||||||
(if (window-dedicated-p 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
|
(with-current-buffer buf
|
||||||
(bury-buffer (unless (and (eq buf (window-buffer (selected-window)))
|
(bury-buffer (unless (and (eq buf (window-buffer))
|
||||||
(not (window-dedicated-p (selected-window))))
|
(not (window-dedicated-p)))
|
||||||
buf)))
|
buf)))
|
||||||
(when mainbuf
|
(when mainbuf
|
||||||
(let ((mainwin (or (get-buffer-window 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."
|
windows nor the buffer list."
|
||||||
;; If we start from the minibuffer window, don't fail to come
|
;; If we start from the minibuffer window, don't fail to come
|
||||||
;; back to it.
|
;; back to it.
|
||||||
(when (window-minibuffer-p (selected-window))
|
(when (window-minibuffer-p)
|
||||||
(setq minibuf t))
|
(setq minibuf t))
|
||||||
;; Make sure to not mess up the order of recently selected
|
;; Make sure to not mess up the order of recently selected
|
||||||
;; windows. Use `save-selected-window' and `select-window'
|
;; 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-
|
;; minibuffer. Use `unread-command-events' in order to execute pre-
|
||||||
;; and post-command hooks and trigger idle timers. To avoid delaying
|
;; and post-command hooks and trigger idle timers. To avoid delaying
|
||||||
;; autoselection again, set `mouse-autoselect-window-state'."
|
;; autoselection again, set `mouse-autoselect-window-state'."
|
||||||
(unless (window-minibuffer-p (selected-window))
|
(unless (window-minibuffer-p)
|
||||||
(setq mouse-autoselect-window-state 'select)
|
(setq mouse-autoselect-window-state 'select)
|
||||||
(setq unread-command-events
|
(setq unread-command-events
|
||||||
(cons (list 'select-window (list window))
|
(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
|
;; minibuffer gets unselected unexpectedly, and where
|
||||||
;; you then have to move your mouse all the way down to
|
;; you then have to move your mouse all the way down to
|
||||||
;; the minibuffer to select it.
|
;; the minibuffer to select it.
|
||||||
(window-minibuffer-p (selected-window))
|
(window-minibuffer-p)
|
||||||
;; Don't switch to minibuffer window unless it's active.
|
;; Don't switch to minibuffer window unless it's active.
|
||||||
(and (window-minibuffer-p window)
|
(and (window-minibuffer-p window)
|
||||||
(not (minibuffer-window-active-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))
|
(set-window-configuration winconf))
|
||||||
(cond
|
(cond
|
||||||
((window-live-p chosen) (select-window chosen))
|
((window-live-p chosen) (select-window chosen))
|
||||||
((window-minibuffer-p (selected-window))
|
((window-minibuffer-p) (other-window 1)))
|
||||||
(other-window 1)))
|
|
||||||
(when (/= minisize (window-height miniwin))
|
(when (/= minisize (window-height miniwin))
|
||||||
(with-selected-window miniwin
|
(with-selected-window miniwin
|
||||||
(setf (window-height) minisize)))))
|
(setf (window-height) minisize)))))
|
||||||
|
|
@ -381,7 +380,7 @@ In other words, \"undo\" changes in window configuration."
|
||||||
(setq winner-undone-data (list (winner-win-data))))
|
(setq winner-undone-data (list (winner-win-data))))
|
||||||
(cl-incf winner-undo-counter) ; starting at 1
|
(cl-incf winner-undo-counter) ; starting at 1
|
||||||
(when (and (winner-undo-this)
|
(when (and (winner-undo-this)
|
||||||
(not (window-minibuffer-p (selected-window))))
|
(not (window-minibuffer-p)))
|
||||||
(message "Winner undo (%d / %d)"
|
(message "Winner undo (%d / %d)"
|
||||||
winner-undo-counter
|
winner-undo-counter
|
||||||
(1- (ring-length winner-pending-undo-ring)))))))
|
(1- (ring-length winner-pending-undo-ring)))))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue