1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

750 Commits

Author SHA1 Message Date
Stefan Kangas
3f9f3ba437 Docfix: use command substitution for 'universal-argument'
* lisp/autoarg.el (autoarg-mode):
* lisp/bookmark.el (bookmark-set, bookmark-set-no-overwrite)
(bookmark-save):
* lisp/calendar/todo-mode.el (todo-insert-item)
(todo-filter-top-priorities)
(todo-filter-top-priorities-multifile):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix):
* lisp/eshell/eshell.el (eshell):
* lisp/gnus/gnus-group.el (gnus-group-find-new-groups):
* lisp/gnus/gnus-start.el (gnus-find-new-newsgroups):
* lisp/gnus/gnus-sum.el (gnus-summary-show-article):
* lisp/gnus/gnus.el (gnus-secondary-servers):
* lisp/org/org-timer.el (org-timer-set-timer):
* lisp/org/ox.el (org-export-dispatch-last-position):
* lisp/printing.el (pr-ps-directory-preview)
(pr-ps-directory-using-ghostscript, pr-ps-directory-print)
(pr-ps-directory-ps-print, pr-ps-buffer-preview)
(pr-ps-buffer-using-ghostscript, pr-ps-buffer-print)
(pr-ps-buffer-ps-print, pr-despool-preview)
(pr-despool-using-ghostscript, pr-despool-print)
(pr-despool-ps-print, pr-ps-file-up-ps-print, pr-ps-fast-fire)
(pr-txt-fast-fire):
* lisp/progmodes/idlwave.el (idlwave-complete):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/replace.el (occur):
* lisp/ses.el (ses--advice-yank):
* lisp/simple.el (set-mark-command-repeat-pop):
* lisp/sort.el (delete-duplicate-lines):
* lisp/strokes.el (strokes-help):
* lisp/textmodes/artist.el (artist-mode):
* lisp/textmodes/reftex-cite.el (reftex-citation):
* lisp/textmodes/reftex-dcr.el (reftex-view-crossref):
* lisp/textmodes/reftex-index.el (reftex-index-selection-or-word)
(reftex-display-index):
* lisp/textmodes/reftex-ref.el (reftex-reference):
* lisp/textmodes/reftex-toc.el (reftex-toc):
* lisp/textmodes/reftex-vars.el (reftex-cite-prompt-optional-args)
(reftex-enable-partial-scans):
* lisp/textmodes/texnfo-upd.el (texinfo-master-menu):
* lisp/windmove.el (windmove-display-in-direction)
(windmove-delete-left, windmove-delete-up)
(windmove-delete-right, windmove-delete-down):
* lisp/window.el (recenter-window-group, recenter-other-window): Use
command substitution for 'universal-argument' instead of raw "C-u".
2021-09-16 20:05:48 +02:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
Juri Linkov
67ab890cde * lisp/window.el (display-buffer-in-previous-window): Add symbolp (bug#50576) 2021-09-15 09:47:58 +03:00
Martin Rudalics
4793c980a1 ;* lisp/window.el (switch-to-prev-buffer): Fix typo in doc-string. 2021-09-12 11:38:24 +02:00
Martin Rudalics
1293bf5bb7 Improve doc-strings of some buffer display options (Bug#50518)
* lisp/window.el (pop-up-frame-alist, same-window-buffer-names)
(same-window-regexps, pop-up-frames, pop-up-windows): In
doc-strings say that these options are maintained for backward
compatibility only (Bug#50518).
2021-09-12 11:11:41 +02:00
pillule
eddb003f30 Fix behavior when switch-to-prev-buffer-skip is a function (Bug#49275)
* lisp/window.el (switch-to-prev-buffer)
(switch-to-next-buffer): More correctly handle cases where
'switch-to-prev-buffer-skip' is a function.
2021-08-18 09:16:06 +02:00
Lars Ingebrigtsen
9a534506ba switch-to-buffer-other-frame doc string improvement
* lisp/window.el (switch-to-buffer-other-frame): Document that we
don't always display the buffer in a different frame (bug#17719).
2021-07-14 16:40:18 +02:00
Juri Linkov
45acbe6d62 Fix display-buffer-override-next-command for no-select case (bug#49057)
* lisp/window.el (display-buffer-override-next-command):
Separate 'postfun' from 'clearfun', so 'clearfun' resets
'display-buffer-overriding-action', whereas 'postfun' calls
'post-function' that can select the right window in 'post-command-hook'.

* lisp/windmove.el (windmove-display-no-select): Add new choice 'ignore'.
Improve docstring.
(windmove-display-in-direction): Use new value 'ignore' of
'windmove-display-no-select'.  Improve docstring.
(windmove-display-left, windmove-display-up)
(windmove-display-right, windmove-display-down): Mention
'windmove-display-no-select' in docstrings.
2021-06-17 22:53:57 +03:00
pillule
d0c7d8bc22 Improve handling of dedicated flag for side windows (Bug#48493)
* doc/lispref/windows.texi (Buffers and Windows): Mention the
special handling of side windows and add a reference.
(Buffer Display Action Alists): Say explicitly that
`display-buffer-in-side-window' is dedicating to side by default.
(Dedicated Windows): Add case (4) and explain its meaning, add
a reference.
(Displaying Buffers in Side Windows): Move the paragraph about
`switch-to-(prev|next)-buffer' into a new item to emphasize the
special meaning of dedication for side windows.
* lisp/window.el (set-window-buffer-start-and-point): Restore
side dedication.
(switch-to-prev-buffer, switch-to-next-buffer): Correct return
value that should be nil instead of the same buffer in case of
no change.
(delete-windows-on): Restore side dedication.
(replace-buffer-in-windows): Update the docstring, restore side
dedication.
(quit-restore-window): Rearrange the logic so that strongly
dedicated windows are eventually deleted first.  Restore the
side dedication.  In the final case try to
`switch-to-prev-buffer' before deleting a window (Bug#48367).
2021-06-14 09:59:11 +02:00
Martin Rudalics
00140ca6bf Rename/rewrite recently added option and function in window.el
* lisp/window.el (window-at-x-y): Rename from `window-at-pos'.
Fix doc-string.
(delete-window-choose-selected): Rename from
`delete-window-set-selected'.  Fix doc-string.
(delete-window): Adjust to above renaming.
* doc/emacs/windows.texi (Change Window): Mention new option
`delete-window-choose-selected'.
* etc/NEWS:
* doc/lispref/windows.texi (Deleting Windows): Follow up on
above renamings.
2021-06-11 09:55:02 +02:00
Martin Rudalics
b3dd0ce75b Provide new option `delete-window-set-selected' (Bug#47300)
When `delete-window' deletes its frame's selected window, this new
option allows to choose another window as replacement.

* lisp/window.el (get-lru-window, get-mru-window)
(get-largest-window): New optional argument NO-OTHER.
(window-at-pos): New function.
(delete-window-set-selected): New option.
(delete-window): Handle `delete-window-set-selected'.
* src/window.c (Fdelete_window_internal): Set the selected
window of WINDOW's frame to the first window on that frame and
let `delete-window' choose a more suitable window instead.
* doc/lispref/windows.texi (Deleting Windows): Describe new
option `delete-window-set-selected'.
(Cyclic Window Ordering): Describe new NO-OTHER argument for
`get-lru-window', `get-mru-window' and `get-largest-window'.
* etc/NEWS: Mention `delete-window-set-selected' and the NO-OTHER
argument.
2021-06-10 09:14:21 +02:00
Gregory Heytings
e365e903db Do not switch to other window when minibuffer is selected
* lisp/window.el (handle-select-window): Do not silently switch to
other window when minibuffer is selected and
mouse-autoselect-window is t (Bug#47969).
2021-05-25 21:41:07 +02:00
Eli Zaretskii
171dbe7048 Fix rare failures in 'window-default-font-height'
* lisp/window.el (window-default-font-height): Avoid signaling an
error when a client TTY frame happens to have an X-style 'display'
parameter.  (Bug#48408)
2021-05-19 19:01:07 +03:00
Martin Rudalics
567c31121f Fix recently introduced misbehavior of `quit-restore-window' (Bug#48493)
* lisp/window.el (quit-restore-window): Unconditionally call
`switch-to-prev-buffer' (Bug#48493).
2021-05-19 09:17:37 +02:00
Juri Linkov
0fa959db20 * lisp/repeat.el (repeat-exit-timeout): New defcustom (bug#48472).
(repeat-exit-timer): New variable.
(repeat-post-hook): Run idle timer with an "exit function"
returned from set-transient-map.
Suggested by Gustavo Barros <gusbrs.2016@gmail.com>.

(repeat-echo-message): Remove own previous message when input arg is nil.

* lisp/window.el (display-buffer-override-next-command): Return exitfun.
2021-05-19 00:02:42 +03:00
pillule
0a68159026 Fix `quit-restore-window' when all previous buffers got killed (Bug#48367)
* lisp/window.el (quit-restore-window): Simplify calculation of
WINDOW's previous buffer.  Avoid that killing WINDOW's previous
buffers results in a state where `quit-window' has no more
effect, by simply deleting WINDOW in that case (Bug#48367).

Copyright-paperwork-exempt: yes
2021-05-15 10:47:07 +02:00
Alan Mackenzie
780b1db126 Various detailed fixes to minibuf.c, etc., to fix bug #48337
Also fix some unsafe coding.

* lisp/window.el (push-window-buffer-onto-prev): New function, extracted from
(record-window-buffer): Refactor by extracting the above, and removing the now
redundant parameter DO-MINIBUF.

* src/minibuf.c (zip_minibuffer_stacks, read_minibuf): Replace calls to
get_minibuffer (0) by nth_minibuffer (0).  Replace calls to
Qrecord_window_buffer by calls to Qpush_window_buffer_onto_prev.
(Factive_minibuffer_window, read_minibuf_unwind): Call abort_emacs should an
"impossible" null value be returned by nth_minibuffer.
(read_minibuf): Move the get_minibuffer_call to just after the incrementation
of minibuf_level as a precaution against a missing buffer in
Vminibuffer_list.
(nth_minibuffer): Replace XCAR by Fcar, to allow (car nil) to work.
(init_minibuf_once): Create the inactive buffer  *Minibuf-0*.
(syms_of_minibuf): New DEFSYM, Qpush_window_buffer_onto_prev.

* src/window.c (restore_window_configuration): Replace some XCARs and XCDRs
by Fcar_safe and Fcdr_safe.
2021-05-14 15:52:21 +00:00
Alan Mackenzie
f608b4b93c Prevent the selected window being a dead mini-window when switching frames
This fixes bug #48249 and also a situation where, with recursive minibuffers
enabled and minibuffer-follows-selected-frame t, switching frames when a
minibuffer was open would leave the mini-window selected on the old frame.

* lisp/window.el (record-window-buffer): Add extra parameter DO-MINIBUF, and
amend the code such that minibuffers only get processed when that parameter is
non-nil.

* src/minibuf.c (zip_minibuffer_stacks, read_minibuf): Call
Qrecord_window_buffer with the new argument set to Qt.
(move_minibuffers_onto_frame): Set the selected window on the old frame when
this would otherwise remain the mini-window.
2021-05-08 12:13:57 +00:00
Alan Mackenzie
c873d16af6 Fix wrong handling of minibuffers when frames get iconified/made invisible
This should fix bug #47766.

* lisp/window.el (window-deletable-p): Add a quote where it was missing from
minibuffer-follows-selected-frame.

* src/frame.c (check_minibuf_window): Delete the function.
(delete_frame): In place of calling check_minibuf_window, call
move_minibuffers_onto_frame, possibly to move minibuffers onto the new current
frame.
(Fmake_frame_invisible, Ficonify_frame): Remove calls to check_minibuf_window.

* src/minibuf.c (Factive_minibuffer_window): Search the frames for the active
minibuffer rather than just assuming minibuf_window has been correctly
updated.
2021-05-06 10:48:14 +00:00
Juri Linkov
0e8c862885 * lisp/window.el (window--state-put-2): Set next/prev-buffers even to nil.
When next-buffers or prev-buffers are nil, still use set-window-next-buffers
or set-window-prev-buffers to set next/prev-buffers to nil.  (Bug#46904)
2021-04-28 23:25:08 +03:00
Lars Ingebrigtsen
8f63f0078a Revert window/winner changes (Revert 0454bfd331)
See bug#23621 for an explanation.
2021-04-25 19:47:14 +02:00
Utkarsh Singh
47576b429d * lisp/window.el (display-buffer): Doc fix. (Bug#47950)
Copyright-paperwork-exempt: yes
2021-04-22 15:47:04 +02:00
Juri Linkov
15de559d98 * lisp/repeat.el (repeat-keep-prefix): New defcustom.
* lisp/repeat.el (repeat-map): New autoloaded global variable.
(repeat-post-hook): Use 'repeat-map' when non-nil
and reset it to nil afterwards.
(repeat-post-hook): Keep the current prefix when
'repeat-keep-prefix' is non-nil.

* lisp/window.el (other-window-repeat-map): Add "O" that sets
'repeat-map' to 'other-window-repeat-map' before calling
'(other-window -1)'.

https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg01387.html
2021-04-06 00:02:43 +03:00
Alan Mackenzie
7c2ebf6e23 Prevent open minibuffers getting lost when their frame gets deleted
This happened with minibuffer-follows-selected-frame set to t.

* doc/emacs/mini.texi (Basic Minibuffer): State where a command's action takes
place when a minibuffer's frame has been deleted.

* lisp/window.el (window--before-delete-windows, record-window-buffer): Take
into account that minibuffers are now recorded on w->prev_buffers field.

* src/fns.c (merge_c): New version of `merge' taking a C function, rather than
a Lisp function as the comparison function.

* src/frame.c (do_switch_frame): Pass arguments sf and for_deletion to
move_minibuffers_onnto_frame.

* src/lisp.h (top level): Declare merge_c and
move_minibuffers_onto_selected_frame.

* src/minibuf.c (MB_frame): New Lisp_Object recording the minibuffer's frame.
(choose_minibuf_frame): Remove all code except that which sets minibuf_window
to the current frame's minibuffer.
(minibuffer_ent_greater): New comparison function, passed to merge_c.
(zip_minibuffer_stacks): New function.
(move_minibuffers_onto_frame): Renamed from `move_minibuffer_onto_frame' given
two arguments, the old frame and for_deletion, and simplified.  Minibuffers
are now stacked in the mini-window's ->prev_buffers field.
(read_minibuf): Several detailed amendments.
(exp_MB_frame): New Lisp_Object, the expired minibuffer's frame.
(read_minibuf_unwind): Search for the expired minibuffer's frame, rather than
taking it from (unreliable) variables.  Switch temporarily to this frame for
tidying up operations.
(minibuffer_unwind): New function which pops a stacked minibuffer.
(syms_of_minibuf): Call staticpro for the two new Lisp variables.

* src/window.c (Fset_window_configuration): Don't record minibuffers with
record-window-buffer.

* src/xdisp.c (gui_consider_frame_title): Remove redundant Fselect_window,
which caused an unwanted frame switch.  Amend the arguments to
format_mode_line_unwind_data to match.
2021-03-21 16:54:31 +00:00
Juri Linkov
12409c9064 New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
* doc/emacs/basic.texi (Repeating): Document repeat-mode.

* lisp/repeat.el (repeat-exit-key): New defcustom.
(repeat-mode): New global minor mode.
(repeat-post-hook): New function.

* lisp/bindings.el (undo-repeat-map): New variable.
(undo): Put 'repeat-map' property with
'undo-repeat-map'.
(next-error-repeat-map): New variable.
(next-error, previous-error): Put 'repeat-map' property with
'next-error-repeat-map'.

* lisp/window.el (other-window-repeat-map): New variable.
(other-window): Put 'repeat-map' property with
'other-window-repeat-map'.
(resize-window-repeat-map): New variable.
(enlarge-window, enlarge-window-horizontally)
(shrink-window-horizontally, shrink-window): Put 'repeat-map'
property with 'resize-window-repeat-map'.
2021-02-17 20:04:42 +02:00
Tino Calancha
9380a7ed90 Add command to recenter errors from Occur/Grep buffers
To scroll up/down the current displayed occurrence/error
without abandon the Occur/Grep buffer.

Add also a command 'recenter-other-window' to recenter
the other window from any kind of buffer.

* lisp/window.el (recenter-other-window): New command.
Bind recenter-other-window to S-M-C-l (Bug#46119).

* lisp/simple.el (recenter-current-error): New command.
* lisp/progmodes/grep.el (grep-mode-map):
Delete bidings for n and p.

* lisp/progmodes/compile.el (compilation-minor-mode-map):
Move here the n and p bindings.
Bind `recenter-current-error' to l.
* lisp/replace.el (occur-mode-map):
Same.

* doc/emacs/windows.texi (Other Window):
* doc/emacs/display.texi (Recentering):
Document recenter-other-window.

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce the changes.
2021-02-07 16:51:07 +01:00
Glenn Morris
bd5b4b35bc Merge from origin/emacs-27
7355209f53 (origin/emacs-27) * lisp/window.el (recenter-top-bottom): ...
dc78f8a4ea (emacs-27) url-http.el: Special-case NTLM authentication
85b0137858 * lisp/isearch.el (isearch-lazy-highlight): Fix defcustom ...
cbeda21083 Sync latest SKK-JISYO.L
2021-02-03 08:11:08 -08:00
Eli Zaretskii
7355209f53 * lisp/window.el (recenter-top-bottom): Clarify doc string. 2021-02-02 18:25:31 +02:00
Stefan Kangas
58473dc660 Prefer defvar-local in preloaded files
* lisp/abbrev.el:
* lisp/bindings.el (mode-line-mule-info, mode-line-modified)
(mode-line-remote, mode-line-process)
(mode-line-buffer-identification):
* lisp/buff-menu.el (Buffer-menu-files-only):
* lisp/files.el (buffer-file-number, buffer-file-read-only)
(local-write-file-hooks, write-contents-functions)
(file-local-variables-alist, dir-local-variables-alist)
(save-buffer-coding-system, buffer-save-without-query):
* lisp/font-core.el (font-lock-defaults):
* lisp/font-lock.el (font-lock-keywords-case-fold-search)
(font-lock-syntactically-fontified)
(font-lock-extend-after-change-region-function)
(font-lock-extend-region-functions, font-lock-major-mode):
* lisp/menu-bar.el (list-buffers-directory):
* lisp/simple.el (next-error--message-highlight-overlay)
(next-error-buffer, next-error-function)
(next-error-move-function, goto-line-history)
(minibuffer-default-add-done, undo-extra-outer-limit):
* lisp/tab-bar.el (tab-switcher-column):
* lisp/term/ns-win.el (ns-select-overlay):
* lisp/window.el (window-size-fixed, window-area-factor)
(window-group-start-function, window-group-end-function)
(set-window-group-start-function)
(recenter-window-group-function)
(pos-visible-in-window-group-p-function)
(selected-window-group-function)
(move-to-window-group-line-function): Prefer defvar-local.
2021-01-31 20:08:25 +01:00
Juri Linkov
fb05199b0b Support variable name for previous-window in display-buffer-in-previous-window
* lisp/window.el (display-buffer-in-previous-window): Support the value of
'previous-window' entry as a symbol for variable name (bug#45688).
2021-01-27 11:31:04 +02:00
Basil L. Contovounesios
f45be48ddb
; Remove recent spurious addition in window.el
* lisp/window.el (display-buffer-use-some-window): Remove spurious
message included in 2021-01-11 "Support using auth-source for
NickServ passwords in ERC" (bug#45340#44).
2021-01-15 21:46:54 +00:00
Glenn Morris
c83590b121 Merge from origin/emacs-27
488204cdc6 (origin/emacs-27) Remove one of recently added warnings ab...
55bc1560ac Fix assertion failure in window_box_height (Bug#45737)
27743e9e70 Fix cl-concatenate inlining
32a3758c84 Fix infloop in 'pixel-scroll-mode'
74d18957b8 Fix inhibiting the default.el loading in user init file
2021-01-14 07:50:28 -08:00
Leon Vack
42e72f4ade Support using auth-source for NickServ passwords in ERC
* lisp/etc/erc-services.el (erc-nickserv-passwords): Document that
the passwords are only used when erc-prompt-for-nickserv-password
is nil.
* (erc-use-auth-source-for-nickserv-password): New customizable
variable to enable checking auth-source for NickServ passwords.
* (etc-nickserv-get-password): New function to handle the lookup
of the NickServ password from both auth-source and the
erc-nickserv-passwords variable.
* (erc-nickserv-call-identify-function): Use new
erc-nickserv-get-password function to lookup NickServ passwords.
* (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect,
erc-nickserv-identify-on-nick-change): Call
erc-nickserv-call-identify-function when
erc-use-auth-source-for-nickserv-password is set.
* etc/NEWS: Document change (bug#45340).
2021-01-11 15:51:14 +01:00
Alan Mackenzie
c7c154bb57 Fix incompleteness in the implementation of minibuffer-follows-selected-frame
In particular, add a new value to the variable, and fix several bugs apparent
with the implementation up till now.

* doc/emacs/mini.texi (Basic Minibuffer): Add a description of the new
non-nil, non-t value of minibuffer-follows-selected-frame.

* doc/emacs/trouble.texi (Quitting): Add a description of how C-g handles
recursive minibuffers when typed in one which isn't the most nested.

* doc/lispref/minibuf.texi (Intro to Minibuffers): Add an @dfn for "active
minibuffer".
(Minibuffer Commands): Document that exit-minibuffer throws an error when not
invoked from the innermost Minibuffer.
(Recursive Mini): Amend the description of the visibility of outer level
minibuffers.
(Minibuffer Misc): In the description of the minibuffer hooks, replace "the
minibuffer" with "a minibuffer".

* etc/NEWS (Entry announcing minibuffer-follows-selected-frame): Add a
description of the new non-nil, non-t value.

* lisp/cus-start.el (top level): make the customize entry for
minibuffer-follows-selected-frame a choice between three entries.

* lisp/minibuffer.el (exit-minibuffer): throw an error when we're not in the
most nested minibuffer.
(top level): Bind C-g to abort-minibuffers in minibuffer-local-map.

* lisp/window.el (window-deletable-p): return the symbol `frame' when (amongst
other things) minibuffer-follows-selected-frame is t.

* src/eval.c (internal_catch): Add a mechanism to (throw 'exit t) repeatedly
when the throw currently being processed doesn't terminate the current
minibuffer.

* src/lisp.h (this_minibuffer_depth): New extern declaration
(minibuf_level): extern declaration moved here from window.h.

* src/minibuf.c (minibuffer_follows_frame, minibuf_stays_put)
(minibuf_moves_frame_when_opened): New and amended functions to query the
value of minibuffer-follows-selected-frame.
(choose_minibuf_frame): check (minibuf > 1) in place of (minibufer > 0) at a
particular place.  At another place, check that an alleged frame is so and is
live.  Before selecting a non-miniwindow on a different frame, ensure it
really is a different frame.
(move_minibuffer_onto_frame): Stack up all recursive minibuffers on the target
frame.  Check the minibuf_window isn't in the old frame before setting that
frame's miniwindow to an inactive minibuffer.
(Finnermost_minibuffer_p, Fabort_minibuffers): New primitives.
(this_minibuffer_depth): New function.
(read_minibuf): Record the calling frame in a variable, and switch back to it
after the recursive edit has terminated normally, using
select-frame-set-input-focus.  Stack up all the recursive minibuffers on the
miniwindow where a new minibuffer is being opened.  After the recursive edit,
switch the selected window away from the expired minibuffer's window.
(nth_minibuffer): New function.
(minibuffer-follows-selected-frame): Change from a DEFVAR_BOOL to a
DEFVAR_LISP.

* src/window.c (decode_next_window_args): Set *minibuf to w's mini-window's
content when that content is a minibuffer.

* src/window.h (minibuf_level) Declaration moved from here to lisp.h.
2021-01-10 20:32:40 +00:00
Martin Rudalics
55bc1560ac Fix assertion failure in window_box_height (Bug#45737)
* lisp/window.el (window-sizable): Don't try to grow a mini window
when the root window's minimum height is already larger than its
actual height (Bug#45737).
2021-01-10 11:20:56 +01:00
Lars Ingebrigtsen
3dc3874c76 Further display-buffer doc changes
* lisp/window.el (display-buffer): `display-buffer-alist' is
apparently the variable the user should be directed towards.
2021-01-07 16:47:30 +01:00
Lars Ingebrigtsen
40a0f8a3a2 Add a display-buffer window selection function that's more like XEmacs
* doc/lispref/windows.texi (Buffer Display Action Functions):
Document it.
* lisp/window.el (display-buffer--action-function-custom-type): Add.
(display-buffer): Mention it.
(display-buffer-use-least-recent-window): New function (bug#45688).

* src/window.c (Fwindow_bump_use_time): New function.
2021-01-07 16:35:48 +01:00
Lars Ingebrigtsen
0e6b74d204 Fix typo in last display-buffer doc string change
* lisp/window.el (display-buffer): Fix typo in last doc string change.
2021-01-07 16:00:58 +01:00
Lars Ingebrigtsen
fa1f41159f Edit the display-buffer doc string slightly
* lisp/window.el (display-buffer): Reword the start of the doc
string (bug#45688).
2021-01-07 15:45:05 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Stefan Kangas
c50c0a19e3 Prefer setq-local in most files
* lisp/apropos.el (apropos-print):
* lisp/buff-menu.el (Buffer-menu-mode):
* lisp/calc/calc.el (calc-trail-buffer):
* lisp/chistory.el (command-history-mode):
* lisp/dabbrev.el:
* lisp/dframe.el (dframe-frame-mode):
* lisp/doc-view.el (doc-view-presentation-mode):
* lisp/ebuff-menu.el (electric-buffer-menu-mode)
(electric-buffer-update-highlight):
* lisp/edmacro.el (edit-kbd-macro):
* lisp/face-remap.el (buffer-face-set, buffer-face-toggle):
* lisp/files.el:
(find-file-noselect-1, hack-local-variables-confirm)
(set-visited-file-name, revert-buffer--default):
* lisp/filesets.el (filesets-spawn-external-viewer):
* lisp/find-dired.el (find-dired):
* lisp/find-lisp.el (find-lisp-find-dired-internal):
* lisp/finder.el (finder-mode):
* lisp/font-core.el (font-lock-default-function):
* lisp/format.el (format-annotate-function):
* lisp/help-fns.el (describe-variable):
* lisp/help-mode.el (help-mode):
* lisp/icomplete.el (icomplete-minibuffer-setup)
(icomplete--in-region-setup):
* lisp/ido.el (ido-completion-help, ido-tidy):
* lisp/international/robin.el (robin-activate):
* lisp/leim/quail/hangul.el (hangul-input-method-activate):
* lisp/leim/quail/uni-input.el (ucs-input-activate):
* lisp/man.el (Man-mode):
* lisp/master.el (master-set-slave):
* lisp/minibuffer.el (minibuffer-completion-help)
(read-file-name-default):
* lisp/outline.el (outline-minor-mode):
* lisp/pcomplete.el (pcomplete-comint-setup):
* lisp/proced.el (proced-mode):
* lisp/recentf.el (recentf-edit-list, recentf-open-files-items):
* lisp/replace.el (occur-1):
* lisp/reveal.el (reveal-mode):
* lisp/ruler-mode.el (ruler--save-header-line-format):
* lisp/scroll-lock.el (scroll-lock-mode):
* lisp/startup.el (normal-top-level, normal-splash-screen):
* lisp/strokes.el (strokes-list-strokes):
* lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list):
* lisp/tree-widget.el (tree-widget-set-theme):
* lisp/window.el (read-buffer-to-switch):
* lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer
setq-local.
2020-12-09 11:58:38 +01:00
Zajcev Evgeny
8a27b0cad7 Fix use of 'switch-to-buffer-preserve-window-point'
* lisp/window.el (switch-to-buffer): Respect buffer local value
of 'switch-to-buffer-preserve-window-point' variable.
2020-12-01 09:33:05 +01:00
Juri Linkov
6355fa5183 Fix MINIBUF 'nomini' arg for windmove/window-in-direction (bug#44932)
* lisp/windmove.el (windmove-display-in-direction)
(windmove-delete-in-direction, windmove-swap-states-in-direction):
Add 'nomini' as MINIBUF arg of window-in-direction.

* lisp/window.el (window-in-direction): Rename arg MINI to MINIBUF.
Update docstring from walk-window-tree.
Send MINIBUF arg to walk-window-tree unchanged.
2020-11-29 21:48:01 +02:00
Glenn Morris
33e8116fc2 Merge from origin/emacs-27
f5d7fb3a2d (origin/emacs-27) Fix 'uudecode-decode-region-internal' in...
d4242177da Fix 'send-string-to-terminal' writing very long strings
9da0f4026c * lisp/subr.el (read-char-from-minibuffer): Doc fix.  (Bug...
9899f74e4e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
a6fcba783e Fix documentation of 'windmove-swap-states-default-keybind...
f4acd7a924 Split windows evenly when 'min-margins' parameter was set ...
2020-11-07 09:57:56 -08:00
Martin Rudalics
f4acd7a924 Split windows evenly when 'min-margins' parameter was set (Bug#44483)
* lisp/window.el (split-window): Make new window inherit any
'min-margins' parameter from WINDOW so that horizontal splits
reliably produce windows of same width (Bug#44483).
2020-11-07 09:20:14 +01:00
Glenn Morris
0dfb896be2 Merge from origin/emacs-27
e0de9f3295 (origin/emacs-27) Don't skip empty lines when fitting mini...
a4ec03fa9b ; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246)
20c02e628c Improve documentation of display-fill-column-indicator
e2005f1f2a * INSTALL: Mention efaq.texi for installation of intlfonts.
71661b2872 Use WebKit sandboxing

# Conflicts:
#	etc/NEWS
2020-10-27 08:24:56 -07:00
Clemens Radermacher
e0de9f3295 Don't skip empty lines when fitting mini frame to buffer (Bug#44080)
* lisp/window.el (fit-mini-frame-to-buffer,
window--resize-mini-frame, fit-frame-to-buffer,
fit-frame-to-buffer-1): By default, fit a mini frame without skipping its
buffer's leading or trailing empty lines.
* src/frame.c (resize-mini-frames): Update doc-string.
* lisp/cus-start.el (resize-mini-frames): Update for customize.
* doc/lispref/minibuf.texi (resize-mini-frames): Update description.
2020-10-27 09:45:25 +01:00
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00