1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

848 Commits

Author SHA1 Message Date
Martin Rudalics
899ea79310 In window-related documentation write 'symbol' instead of 'constant'
Suggested by Michael Heerdegen <michael_heerdegen@web.de>.

* src/window.c (window_restore_killed_buffer_windows): In
doc-string write 'symbol' instead of 'constant'.
* lisp/window.el (display-buffer--lru-window)
(display-buffer-use-least-recent-window): In doc-strings write
'symbol' instead of 'constant'.
* doc/lispref/windows.texi (Window Configurations): Write
'symbol' instead of 'constant'.
2024-03-16 10:10:29 +01:00
Martin Rudalics
5bba1b95b8 Further adjustments for restoring killed buffer windows (Bug#68235)
* etc/NEWS: Announce 'window-restore-killed-buffer-windows'.
* src/buffer.h (struct buffer) : New field last_name_.
* src/buffer.c (Fbuffer_last_name): New function to return last
name of buffer before it was killed or renamed.
(bset_last_name, Fget_buffer_create, Fmake_indirect_buffer)
(Frename_buffer, Fkill_buffer, init_buffer_once): Set buffer's
last_name_ field accordingly.
* src/window.c (window_restore_killed_buffer_windows): New
variable replacing Vwindow_kept_windows_functions.
(Fset_window_configuration): Use
window_restore_killed_buffer_windows instead of
Vwindow_kept_windows_functions.
* lisp/window.el (window--state-put-2, window-state-put): Use
'window-restore-killed-buffer-windows' instead of
'window-kept-windows-functions'.
* doc/lispref/windows.texi (Window Configurations): Describe
'window-restore-killed-buffer-windows' which replaces
'window-kept-windows-functions'.
2024-03-15 10:35:27 +01:00
Martin Rudalics
912e37b811 Fix 'set-window-configuration' and 'window-state-put'
Fix some bugs with 'window-state-put' (Bug#69093).  Add new
hook 'window-kept-windows-functions' (Bug#68235).

* doc/lispref/windows.texi (Window Configurations): Mention
'window-kept-windows-functions'.
(Window Hooks): Describe new abnormal hook
'window-kept-windows-functions'.
* src/marker.c (Fmarker_last_position): New function to return
the last position of a marker even if its buffer is now dead.
* src/window.c (Fset_window_configuration): If
'window-kept-windows-functions' is non-nil, do not delete any
window whose buffer is now dead but remember all such windows in
a list to pass to 'window-kept-windows-functions'.  Run
'window-kept-windows-functions' if it is non-nil.
(Vwindow_kept_windows_functions): New abnormal hook run by
Fset_window_configuration and 'window-state-put' with two
arguments - the frame whose configuration is restored and a list
of entries for each window whose buffer was found dead during
restoration.  Each entry is a list of four elements, the window,
the dead buffer, and the last know positions of the start and
point of that window.
* lisp/window.el (window-state-put-kept-windows)
(window-state-put-selected-window): New variables.
(window--state-put-2): Make sure buffer is live before restoring
its state.  Set 'window-state-put-selected-window' to state's
selected window.  If 'window-kept-windows-functions' is non-nil,
do not delete any windows whose buffer is found dead but
remember all such windows in a list to pass to
'window-kept-windows-functions'.
(window-state-put): Run 'window-kept-windows-functions' if it is
non-nil.  Select window recorded in
'window-state-put-selected-window'.
2024-03-04 10:33:49 +01:00
Eli Zaretskii
1b31a784bf Merge from origin/emacs-29
5bb5590dec Fix blunder in labeled_narrow_to_region
78ddb32fad Fix documentation of icon-elements
725a3f32f8 ; Fix typos in symbol names
6653ee66ca Improve two docstrings in ox-latex
7d869a0402 Doc fix in auth-source-read-char-choice
f149de223b Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
1f97a87879 Fix info-xref-tests
51f391998b Add @kindex in manuals for existing keybindings on 'C-x x...
2024-01-20 06:25:59 -05:00
Juri Linkov
6f75d0f36d New display action alist entry 'post-command-select-window' (bug#67993)
* doc/lispref/windows.texi (Buffer Display Action Alists):
Add 'post-command-select-window'.

* lisp/window.el (display-buffer): Add 'post-command-select-window'
to the docstring and handle at the end of function.
2024-01-16 18:54:04 +02:00
Stefan Kangas
725a3f32f8 ; Fix typos in symbol names 2024-01-14 15:16:54 +01:00
Juri Linkov
76904626b3 * lisp/window.el (window-prefix-map): Bind C-x w q to quit-window (bug#13167) 2024-01-13 20:16:42 +02:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Eli Zaretskii
3b7198dc47 Merge from origin/emacs-29
5303152872 Revert "Fix treesit-node-field-name and friends (bug#66674)"
fa0bb88302 ; * src/buffer.c (syms_of_buffer) <default-directory>: Do...
44517037ae ; Fix typo
ccf46acefd ; Fix last change.
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compil...
9afba605bb Explain status "r" in `epa-list-keys`
6271422196 ; * lisp/dired.el (dired--make-directory-clickable): Refo...
fcbb004489 Fix mouse clicks on directory line in Dired
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
eb19984c4d Mark icalendar.el as maintained by emacs-devel
03dc914fd3 ; Fix footnotes in ELisp Intro manual
ceacf75395 Fix usage of `setq-default' and offer more suggestions
2701da0eee Fix python-ts-mode triple quote syntax (bug#67262)
683c7c9687 Increment parser timestamp when narrowing changes (bug#67...
8ae42c825e ruby-ts-mode: Fix indentation for string_array closer
9cfa498e0a treesit-major-mode-setup: Use 'treesit--syntax-propertize...
da2e440462 ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
6ea507296a Correctly refontify changed region in tree-sitter modes (...
2023-12-30 04:51:17 -05:00
Eli Zaretskii
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)
2023-12-25 14:59:26 +02:00
Stefan Monnier
3eb421bda3 (display-buffer): New pop-up-frames action alist entry
Allow overriding the `pop-up-frames` variable from `display-buffer-alist`
so as to provide a worthy replacement for the old `same-frame`
parameter of `special-display-*` (bug#67249).

* lisp/window.el (special-display-popup-frame): Declare obsolete;
that was apparently forgotten back when `special-display-*` variables
were declared obsolete.
Use the new `pop-up-frames` action alist entry instead of the variable.
(display-buffer): Document new alist entry.
(window--pop-up-frames): New function.
(display-buffer--maybe-pop-up-frame, display-buffer-in-previous-window)
(display-buffer-reuse-window, display-buffer-reuse-mode-window): Use it.

* doc/lispref/windows.texi (Choosing Window Options): Mention that
`pop-up-frames` is also an action alist entry.
(Buffer Display Action Alists): Add `pop-up-frames` entry.
2023-12-16 13:13:15 -05:00
Eli Zaretskii
14b62b1ae0 Merge from origin/emacs-29
cd477bf07d Fix behavior of 'split-root-window-*' with 'C-u'
2e5d47f578 ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):...
c46700deb0 Add more text to clarify the behavior of 'with-current-bu...
687c416ce9 Fix example in Emacs user manual
835902179c ; Fix recent change in 'c-ts-mode'
169a5ff752 ; Fix typo in Gnus manual (bug#67469).
30841c71a5 Mention Titankey in Tramp, which has passed the tests
dab7cc241f Fix c-ts-mode indentation after if/else (bug#67417)
f8d9dc26c7 Fix indentation for else clause in c-ts-mode (bug#67417)
bf0b0c9c73 Ensure that directory is expanded in package-vc-checkout
e551dd72f7 * etc/PROBLEMS: Add entry about pinentry with gpgsm.  (Bu...
2023-12-02 10:05:50 -05:00
Eli Zaretskii
cd477bf07d Fix behavior of 'split-root-window-*' with 'C-u'
* lisp/window.el (split-root-window-below)
(split-root-window-right): Fix the 'interactive' form to work with
raw 'C-u' as well.  (Bug#67459)
(split-window-below, split-window-right, split-root-window-below)
(split-root-window-right): Doc fix.
2023-11-29 16:14:03 +02:00
Stefan Monnier
7705bdfa5b Adjust affected callers of derived-mode-p` to use the new convention
* lisp/align.el (align-rules-list): Prefer `derived-mode-p` over
`provided-mode-derived-p`.
(align--rule-should-run):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/whitespace.el (whitespace-enable-predicate):
* lisp/transient.el (transient--do-suffix-p):
* lisp/so-long.el (so-long--set-auto-mode):
* lisp/simple.el (command-completion-with-modes-p):
* lisp/progmodes/tcl.el (tcl-current-word):
* lisp/progmodes/idlwave.el (idlwave-fix-keywords):
* lisp/progmodes/gdb-mi.el (gdb, gdb-locals-mode-map)
(gdb-registers-mode-map, gdb-function-buffer-p):
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter)
(c-ts-mode-set-style):
* lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article):
* lisp/help-fns.el (help-fns--list-local-commands):
* lisp/emulation/viper.el (viper-mode)
(viper-this-major-mode-requires-vi-state):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--globalized-predicate-p):
* lisp/dired.el (dired-hide-details-mode, dired-click-to-select-mode):
* lisp/calendar/todo-mode.el (todo-reset-nondiary-marker)
(todo-reset-done-string, todo-reset-comment-string):
* lisp/vc/vc.el (vc-deduce-backend): Use new calling convention for
`derived-mode-p` and `provided-mode-derived-p`.
2023-11-23 11:59:49 -05:00
Spencer Baugh
1d60139a80 Add toggle-window-dedicated command and mode-line-window-dedicated
It's sometimes useful to interactively make certain windows dedicated.
This allows a level of interactive control over which window
display-buffer uses.

Additionally, when a window is dedicated (even without this new
command) it can affect display-buffer behavior in ways which may be
unexpected for users.  Let's display the window dedicated status in
the mode-line to help indicate what's going on.

* doc/emacs/windows.texi (Displaying Buffers): Add information about
dedicated windows and toggle-window-dedicated.
* doc/emacs/screen.texi (Mode Line): Add information about the window
dedicated indicator.
* etc/NEWS: Announce mode-line-window-dedicated and
toggle-window-dedicated.
* lisp/window.el (toggle-window-dedicated): Add.  (bug#64619)
(window-prefix-map): Add C-x w d binding.
* lisp/bindings.el (mode-line-window-control): Add.
(mode-line-window-dedicated): Add.
(standard-mode-line-format): Insert mode-line-window-dedicated.
2023-10-25 16:43:51 +03:00
Stefan Monnier
c94b6397bd (buffer-match-p): Replace &optional with &rest (bug#65797)
* lisp/subr.el (buffer-match-p--past-warnings): New var.
(buffer-match-p): Use it.  Replace `&optional arg` with `&rest args`.
(match-buffers): Replace `&optional arg` with `&rest args`.

* lisp/window.el (display-buffer-alist): Fix out of date docstring.

* doc/lispref/buffers.texi (Buffer List): Document new calling convention.
2023-10-20 20:42:04 -04:00
Stefan Kangas
1e270e580d ; Grammar fixes ("allow to" et al)
Ref:
https://lists.gnu.org/r/emacs-devel/2016-01/msg01598.html
https://lists.gnu.org/r/emacs-devel/2016-01/msg01465.html
2023-09-17 16:49:21 +02:00
Po Lu
c0400151f8 Correct many instances of ``allows to''
Refer to:
lists.gnu.org/archive/html/emacs-devel/2016-01/msg01598.html

* doc/emacs/frames.texi (Tab Bars):

* doc/emacs/maintaining.texi (Tag Syntax):

* doc/lispref/compile.texi (Native Compilation):

* doc/lispref/control.texi (Destructuring with pcase Patterns):

* doc/lispref/display.texi (Overlay Properties, Glyphless Chars):

* doc/lispref/frames.texi (Size Parameters, Layout Parameters)
(Child Frames):

* doc/lispref/minibuf.texi (Minibuffer Windows):

* doc/lispref/processes.texi (Asynchronous Processes):

* doc/lispref/windows.texi (Precedence of Action Functions)
(Mouse Window Auto-selection):

* doc/misc/autotype.texi (Autoinserting):

* doc/misc/efaq.texi (New in Emacs 28):

* doc/misc/idlwave.texi (Examining Variables):

* doc/misc/ses.texi (Quick Tutorial, Standard formula functions):

* doc/misc/tramp.texi (External methods, FUSE-based methods):

* lisp/comint.el (comint-insert-previous-argument-from-end):

* lisp/emacs-lisp/rmc.el (read-multiple-choice):

* lisp/gnus/gnus-util.el:

* lisp/mail/rmailsum.el (rmail-summary-progressively-narrow):

* lisp/mouse.el (mouse-drag-track):

* lisp/net/tramp-sudoedit.el:

* lisp/obsolete/landmark.el:

* lisp/org/org.el (org-startup-truncated, org-file-apps):

* lisp/pixel-scroll.el (pixel-scroll-precision-mode):

* lisp/progmodes/cperl-mode.el (cperl-praise):

* lisp/simple.el (yank-from-kill-ring, kill-visual-line):

* lisp/window.el (delete-window-choose-selected):

* src/ChangeLog.11:

* src/xdisp.c (syms_of_xdisp):

* src/xterm.c (handle_one_xevent): The construct ``allows to
<infinitive>'' is not English inasmuch as no direct object to
``allows'' is provided.  Correct and rephrase each instance of such a
construct within our documentation and commentary.
2023-09-10 09:33:50 +08:00
Stefan Kangas
967fa846fc Use ensure-list in many more places
* lisp/align.el (align-region):
* lisp/auth-source-pass.el (auth-source-pass--build-result-many):
* lisp/auth-source.el (auth-source-ensure-strings):
* lisp/calendar/appt.el (appt-disp-window):
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/cus-edit.el (custom-prompt-variable)
(custom-variable-menu-create):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eieio.el (object-add-to-list):
* lisp/emulation/cua-base.el (cua--M/H-key):
* lisp/epg.el (epg--list-keys-1):
* lisp/faces.el (read-face-name):
* lisp/format.el (format-decode):
* lisp/gnus/gnus-score.el (gnus-home-score-file)
(gnus-all-score-files):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-articles):
* lisp/gnus/message.el (message-make-forward-subject):
* lisp/gnus/nnmairix.el (nnmairix-create-search-group):
* lisp/gnus/spam.el (spam-copy-or-move-routine):
* lisp/help-fns.el (describe-face):
* lisp/ibuf-macs.el (define-ibuffer-filter):
* lisp/international/mule-cmds.el (select-safe-coding-system):
* lisp/net/imap.el (imap-send-command):
* lisp/printing.el (pr-menu-get-item):
* lisp/speedbar.el (speedbar-add-supported-extension)
(speedbar-add-ignored-directory-regexp):
* lisp/textmodes/rst.el (rst-forward-line-looking-at):
* lisp/vc/ediff-util.el (ediff-other-buffer):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/vc-dir.el (vc-dir-mark-state-files):
* lisp/wid-edit.el (widget-prompt-value):
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/woman.el (woman-expand-directory-path): Prefer ensure-list.
2023-08-27 21:45:30 +02:00
Po Lu
48eb022deb Avoid errors in posn-col-row if fonts disappear from an X server
* lisp/window.el (window-font-width, window-font-height): Resort
to frame-char-width/height should the font returned by font-info
be unavailable.
2023-08-22 12:35:33 +08:00
Robert Pluim
488dc24d2a Prevent tex-shell buffer from reusing same window
* lisp/window.el (display-tex-shell-buffer-action): Add
'inhibit-same-window' to the default action.
2023-07-13 15:37:16 +02:00
Martin Rudalics
aad13e61db Fix 'toggle-side-windows' with 3 or more side windows
* lisp/window.el (window--state-put-1): Consider
'window-combined-p' when determining 'window-combination-limit'.
(window-state-put): Bind 'window-combination-limit' and
'window-combination-resize' to nil.  (Bug#64405)
2023-07-08 12:03:55 +03:00
Eli Zaretskii
d1ddd1d5d9 Merge from origin/emacs-29
84d2da003e ; Fix example in the Flymake manual
0a1459f1d9 * doc/misc/calc.texi (Advanced Math Functions): Correct c...
92faf1f564 Consider 'dired-kill-when-opening-new-dired-buffer' in mo...
bafe71a69f ; Fix use-package.texi markup
018e4ca6c5 ; * doc/misc/calc.texi (Advanced Math Functions): Fix las...
1952dbd4c5 Fix Gamma function definition in calc.texi
f73f82d7e8 Fix subscripts in the Calc manual
70fc7c41ef Improve documentation of 'declare' forms
c835758238 ; * src/lread.c (bytecode_from_rev_list): Avoid C++ comment.
2847857496 Improve tree-sitter docs
0e9307eb2b Fix some Texinfo markup in manuals
8dc08333ee Fix bol/bos anchors in tree-sitter :match regexps
8225ade615 ; * src/xdisp.c (syms_of_xdisp) <display-line-numbers>: F...
1f0527a312 ; Fix last change in tex-mode.el
4da479920e * lisp/subr.el (with-restriction): Tweak indent rule
36aa9bd818 ; Fix previous change
aaeaf608d8 Fix setting region in the minibuffer
1383efe01d Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has sta...
bdb0bc2b4e Fix tex-mode display-buffer issues
90047c38ce Add test for when 'completion-auto-help' is 'visible'
2c623e4feb Avoid errors in 'apropos-documentation' after 'eval-buffer'
dd3b98121c ; * doc/emacs/indent.texi (Indentation Commands): Fix las...
904edf1f07 Mention indent-rigidly in the Emacs manual
2023-06-17 05:02:55 -04:00
Robert Pluim
36aa9bd818 ; Fix previous change
* lisp/window.el (display-tex-shell-buffer-action): Fix default
value's type.  (Bug#63956)
2023-06-12 19:08:31 +02:00
Eli Zaretskii
bdb0bc2b4e Fix tex-mode display-buffer issues
* lisp/window.el (display-tex-shell-buffer-action): New defcustom.
* lisp/textmodes/tex-mode.el (tex-display-shell)
(tex-cmd-doc-view, tex-recenter-output-buffer): Use it.
(Bug#63956)
2023-06-11 09:15:01 +03:00
Eli Zaretskii
eacee3e536 Merge from origin/emacs-29
6f6071c526 Avoid duplicate load-path entry when generating package a...
117b29c6f6 ; Improve documentation of Isearch command properties
a347b26cba Disable loading SQLite3 extensions when SQLite3 version i...
fe22bf503f ; * lisp/progmodes/project.el (project-switch-use-entire-...
64dbbde3b7 Fix visiting HTML files encoded in iso-2022 variants
5c95239aca ; Fix markup of some treesit vars in Elisp manual.
6ad041939b Support 'isearch-allow-scroll' in 'pixel-scroll-precision...
ecccdc07a0 shr: allow moving between adjacent anchors
504ef25ef3 ; * etc/NEWS: Fix typos.
d6fb868cdd Fix multihop file name expansion in Tramp
dd3e4e14fd Remove obsolete information from Gnus manual
2a5c946f87 Preserve mark in comint-history-isearch
6b60c8142e Fix systemd unit completion for old versions of systemd
8c56557cd9 Fix Skeletons menu-bar menu in Python modes
58eb38cfb4 ; * etc/NEWS: missing definite article
cf40362869 ; * etc/NEWS: PGTK cannot switch to -new automatically (b...
ead3a2abbf Fix loading SQLite extensions
a6bddd1765 ; * etc/NEWS: Fix typos.
f49fe936ab * etc/NEWS: Note dotimes loop variable scoping change (bu...
cec9333dc5 Fix c-ts-mode--top-level-declarator
f571e8f1bb Improve c-ts-mode font-lock for function names (bug#63390)
42a28ffdc2 * lisp/tab-bar.el: Don't use 'minibuffer-selected-window'...
8e61d23f71 Split windows horizontally in places that use split to cr...
459d08c7fe Fix tree-sitter test (bug#63481)
3bc5efb87e ; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix d...

# Conflicts:
#	etc/NEWS
2023-05-26 07:03:07 -04:00
Juri Linkov
8e61d23f71 Split windows horizontally in places that use split to create a new window.
* lisp/tab-bar.el (tab-bar-new-tab-to):
* lisp/window.el (window-state-put):
To create a new window, split horizontally instead of vertically.
Use 'window-safe-min-width' for the SIZE arg of 'split-window'.
(bug#62592)
2023-05-19 21:04:50 +03:00
Stefan Kangas
f24aa0f46a Merge from origin/emacs-29
3965c65d5e ; * lisp/subr.el (read-char-choice): Fix last change.
c1eac5b658 Improve documentation of 'read-choice' and related symbols
a8c9283e17 Revert "Comp fix calls to redefined primtives with op-byt...
8b66d8abd0 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-sub...
4ec4f614c7 ; Fix incompatibility in 'display-buffer-assq-regexp'
ba3ade58f3 Skip ruby-ts-imenu-index test if needed
9133446db8 Fix Eglot Tramp tests on EMBA
5b351bc7fa * test/infra/Dockerfile.emba (emacs-gnustep): Instrument ...
2023-03-29 06:30:09 +02:00
Eli Zaretskii
4ec4f614c7 ; Fix incompatibility in 'display-buffer-assq-regexp'
* lisp/window.el (display-buffer-assq-regexp): Make it accept a
buffer's name again, as it did in Emacs 28.  This makes computing
the buffer's name inside the function unnecessary.
(display-buffer): Always pass the buffer's name to
'display-buffer-assq-regexp'.  (Bug#62417)
2023-03-28 14:08:29 +03:00
Stefan Monnier
eb166287f3 Merge from origin/emacs-29
edc460e3b6 Fix accidental backward-incompatible change (bug#62417)
cbef1422fe ruby-ts-mode: Fix/simplify Imenu index generation
a0d5fba74a (ruby-ts--align-chain): Use 'equal' to check for an exact...
2023-03-27 17:16:59 -04:00
João Távora
edc460e3b6 Fix accidental backward-incompatible change (bug#62417)
This code used to work, but with the change of 59ecf25fc8 it stopped
working:

   (defun foop (buffer-name _alist) (string-match "foop" buffer-name))
   (add-to-list 'display-buffer-alist '(foop . display-buffer-other-frame))

This change makes it work again, restoring compatibility.

* lisp/subr.el (buffer-match-p): Fix and adjust docstring.
* lisp/window.el (display-buffer-alist): Adjust docstring.
(display-buffer-assq-regexp): Make good on promise of display-buffer-alist.
2023-03-27 12:59:14 +01:00
Stefan Kangas
6fb8a4dff7 Merge from origin/emacs-29
836044f329 Fix c-ts-mode preproc directive indentation
64980a59b6 ; * lisp/files.el (hack-local-variables): Fix typo in the...
a7cd125d49 More robustly unspoof HOME in Eglot tests (bug#61637)
6c66dbd02c Turn on Eglot inlay hints by default
246f5b541c Update ts modes missed in 4c16fd3a51 to use column-0
0bfba49ca7 Robustify Eglot for "transient" projects
ea5fd375bb Fix documentation of 'normal-mode' in buffers that don't ...
4c16fd3a51 Change tree-sitter indent anchor 'point-min' to 'column-0'
f47b393015 Fix go-ts-mode multi-line string indentation (bug#61923)
e0bf2da3db ; More accurate doc strings for 'window-at' and 'window-a...
2023-03-05 06:30:15 +01:00
Eli Zaretskii
e0bf2da3db ; More accurate doc strings for 'window-at' and 'window-at-x-y'.
* lisp/window.el (window-at-x-y):
* src/window.c (Fwindow_at): Doc fix.  (Bug#61948)
2023-03-04 10:43:25 +02:00
Stefan Kangas
34f44ae07e Merge from origin/emacs-29
871cf33a45 ; * admin/make-tarball.txt: Minor copyedit.
4faebba2fe Fix invocation of File->Close from the menu bar
cd05fca5f7 ; Improve documentation of 'native-comp-enable-subr-tramp...
c61a30e160 Update thumbnail buffer's header more
4c49452cde (treesit-query-validate): Fix reusing the output buffer
d560dc5044 (rust-ts-mode--font-lock-settings): Highlight closure par...
c15bc91e1b * Fix `native-comp-enable-subr-trampolines' semantic
774051873d Fix documentation of 'just-one-space' and 'delete-horizon...
7337f07250 ; Remove NEWS entry about deleted variable.
fb5299ba09 ; Fix wording of last change.
9f508cef85 Fix 'display-buffer-use-least-recent-window'
5190ea6259 Fix point moving when calling python-shell-send-region
6c0d821017 (project-try-vc): Remove unused defvar/require
4f9862e435 ; Fix typo
a638c79bc5 Delete redundant question from Gnus FAQ
4a90d67eb6 Slightly improve hashcash documentation
6ea3c105ab Fix cursor motion when there's line-prefix and display st...
e985466556 Fix comment in treesit_record_change (bug#61369)
1e5cebc88b Spell out RPN abbreviation in Calc manual intro

# Conflicts:
#	etc/NEWS
#	lisp/window.el
2023-02-19 11:38:09 +01:00
martin rudalics
9f508cef85 Fix 'display-buffer-use-least-recent-window'
* src/window.c (Fwindow_use_time): Doc fix.
(Fwindow_bump_use_time): Bump use time of the seleceted window as
well.  Doc fix.

* lisp/window.el (display-buffer-avoid-small-windows): Remove.
All users changed.
(window--display-buffer): Bump window use time when requested.
(display-buffer--lru-window): New function.
(display-buffer-use-some-window): Use it.
(display-buffer-use-least-recent-window): Rewrite and enhance doc
string.

* doc/lispref/windows.texi (Selecting Windows)
(Buffer Display Action Functions, Buffer Display Action Alists)
(The Zen of Buffer Display): Improve and update documentation of
window selection and display facilities.
2023-02-18 19:24:59 +02:00
Mattias Engdegård
d5bf26f488 Move side-effect-free and pure declarations to function definitions
Some Lisp functions still had their `side-effect-free` and `pure`
properties declared in byte-opt.el; do it at their definition instead.
The lists in byte-opt.el now only contain functions implemented in C
and function aliases.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns)
(side-effect-and-error-free-fns, pure-fns):
Remove functions whose properties are now declared elsewhere
and some obsolete entries.
* lisp/custom.el (custom-variable-p):
* lisp/emacs-lisp/lisp.el (buffer-end):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
* lisp/env.el (getenv):
* lisp/simple.el (count-lines, mark, string-empty-p, lax-plist-get):
* lisp/subr.el (ignore, always, zerop, fixnump, bignump, lsh, last)
(eventp, mouse-movement-p, log10, memory-limit, string-greaterp)
(interactive-p):
* lisp/window.el (get-lru-window, get-largest-window, (window-edges)
(window-body-edges, window-pixel-edges, window-body-pixel-edges)
(window-absolute-pixel-edges, window-absolute-body-pixel-edges)
(one-window-p):
Declare functions `side-effect-free` and/or `pure` as appropriate.
2023-02-17 14:52:54 +01:00
Eli Zaretskii
c6660a6d6d Improve documentation of 'repeat-mode' and related variables
* lisp/bindings.el (next-error-repeat-map)
(page-navigation-repeat-map, undo-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map): Mention repeatable commands in the doc
strings.
* lisp/repeat.el (repeat-exit-timeout, repeat-check-key)
(repeat-echo-function, repeat-mode, repeat-check-key)
(repeat-check-map, repeat-echo-message-string)
(repeat-echo-message, repeat-echo-mode-line)
(describe-repeat-maps): Improve wording of doc strings.
(describe-repeat-maps): Improve wording of the heading line.
(Bug#61183)

* doc/emacs/basic.texi (Repeating): Clarify and improve wording of
'repeat-mode' documentation.
2023-02-02 15:34:58 +02:00
Eli Zaretskii
41f497c8be Fix doc strings of window-splitting commands
* lisp/window.el (split-window-below, split-window-right): Doc
fixes.  (Bug#60886)
2023-01-26 09:59:58 +02:00
Juri Linkov
758ac5eabb Fix split-window-below for the case when split-window-keep-point is nil.
* lisp/window.el (split-window-below): Don't try to move point when
split-window-keep-point is nil and window-to-split is not the selected window
or nil (that defaults to the selected window) because code makes sense
only for the selected window.
(split-window-below, split-window-right): Improve docstrings (bug#60886)
2023-01-18 20:24:26 +02:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Juri Linkov
05d8310fb5 Use the new keyword ':repeat' in repeatable keymaps.
* lisp/bindings.el (undo-repeat-map)
(buffer-navigation-repeat-map, next-error-repeat-map)
(page-navigation-repeat-map):
* lisp/comint.el (comint-repeat-map):
* lisp/dired.el (dired-jump-map):
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map):
* lisp/shell.el (shell-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map):
* lisp/winner.el (winner-repeat-map):
* lisp/eshell/em-prompt.el (eshell-prompt-repeat-map):
* lisp/eshell/esh-mode.el (eshell-command-repeat-map):
Add the keyword ':repeat' to 'defvar-keymap' instead of
setting the symbol property 'repeat-map' explicitly.

* lisp/keymap.el (defvar-keymap): Check for 'props'
that is used in 'defvar-form'.
2022-12-22 10:03:09 +02:00
Eli Zaretskii
4d1e4a4893 Fix 'window-max-chars-per-line' when there are no fringes
* lisp/window.el (window-max-chars-per-line): Fix the way we
account for the fringes by calling 'window-fringes'.  (Bug#59963)
2022-12-17 14:04:14 +02:00
Eli Zaretskii
752f9dde63 ; Fix a typo in window.el
* lisp/window.el (switch-to-prev-buffer-skip-p): Fix typo.
Patch by Shuguang Sun <shuguang79@qq.com>.  (Bug#59985)
2022-12-14 17:08:46 +02:00
Juanma Barranquero
f6aa7c335f ; Typo fixes in etc/NEWS and lisp/ files 2022-11-29 22:37:18 +01:00
Stefan Kangas
ba485eb949 ; Fix typos 2022-11-18 16:02:19 +01:00
Stefan Kangas
32f36db4f8 Prefer defvar-keymap in window.el
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map): Prefer defvar-keymap.
2022-11-17 09:34:24 +01:00
Sean Whitton
30ca49c8f6 Use '^' key for detach command bindings
* lisp/tab-bar.el (tab-prefix-map): Move tear-off-window to C-x w ^ f.
Bind tab-window-detach to C-x w ^ t.
* lisp/window.el (window-prefix-map): Bind tab-detach to C-x t ^ f.
2022-09-14 16:03:50 -07:00
Sean Whitton
1c13ecae66 Add new C-x w prefix map
* window.el (window-prefix-map): New map.
(ctl-x-map): Unbind split-root-window-below and
split-root-window-right.  Bind window-prefix-map to C-x w.
2022-09-12 07:34:13 -07:00
Stefan Kangas
1f29ee2d21 Delete many items obsolete since 24.3
* lisp/allout.el (allout-exposure-change-hook)
(allout-structure-added-hook, allout-structure-deleted-hook)
(allout-structure-shifted-hook):
* lisp/arc-mode.el (archive-extract-hooks):
* lisp/buff-menu.el (Buffer-menu-buffer+size-width):
* lisp/calendar/timeclock.el (timeclock-modeline-display)
(timeclock-modeline-display, timeclock-update-modeline):
* lisp/cedet/semantic/db-el.el
(semanticdb-elisp-sym-function-arglist):
* lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks):
* lisp/cedet/semantic/edit.el (semantic-change-hooks)
(semantic-edits-new-change-hooks)
(semantic-edits-delete-change-hooks)
(semantic-edits-reparse-change-hooks):
* lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks):
* lisp/comint.el (comint--unquote&expand-filename)
(comint-unquote-filename):
* lisp/custom.el (user-variable-p):
* lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer)
(dired-sort-set-modeline):
* lisp/ebuff-menu.el (Electric-buffer-menu-mode):
* lisp/emacs-lisp/byte-run.el (macro-declaration-function):
* lisp/emacs-lisp/checkdoc.el (custom-print-functions)
(checkdoc-comment-style-hooks):
* lisp/emacs-lisp/cl-lib.el (custom-print-functions):
* lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings):
* lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook):
* lisp/eshell/esh-mode.el (eshell-status-in-modeline):
* lisp/eshell/eshell.el (eshell-add-to-window-buffer-names)
(eshell-remove-from-window-buffer-names):
* lisp/faces.el (set-face-underline-p, font-list-limit):
* lisp/files.el (automount-dir-prefix, toggle-read-only):
* lisp/filesets.el (filesets-cache-fill-content-hooks):
* lisp/frame.el (automatic-hscrolling):
* lisp/generic-x.el (javascript-generic-mode)
(javascript-generic-mode-hook):
* lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks):
* lisp/gnus/nndiary.el (nndiary-request-create-group-hooks)
(nndiary-request-update-info-hooks)
(nndiary-request-accept-article-hooks):
* lisp/htmlfontify.el (hfy-post-html-hooks):
* lisp/international/mule-cmds.el
(inactivate-current-input-method-function)
(inactivate-input-method, input-method-inactivate-hook)
(ucs-insert):
* lisp/international/quail.el (quail-inactivate)
(quail-inactivate-hook):
* lisp/international/robin.el (robin-inactivate)
(robin-inactivate-hook):
* lisp/leim/quail/hangul.el (hangul-input-method-inactivate):
* lisp/leim/quail/uni-input.el (ucs-input-inactivate):
* lisp/mail/emacsbug.el (report-emacs-bug-info):
* lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks):
* lisp/mpc.el (mpc-string-prefix-p):
* lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks)
(rcirc-receive-message-hooks, rcirc-activity-hooks):
* lisp/obsolete/crisp.el (crisp-mode-modeline-string):
* lisp/pcomplete.el (pcomplete-arg-quote-list)
(pcomplete-quote-argument):
* lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks):
* lisp/progmodes/python.el (python-info-ppss-context)
(python-info-ppss-context-type)
(python-info-ppss-comment-or-string-p, python-indent)
(python-guess-indent, python-buffer, python-preoutput-result)
(python-proc, python-send-receive, python-send-string)
(python-use-skeletons):
* lisp/progmodes/sh-script.el (sh-maybe-here-document):
* lisp/replace.el (query-replace-interactive):
* lisp/strokes.el (strokes-modeline-string):
* lisp/subr.el (redraw-modeline):
* lisp/term.el (term-default-fg-color, term-default-bg-color):
* lisp/textmodes/tex-mode.el (latex-string-prefix-p)
(tex-string-prefix-p):
* lisp/url/url-parse.el (url-recreate-url-attributes):
* lisp/vc/add-log.el (change-log-acknowledgement):
* lisp/vc/ediff-wind.el
(ediff-choose-window-setup-function-automatically):
* lisp/vc/pcvs-util.el (cvs-string-prefix-p):
* lisp/vc/vc.el (vc-string-prefix-p):
* lisp/window.el (display-buffer-function):
* lisp/winner.el (winner-mode-leave-hook): Remove many functions and
variables obsolete since 24.3.

* lisp/buff-menu.el (list-buffers--refresh):
* lisp/dired.el (dired-mode-map):
* lisp/files.el (abbreviate-file-name):
* lisp/generic-x.el (generic-default-modes):
* lisp/mh-e/mh-funcs.el (mh-kill-folder):
* lisp/progmodes/hideif.el (hide-ifdef-mode-submap):
* lisp/replace.el (query-replace-read-from):
* lisp/term.el (term):
* lisp/window.el (display-buffer): Don't use above deleted
functions and variables.

* src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete
since 24.3.
(syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr.
* lisp/subr.el (buffer-has-markers-at): Remove obsoletion
of above deleted DEFUN.
* etc/TODO: Doc fix; don't mention above deleted function.

* admin/cus-test.el (cus-test-get-options):
* lisp/pcomplete.el: Doc fixes; don't mention removed items.
; * etc/NEWS: List removed items.
2022-09-09 11:27:30 +02:00