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

719 Commits

Author SHA1 Message Date
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
Trevor Murphy
40b81f847f Fix check for derived modes in display-buffer-reuse-mode-window
* lisp/window.el (display-buffer-reuse-mode-window): Make the
check for derived modes actually work (bug#38677).
2020-10-02 00:30:19 +02:00
Lars Ingebrigtsen
018278a8d0 Fix recent change to window-max-chars-per-line
* lisp/window.el (window-max-chars-per-line):
line-number-display-width can return a floating point number, but
we want an integer (bug#43548).
2020-09-21 17:24:02 +02:00
Lars Ingebrigtsen
e8d80f1e14 Fix line width in M-x term on -nw with line numbers
* lisp/window.el (window-max-chars-per-line): Make the line width
more correct in the presence of display-line-numbers-mode (bug#34513).
2020-09-21 16:10:13 +02:00
Stefan Kangas
77aeddc149 * lisp/window.el: Add provide statement
* lisp/window.el (window): Put a `provide' form to help with the
popular `use-package' external package (bug#37053).
2020-09-15 17:15:59 +02:00
Jen-Chieh Shen
a9603c77f8 Add optional ALL-FRAMES arfument to count-windows
* lisp/window.el (count-windows): Allow counting the windows on
all frames (bug#42872).
2020-08-18 15:25:27 +02:00
Lars Ingebrigtsen
b14c1b5473 Remove some compat code from window.el
* lisp/window.el (window-fixed-size-p): Remove check for
window-size-fixed, which is always defined.
2020-08-18 11:32:06 +02:00
Juri Linkov
8d05f21946 * lisp/window.el (display-buffer-override-next-command): Add ECHO arg.
* lisp/frame.el (other-frame-prefix):
* lisp/tab-bar.el (other-tab-prefix):
* lisp/windmove.el (windmove-display-in-direction):
* lisp/window.el (other-window-prefix, same-window-prefix):
Use new ECHO arg of display-buffer-override-next-command.

https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00819.html
2020-07-19 02:43:18 +03:00
Juri Linkov
e98ddd6fc1 Bind 'C-x 4 1' to 'same-window-prefix' and document new commands (bug#41691)
* lisp/window.el (ctl-x-4-map): Bind 'C-x 4 1' to 'same-window-prefix'.

* doc/emacs/windows.texi (Pop Up Window): Add 'C-x 4 4' and 'C-x 4 1'.
* doc/emacs/frames.texi (Creating Frames): Add 'C-x 5 5'.
(Tab Bars): Add 'C-x t t'.
2020-07-01 00:30:18 +03:00
Juri Linkov
7d6b860245 Push action to list of functions in display-buffer-override-next-command
* lisp/window.el (display-buffer-override-next-command):
Push action to 'car' of 'display-buffer-overriding-action'
and in exitfun remove action from 'car'.
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00803.html
2020-06-25 03:48:32 +03:00
Juri Linkov
ce4ec17930 Fix display-buffer-override-next-command to call action only once (bug#39722)
* lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Don't use save-window-excursion.

* lisp/window.el (display-buffer-override-next-command): Reset
display-buffer-overriding-action after the first buffer display action.

* lisp/tab-bar.el (switch-to-buffer-other-tab): Don't reuse frame tabs.
(other-tab-prefix): Don't reuse frame tabs.
2020-06-22 02:36:16 +03:00
Juri Linkov
ba8370bc38 New commands other-window-prefix (C-x 4 4) and other-frame-prefix (C-x 5 5)
* lisp/window.el (other-window-prefix, same-window-prefix): New commands.
(ctl-x-4-map): Bind 'C-x 4 4' to 'other-window-prefix'.  (Bug#41691)

* lisp/frame.el (other-frame-prefix): New command.
(ctl-x-5-map): Bind 'C-x 5 5' to 'other-frame-prefix'.
2020-06-22 02:17:02 +03:00
Juri Linkov
788cd6d8b9 The key prefix 'C-x t t' displays next command buffer in a new tab (bug#41691)
* lisp/tab-bar.el (other-tab-prefix): New command.
(tab-prefix-map): Bind key 'C-x t t' to other-tab-prefix.

* lisp/windmove.el (windmove-display-in-direction):
Use display-buffer-override-next-command.

* lisp/window.el (display-buffer-override-next-command):
New function refactored from windmove-display-in-direction.
2020-06-07 02:42:24 +03:00
Eli Zaretskii
0ea1463e67 Fix 'count-screen-lines' when lines are truncated
* lisp/window.el (count-screen-lines): Fix the return value when
lines are truncated in the window, and the end of the region is
invisible due to this truncation.  (Bug#40849)
2020-05-02 11:45:05 +03:00
Juri Linkov
bb729496f9 * lisp/window.el (display-buffer): Extend doc with body-function (bug#39822) 2020-04-03 00:50:19 +03:00
Juri Linkov
3273e2ace7 Deprecate with-displayed-buffer-window, use body-function instead (bug#39822)
* doc/lispref/display.texi (Temporary Displays):
Remove defmac with-displayed-buffer-window.

* doc/lispref/windows.texi (Buffer Display Action Alists):
Add body-function.

* lisp/window.el (with-displayed-buffer-window): Declare macro obsolete.
(window--display-buffer): Call 'body-function' after displaying the buffer.

* lisp/dired.el (dired-mark-pop-up):
* lisp/files.el (save-buffers-kill-emacs):
* lisp/minibuffer.el (minibuffer-completion-help):
Replace with-displayed-buffer-window with with-current-buffer-window
and add action alist entry 'body-function' with former macro body.
2020-03-30 01:57:36 +03:00
Yuan Fu
9dccaf8a5c Add store/restore window configuration feature for gdb-mi
Add a feature that allows a user to save a gdb window
configuration (window layout) to a file with
'gdb-save-window-configuration' and load it back with
'gdb-load-window-configuration'.  Set a default window configuration
by setting 'gdb-default-window-configuration-file'.
Add an option to make gdb preserve the window configuration
that the user had before starting gdb.  In window.el, add
'with-window-non-dedicated'.

* lisp/progmodes/gdb-mi.el (top/level): Require 'pcase' and 'cl-seq'.
(gdb--window-configuration-before): New variable.
(gdb-restore-window-configuration-after-quit): New option.
(gdb-window-configuration-directory,
gdb-default-window-configuration-file): New variables.
(gdb): Save configuration on startup.
(gud-menu-map): Add "Load Layout" and "Save Layout" to menu.  Add
"Restore Layout After Quit" button to menu.  Rename "Restore Window
Layout" to "Restore Default Layout", add some help echo, and move it
from "GDB-MI" menu to "GDB-WINDOWs" menu.
(gdb-toggle-restore-window-configuration): New function.
(gdb-get-source-buffer): New function, extracted out of
'gdb-restore-window'.
(gdb-setup-windows): Add a condition branch that loads default window
configuration when available.  Fix docstring.
(gdb-buffer-p, gdb-function-buffer-p, gdb--buffer-type,
gdb-save-window-configuration, gdb-load-window-configuration): New
functions.
(gdb-restore-windows): Edit docstring to mention
'gdb-default-window-configuration-file'.
(gdb-reset): Restore window configuration after quit.
* lisp/window.el (with-window-non-dedicated): New macro.
2020-03-15 16:47:43 +01:00
Stefan Monnier
9900b145f9 * lisp/window.el: Avoid called-interactively-p.
(other-window, delete-other-windows, next-buffer, previous-buffer):
Use an `interactive` arg instead.
2020-03-10 12:12:06 -04:00
Glenn Morris
3274b8090b Merge from origin/emacs-27
72f87f8873 (origin/emacs-27) NS port documentation updates
5b19db98ad ; * etc/NEWS: correctly describe what fido-mode is
fc47e3ad99 Let fido-mode users force a minibuffer-exit
e734961d4c icomplete-fido-exit: New command for the M-j binding
335a9bd215 minibuffer-force-complete-and-exit: Allow input with no ma...
34132d4bf6 ; * etc/NEWS: Mark 2 entries as fully documented.
d28b73841b ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender...
d1d56a9fd9 ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum...
fc4f4efabf ; * etc/NEWS: No need to document vc-hg and mergebase chan...
9e8456cf0f ; * etc/NEWS: No need to document changes in Octave mode.
25b4d6fa28 ; * etc/NEWS: No need to document changes in map.el and se...
fc4d0f86da ; * etc/NEWS: No need to document Ido news.
d4ac478cb3 ; * etc/NEWS: No need to document news of doc-view.el.
08c042bd26 Document that 'byte-compile-dynamic' is obsolete
512b66abd7 ; * etc/NEWS: No need to document 'goto-address-uri-scheme...
3103c01c3e ; * etc/NEWS: Formatting fixes.
98306fdfb8 ; * etc/NEWS: No need to document deprecation of 'cl'.
6281ed58be ; * etc/NEWS: No need to document the change in 'list-proc...
e252341e11 ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'...
ec5a267ddc ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo...
89307ebccd ; * etc/NEWS: Mark 'completion-common-part' face entry as ...
fdbe7cacfb Document the changes in 'read-answer'
10c58356e4 Document changes in lexical-binding
5cb312b5b9 Update ERC mailing list address
cb1877321b Use regexp-opt to define bibtex-autokey-transcriptions.  (...
3f9c340de0 Improve documentation of 'table-generate-source'
33b31dc314 Attempt to avoid rare segfaults in show_mouse_face
88c6db9196 Avoid crashes when a fontset has strange entries
1814c7e158 Fix rx error with ? and ??
40fb20061e * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err...
08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-t...
cb1e30910e Have pulse.el preserve existing overlay priorities

# Conflicts:
#	etc/NEWS
2020-03-07 07:50:28 -08:00
Juri Linkov
32261ed15b New command make-frame-on-current-monitor to use in windmove (bug#39875)
* lisp/frame.el (make-frame-on-current-monitor): New command.

* lisp/windmove.el (windmove-display-in-direction):
Use make-frame-on-current-monitor for 'new-frame'.
(windmove-display-new-frame): New command.
(windmove-display-default-keybindings): Bind
windmove-display-new-frame to 'f' key.

* lisp/window.el (display-buffer-in-direction): Fix quotes in docstring.
2020-03-06 02:19:00 +02:00
Justin Burkett
08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-to-buffer'
* lisp/window.el (fit-window-to-buffer): Fix arguments in
'window-text-pixel-size' call.

Copyright-paperwork-exempt: yes
2020-03-05 09:10:03 +01:00
Glenn Morris
6a0e1c4104 Merge from origin/emacs-27
a4e4510ccd Fix handling MS-Windows keyboard input above the BMP
a38bebb0c1 * etc/NEWS: More complete description of rx 'not' changes.
d373647e8f ; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change.
1ca6d15656 * doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now ...
fe1a447d52 Don't attempt to cache glyph metrics for FONT_INVALID_CODE
b42b894d1d Fix fit-frame-to-buffer for multi-monitor setup
366fd4fd07 (emacs-27) ; * etc/NEWS: Fix typo.
49d3cd90bd rx: Improve 'or' compositionality (bug#37659)
6b48aedb6b * lisp/tab-line.el: Fix auto-hscrolling (bug#39649)
c5f255d681 (tag: emacs-27.0.90) ; Update lisp/ldefs-boot.el
60c84ad992 ; * etc/TODO: Fix last change.
5af9e5baad ; Add an entry to TODO
d424195905 Fix rx charset generation
9908b5a614 Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
6dc2ebe00e Fix overquoting in mule.el
5cca73dd82 * src/timefns.c (time_arith): Omit incorrect comment.
d767c357ca Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
4dec693f70 * lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string
ff729e3f97 ; bug#39779: Fix some typos in documentation.
696ee02c3a checkdoc: Don't mistake "cf." for sentence end

# Conflicts:
#	etc/NEWS
2020-03-04 13:57:58 -08:00
Sergey Trofimov
b42b894d1d Fix fit-frame-to-buffer for multi-monitor setup
* lisp/window.el (fit-frame-to-buffer): Call
'frame-monitor-attributes' instead of
'display-monitor-attributes-list'.  Fix geometry calculations for
multiple monitors.

Copyright-paperwork-exempt: yes
2020-03-01 19:49:18 +01:00
Juri Linkov
ac9acc1864 Use quit-restore-window to close tab (bug#39446)
* lisp/tab-bar.el (display-buffer-in-new-tab): New function with code
from display-buffer-in-tab.
(display-buffer-in-tab): Call display-buffer-in-new-tab.
(switch-to-buffer-other-tab): Instead of 'display-buffer-same-window'
use '(reusable-frames . t)'.

* lisp/windmove.el (windmove-display-in-direction): Set arg 'type'
to 'tab' for window--display-buffer when creating a new tab.

* lisp/window.el (quit-restore-window): Call tab-bar-close-tab
when quit-restore type is 'tab'.
(display-buffer-record-window): Set window-parameter 'quit-restore'
to 'tab' for type 'tab'.
(window--display-buffer): Set window-prev-buffers to nil for tab too.
2020-02-10 02:49:36 +02:00
Martin Rudalics
448df8fec7 Improve doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)
* lisp/window.el (quit-restore-window, quit-window): Make
doc-strings more consistent; add references to corresponding
section of the Elisp manual (Bug#38819).
2020-01-05 09:59:01 +01:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Juri Linkov
9a911b4af5 New functions window-state-buffers and tab-bar-get-buffer-tab (bug#38354)
* lisp/window.el (window-state-buffers): New function.
* lisp/tab-bar.el (tab-bar-get-buffer-tab): New function.

* lisp/emacs-lisp/seq.el (seq-some): Add autoload cookie.

* lisp/desktop.el (desktop-buffers-not-to-save-function): New variable.
(desktop-save-buffer-p): Use it.
2019-12-03 01:40:12 +02:00
Juanma Barranquero
75b41a38dd Fix previous change to (next|previous)-buffer
* lisp/window.el (next-buffer, previous-buffer): If no other
buffer is available, signal 'user-error' only when called
interactively.
2019-11-26 22:35:04 +01:00
Juanma Barranquero
e495dbea70 (next|previous)-buffer no longer fail silently (bug#38384)
* lisp/window.el (next-buffer, previous-buffer):
Signal 'user-error' if there is no buffer to switch to.

* etc/NEWS: Document it.
2019-11-26 15:03:57 +01:00
Martin Rudalics
261b060f12 2019-11-26 Martin Rudalics <rudalics@gmx.at>
* lisp/window.el (switch-to-visible-buffer): Declare obsolete.
(switch-to-prev-buffer-skip): New option.
(switch-to-prev-buffer, switch-to-next-buffer): Obey
'switch-to-prev-buffer-skip'.
* doc/lispref/windows.texi (Window History): Remove
description of 'switch-to-visible-buffer'.  Describe new
option 'switch-to-prev-buffer-skip'
* etc/NEWS: Mention switch from 'switch-to-visible-buffer' to
'switch-to-prev-buffer-skip'.
2019-11-26 10:13:12 +01:00
Paul Eggert
f8284f1e40 Fix some quoting glitches in doc strings
This also fixes a misplaced "only".
2019-11-08 17:11:01 -08:00
Martin Rudalics
34923412b5 In 'bury-buffer' don't try to remove current buffer from minibuffer window
* lisp/window.el (bury-buffer): Don't try to remove current buffer
from minibuffer window.
2019-10-17 19:35:29 +02:00