1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 16:41:45 -08:00
Commit graph

160471 commits

Author SHA1 Message Date
Po Lu
e6c701c8c3 Shrink client list window structure
* src/xterm.c (struct x_client_list_window): Rearrange members
for better alignment.
2022-10-13 18:48:56 +08:00
Paul Eggert
97de273dca Simplify recent "File exists" fix
* src/fileio.c (Finsert_file_contents):
Simplify previous change that fixed bug#42431.
2022-10-13 01:48:29 -07:00
Lars Ingebrigtsen
12f261c470 Fix hl-line-mode/global-hl-line-mode logic again
* lisp/hl-line.el (hl-line-mode): Make explicit calls to
(hl-line-mode 1) work again when global-hl-line-mode is on
(bug#58478).
2022-10-13 10:08:55 +02:00
Lars Ingebrigtsen
4af4df18c5 Fix browse-url-emacs for file: URLs on Windows
* lisp/net/browse-url.el (browse-url-emacs): Fix up
file:///c:/foo/bar URLs on windows (bug#58464).
2022-10-13 09:52:51 +02:00
Juri Linkov
7054481ed5 * lisp/outline.el: Rearrange button/margin functions.
(outline--make-button-overlay, outline--make-margin-overlay)
(outline--insert-open-button, outline--insert-close-button)
(outline--fix-up-all-buttons): Move to the section "Button/margin indicators".
2022-10-13 10:23:44 +03:00
Juri Linkov
3d41cc03d9 * lisp/outline.el (outline--fix-buttons-after-change): New function.
(outline-minor-mode): Use it.
(outline--make-margin-overlay): Remove inhibit-read-only.
2022-10-13 10:13:07 +03:00
Lars Ingebrigtsen
c522021a30 Fix misleading "File exists, but cannot be read" in browse-url-emacs
* src/fileio.c (Finsert_file_contents): Don't signal an error
about not being able to open the file when we're fetching things
via handlers -- in that case, modtime isn't necessarily set, and
if there's a handler, it should take care of this (bug#42431).
2022-10-13 09:00:17 +02:00
Stefan Kangas
2b7fefdef1 Merge from origin/emacs-28
4b4b093ab3 ; * admin/make-tarball.txt: Fix typo.
2022-10-13 06:31:52 +02:00
Stefan Kangas
4b4b093ab3 ; * admin/make-tarball.txt: Fix typo. 2022-10-13 04:46:32 +02:00
Stefan Monnier
da752c0466 src/frame.c (do_switch_frame): Fix bug#58343
* src/frame.c (do_switch_frame): Move call to `get-mru-window` outside
of the "critical region" where (selected-window) != (frame-selected-window).
* src/minibuf.c (move_minibuffers_onto_frame): Add arg `frame`.
Use it instead of `selected_frame`.  Adjust all callers.
* src/lisp.h (move_minibuffers_onto_frame): Adjust declaration.
2022-10-12 17:06:33 -04:00
Lars Ingebrigtsen
5a94a2e5b0 Clarify Native-Compilation Variables slightly
* doc/lispref/compile.texi (Native-Compilation Variables): Clarify
trampoline bit (bug#58429).
2022-10-12 15:00:08 +02:00
Po Lu
1e961eda72 Improve makefile-imake-mode
* lisp/progmodes/make-mode.el
(makefile-imake-font-lock-keywords): Give Imake priority over
CPP keywords, and don't require comments to start at BOL.
(makefile-imake-mode): Set comment-start to some sensible value.
2022-10-12 20:40:24 +08:00
Lars Ingebrigtsen
820e6f399d Fix thinko in read-string-from-buffer
* lisp/textmodes/string-edit.el (string-edit-done): Return an empty
string when the user has entered no text.
2022-10-12 13:40:51 +02:00
kobarity
aa559c1553 Fix Python completion when point in shell buffer is before prompt
* lisp/progmodes/python.el (python-shell-completion-at-point): Limit
prompt boundaries check to shell buffer.
* test/lisp/progmodes/python-tests.el (python-shell-completion-2):
(python-shell-completion-native-2): New tests (bug#58441).
2022-10-12 13:14:33 +02:00
Po Lu
2953d89d74 Stop relying on Xt hack to set window manager hints
* src/widget.c (get_wm_shell): Return WMShellWidget.
(update_wm_hints, widget_update_wm_size_hints): Return whether
or not size hints changed.
* src/widget.h: Delete `size_switch'.
* src/widgetprv.h (EmacsFramePart): Likewise.
* src/xterm.c (x_wm_set_size_hint): Set size hints the usual way
if Xt did not set them.  (bug#58412)
2022-10-12 15:08:01 +08:00
Stefan Kangas
c22e85715e Merge from origin/emacs-28
3787d0b11a ; * doc/lispref/windows.texi (Window Hooks): Fix markup (b...
2022-10-12 06:31:27 +02:00
Dmitry Gutov
ef6e518035 ; lisp/progmodes/project.el: Bump version 2022-10-12 00:04:54 +03:00
Andrea Corallo
3744720904 Add trampoline AOT compilation target (bug#58318)
* Makefile.in (trampolines): New target.
* lisp/Makefile.in (trampolines): Likewise.
* lisp/emacs-lisp/comp.el (comp-compile-all-trampolines): New
function.
2022-10-11 21:19:21 +02:00
Eli Zaretskii
3787d0b11a ; * doc/lispref/windows.texi (Window Hooks): Fix markup (bug#58445). 2022-10-11 20:20:44 +03:00
Po Lu
61b6da5ace Also avoid setting _NET_WM_USER_TIME on crossing
* src/xterm.c (handle_one_xevent): Stop setting user time prop
on crossing events.
2022-10-11 19:56:05 +08:00
Mattias Engdegård
48df8bbb1f ; * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): run faster on mainframes 2022-10-11 13:44:23 +02:00
Lars Ingebrigtsen
5724ee6131 Make read-string-from-buffer and string-edit mention each other
* lisp/textmodes/string-edit.el (read-string-from-buffer)
(string-edit): Mention each other in the doc strings.
2022-10-11 13:02:27 +02:00
Eli Zaretskii
4f114c0d95 Speed up scrolling when lines are very long and truncated
* src/window.c (window_scroll_for_long_lines): New function.
(window_scroll): Call 'window_scroll_for_long_lines' when lines
are very long and truncated on display.  Also, disable
'fontification-functions' during scrolling in that case.
* src/xdisp.c (redisplay_window): When recentering the window's
display, go back to the centering position using a simplified
method, if lines in the buffer are very long and truncated on
display.
2022-10-11 13:26:01 +03:00
Po Lu
163000fb59 Remove some more unnecessary calls to block_input
* src/xterm.c (x_update_opaque_region, show_back_buffer)
(XTbuffer_flipping_unblocked_hook, x_clear_under_internal_border)
(x_after_update_window_line): Remove and add calls to
block_input as required.
2022-10-11 15:46:10 +08:00
F. Jason Park
4a1a4bf0e2 Accommodate missing spec values in erc-format-message
* lisp/erc/erc.el (erc-format-message): Although not mentioned in its
log message, commit 5281946fbf "Make
format-spec accept function substitutions" also fixed a bug involving
the `ignore-missing' parameter of `format-spec'.  Until now, ERC has
been relying on the old behavior to gracefully handle malformed server
messages.  This commit tries to regain that functionality.
2022-10-10 18:48:01 -07:00
Philipp Stephani
92703e00dc Add gettid to seccomp-filter
* lib-src/seccomp-filter.c (main): gettid is necessary on RHEL 9.0
(bug#56359).
2022-10-11 02:52:51 +02:00
Lars Ingebrigtsen
cf9ac85785 Remove the view-remove-frame-by-deleting variable
* lisp/view.el (view-remove-frame-by-deleting): Remove variable
that hasn't been used since 2011 -- 357f93d245 reworked the
code and stopped using it (bug#58413).
2022-10-11 02:39:05 +02:00
kobarity
b0585441a3 Fix Python completion failure under certain conditions
* lisp/progmodes/python.el (python-shell-send-string-no-output):
Save and restore `comint-last-prompt-overlay' or `comint-last-prompt'.
* test/lisp/progmodes/python-tests.el (python-tests-shell-wait-for-prompt):
New helper function.
(python-tests-with-temp-buffer-with-shell): New helper macro.
(python-shell-completion-1, python-shell-completion-native-1)
(python-shell-completion-native-with-ffap-1)
(python-shell-completion-native-with-eldoc-1): New tests (bug#58389).
2022-10-11 02:29:42 +02:00
Lars Ingebrigtsen
36ab164496 Improve error message from sqlite-execute
* src/sqlite.c (sqlite_prepare_errmsg): New function.
(Fsqlite_execute): Use it to get the same error format for both
execute and select.
(Fsqlite_select): Factored out from here.
2022-10-11 02:18:19 +02:00
Jim Porter
ebc19f56aa Don't prompt when killing an Emacs client if it's the last client
* lisp/server.el (server-kill-emacs-query-function): Ignore the
current client (if any) when checking for live clients (bug#58404).
2022-10-10 15:09:21 -07:00
Michael Albinus
5df95ba039 Fix Tramp completion on MS Windows
* lisp/net/tramp.el (tramp-build-remote-file-name-spec-regexp):
Revert previous change, it's too complicate.
(tramp-build-completion-file-name-regexp):
Use `tramp-prefix-format' instead of `tramp-prefix-regexp'.  (Bug#558133)
2022-10-10 21:46:24 +02:00
Paul Eggert
345de32a5d Port bwrap/allows-stdout test to Ubuntu 22.04.1
Without this patch, Ubuntu 22.04.1 x86-64 "make check" reports a
failure in test/src/emacs-tests.el’s
emacs-tests/bwrap/allows-stdout.  One can reproduce the bug
without using the Emacs executable, by running this script:

  #!/bin/bash
  export LC_ALL=C
  exec strace -f -o /tmp/tr bwrap --ro-bind / / --seccomp 20 -- \
    cat /dev/null 20< lib-src/seccomp-filter-exec.bpf

This script exits with status 159, because "cat" didn’t get
started (it got a SIGSYS signal early on).

The command "journalctl -g SECCOMP" indicated that rseq (syscall
334) was the problem.  This syscall is issued by
/lib64/ld-linux-x86-64.so.2 before ‘main’ is called.

There’s another problem with the clone3 syscall, which is used by
pthread_create starting in glibc 2.34.  pthread_create is called
by g_child_watch_source_new, which is called by
init_process_emacs.

* lib-src/seccomp-filter.c (main): Allow rseq, clone3.  This
causes the test to pass.  Perhaps a fancier, more accurate patch
could be written by someone who has the time.
2022-10-10 12:36:38 -07:00
Lars Ingebrigtsen
8851a75ca7 Add a test for sqlite "insert ... returning"
* test/src/sqlite-tests.el (sqlite-returning): Add a test for
"insert ... returning".
2022-10-10 14:10:04 +02:00
Robert Pluim
e25bdd7946 Fix `vc-prepare-patch' docstring
* lisp/vc/vc.el (vc-prepare-patch): Correct description of
`vc-prepare-patches-separately'.
2022-10-10 12:45:45 +02:00
Eli Zaretskii
b7802190fe ; Update the doc string of 'compilation-auto-jump-to-first-error'
* lisp/progmodes/compile.el
(compilation-auto-jump-to-first-error): Doc fix.  (Bug#58407)
2022-10-10 12:37:04 +03:00
Eli Zaretskii
ed436db132 ; * doc/lispref/text.texi (Database): Fix markup in last change. 2022-10-10 12:14:33 +03:00
Lars Ingebrigtsen
7e7dc74ffb Support "insert into ... returning ..." in sqlite-execute
* doc/lispref/text.texi (Database): Mention it.
* src/sqlite.c (Fsqlite_execute): Support syntax like "insert into
... returning ..." (bug#58390).
2022-10-10 10:58:33 +02:00
Lars Ingebrigtsen
7ab6ec364d Fix some indentation in Fsqlite_execute
* src/sqlite.c (Fsqlite_execute): Fix indentation.
2022-10-10 10:35:46 +02:00
Eli Zaretskii
28904d78a5 ; Fix last change. 2022-10-10 11:09:43 +03:00
Eli Zaretskii
e016e60a04 ; Clarify correct use of 'xref-query-replace-in-results'
* lisp/progmodes/xref.el (xref--query-replace-1): Improve the
user-error message.
(xref-query-replace-in-results): Clarify restrictions in the doc
string.

* doc/emacs/maintaining.texi (Xref Commands, Identifier Search):
Clarify the correct usage of 'xref-query-replace-in-results'.
2022-10-10 11:05:18 +03:00
Eli Zaretskii
f91ae94790 ; * lisp/progmodes/gdb-mi.el (gdb): Fix a typo. (Bug#58400) 2022-10-10 09:42:19 +03:00
Michael Heerdegen
93136169cb Try to speed up extended command shorthand computation
Discussed in Bug#51143.

* lisp/simple.el (execute-extended-command--shorter): Compute a
complete list of `commandp' symbols once.  This significantly speeds
up complicated cases while the slowdown of simple cases is still
accetable.
2022-10-09 20:42:44 +02:00
समीर सिंह Sameer Singh
90c3a25eb1 Set the PARENTS argument for language environments
* lisp/language/indonesian.el
* lisp/language/philippine.el
* lisp/language/misc-lang.el
(set-language-info-alist): Add PARENTS argument.  (Bug#58376)
2022-10-09 17:21:33 +03:00
Lars Ingebrigtsen
b5dc0513d5 Make Fsqlite_select error data better
* src/sqlite.c (Fsqlite_select): Add more the more specific error
text to the error data (bug#58363).
2022-10-09 16:17:22 +02:00
Lars Ingebrigtsen
0ce91ed8b4 Clean up Fsqlite_select slightly
* src/sqlite.c (Fsqlite_select): Clean up code slightly.
2022-10-09 15:38:52 +02:00
Po Lu
22374f2122 Fix user time handling bug on GNOME Shell and Metacity
* src/xfns.c (x_window): Avoid extraneous
XChangeWindowAttributes.
* src/xterm.c (x_display_set_last_user_time): New argument
SET_PROPERTY.  Do not change the user time property if it is not
true.  All callers changed.
(handle_one_xevent): Avoid setting the user time property on
LeaveNotify and XI_Leave events.
2022-10-09 19:58:17 +08:00
Stefan Kangas
a2dd9d683a Merge from origin/emacs-28
32ef7550ed ; Improve documentation of 'file-in-directory-p'
2022-10-09 06:31:06 +02:00
Stefan Monnier
9d47364634 * lisp/url/url-file.el (url-file): Don't bind coding-system-for-read
Binding it causes errors when some of the enclosed code ends up
loading a `.el` file, and it is unnecessary since the rest of
the code (in `url-file-asynch-callback`) is already careful to
use `insert-file-contents-literally`.
2022-10-08 23:06:45 -04:00
Mattias Engdegård
81eb7c1809 ; * test/src/fns-tests.el (fns-tests--string-lessp-cases): Extend. 2022-10-08 18:48:30 +02:00
Mattias Engdegård
e4769b20f1 Restrict string-lessp vectorisation to safe architectures
* src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): New.
(Fstring_lessp): Only use word operations where safe, because string
data from purespace may be unaligned.
2022-10-08 18:48:30 +02:00