]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agosrc/comp.c: Use constructor expressions when possible. feature/comp-use-ctors
Vibhav Pant [Fri, 14 Oct 2022 11:51:13 +0000 (17:21 +0530)]
src/comp.c: Use constructor expressions when possible.

* src/comp.c:
  - Add declarations for creating constructor/initializer expressions
  when supported.
  - (emit_coerce): Use a struct constructor expression to create a
  Lisp_Object value instead of creating a new local variable.
  - emit_limple_call_ref: Emit a single constructor expression for
  initializing tmp_arr.

2 years agoFix bug#56153
Po Lu [Fri, 14 Oct 2022 11:04:44 +0000 (19:04 +0800)]
Fix bug#56153

* src/nsterm.m (get_keysym_name)
(ns_draw_glyphless_glyph_string_foreground): Fix new Mac OS
deprecations.

([EmacsApp terminate:]): Use kbd_buffer_store_event instead
of emacs_event.  (bug#56153)
([EmacsView windowDidChangeBackingProperties:]): Fix new Mac
OS deprecation.

2 years agoAvoid redundant creation of XRender pictures
Po Lu [Fri, 14 Oct 2022 07:52:16 +0000 (15:52 +0800)]
Avoid redundant creation of XRender pictures

* src/xterm.c (x_composite_image): Take arg DESTINATION.  Do not
create a picture if it is set.
(x_draw_image_foreground, x_draw_image_foreground_1): Pass
destination where appropriate.

2 years ago; Fix recent change in documentation of "device number"
Eli Zaretskii [Fri, 14 Oct 2022 07:12:03 +0000 (10:12 +0300)]
; Fix recent change in documentation of "device number"

* src/dired.c (Ffile_attributes):
* lisp/files.el (buffer-file-number, file-attribute-file-number):
Fix wording of the doc strings.

* etc/NEWS:
* doc/lispref/buffers.texi (Buffer File Name):
* doc/lispref/files.texi (File Attributes): Fix a typo and
wording.  (Bug#58446)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 14 Oct 2022 04:31:49 +0000 (06:31 +0200)]
Merge from origin/emacs-28

85e47d9a9e ; Continued cleanup of "-hooks"

2 years agoClarify structure of file-attribute's device number
Michael Albinus [Thu, 13 Oct 2022 19:13:45 +0000 (21:13 +0200)]
Clarify structure of file-attribute's device number

* doc/lispref/buffers.texi (Buffer File Name): Fix description of
buffer-file-number.

* doc/lispref/files.texi (File Attributes): Clarify type of device
number.  Describe file-attribute-file-number.  (Bug#58446)

* etc/NEWS: Mention file-attribute-file-number.

* lisp/files.el (buffer-file-number, file-attribute-device-number)
(file-attribute-collect): Fix docstring.
(file-attribute-file-number): New defsubst.
(find-buffer-visiting, find-file-noselect)
(set-visited-file-name, basic-save-buffer):
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/eshell/em-unix.el (eshell-shuffle-files): Use it.

* src/dired.c (Ffile_attributes): Fix docstring.

2 years ago; Continued cleanup of "-hooks"
Bill Wohler [Thu, 13 Oct 2022 16:49:55 +0000 (09:49 -0700)]
; Continued cleanup of "-hooks"

* doc/misc/mh-e.texi: Replace mh-kill-folder-suppress-prompt-hook with
mh-kill-folder-suppress-prompt-functions.

2 years agoImprove checks for recent "File exists" fixup
Paul Eggert [Thu, 13 Oct 2022 16:33:46 +0000 (09:33 -0700)]
Improve checks for recent "File exists" fixup

* src/fileio.c (Finsert_file_contents): Add an assertion (bug#42431).

2 years agoMake `info' treat "\n" in node names as "\s"
Stefan Kangas [Thu, 13 Oct 2022 13:46:56 +0000 (15:46 +0200)]
Make `info' treat "\n" in node names as "\s"

* lisp/info.el (info): Treat "\n" in node name as "\s".  (Bug#57936)

2 years agoShrink client list window structure
Po Lu [Thu, 13 Oct 2022 10:47:49 +0000 (18:47 +0800)]
Shrink client list window structure

* src/xterm.c (struct x_client_list_window): Rearrange members
for better alignment.

2 years agoSimplify recent "File exists" fix
Paul Eggert [Thu, 13 Oct 2022 08:48:10 +0000 (01:48 -0700)]
Simplify recent "File exists" fix

* src/fileio.c (Finsert_file_contents):
Simplify previous change that fixed bug#42431.

2 years agoFix hl-line-mode/global-hl-line-mode logic again
Lars Ingebrigtsen [Thu, 13 Oct 2022 08:08:55 +0000 (10:08 +0200)]
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).

2 years agoFix browse-url-emacs for file: URLs on Windows
Lars Ingebrigtsen [Thu, 13 Oct 2022 07:52:44 +0000 (09:52 +0200)]
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).

2 years ago* lisp/outline.el: Rearrange button/margin functions.
Juri Linkov [Thu, 13 Oct 2022 07:23:44 +0000 (10:23 +0300)]
* 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".

2 years ago* lisp/outline.el (outline--fix-buttons-after-change): New function.
Juri Linkov [Thu, 13 Oct 2022 07:13:07 +0000 (10:13 +0300)]
* lisp/outline.el (outline--fix-buttons-after-change): New function.

(outline-minor-mode): Use it.
(outline--make-margin-overlay): Remove inhibit-read-only.

2 years agoFix misleading "File exists, but cannot be read" in browse-url-emacs
Lars Ingebrigtsen [Thu, 13 Oct 2022 07:00:17 +0000 (09:00 +0200)]
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).

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 13 Oct 2022 04:31:52 +0000 (06:31 +0200)]
Merge from origin/emacs-28

4b4b093ab3 ; * admin/make-tarball.txt: Fix typo.

2 years ago; * admin/make-tarball.txt: Fix typo.
Stefan Kangas [Thu, 13 Oct 2022 02:46:32 +0000 (04:46 +0200)]
; * admin/make-tarball.txt: Fix typo.

2 years agosrc/frame.c (do_switch_frame): Fix bug#58343
Stefan Monnier [Wed, 12 Oct 2022 21:06:33 +0000 (17:06 -0400)]
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.

2 years agoClarify Native-Compilation Variables slightly
Lars Ingebrigtsen [Wed, 12 Oct 2022 12:59:25 +0000 (14:59 +0200)]
Clarify Native-Compilation Variables slightly

* doc/lispref/compile.texi (Native-Compilation Variables): Clarify
trampoline bit (bug#58429).

2 years agoImprove makefile-imake-mode
Po Lu [Wed, 12 Oct 2022 12:40:03 +0000 (20:40 +0800)]
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.

2 years agoFix thinko in read-string-from-buffer
Lars Ingebrigtsen [Wed, 12 Oct 2022 11:40:51 +0000 (13:40 +0200)]
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.

2 years agoFix Python completion when point in shell buffer is before prompt
kobarity [Wed, 12 Oct 2022 11:14:33 +0000 (13:14 +0200)]
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).

2 years agoStop relying on Xt hack to set window manager hints
Po Lu [Wed, 12 Oct 2022 07:07:49 +0000 (15:07 +0800)]
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)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 12 Oct 2022 04:31:27 +0000 (06:31 +0200)]
Merge from origin/emacs-28

3787d0b11a ; * doc/lispref/windows.texi (Window Hooks): Fix markup (b...

2 years ago; lisp/progmodes/project.el: Bump version
Dmitry Gutov [Tue, 11 Oct 2022 21:04:54 +0000 (00:04 +0300)]
; lisp/progmodes/project.el: Bump version

2 years agoAdd trampoline AOT compilation target (bug#58318)
Andrea Corallo [Tue, 11 Oct 2022 19:17:55 +0000 (21:17 +0200)]
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.

2 years ago; * doc/lispref/windows.texi (Window Hooks): Fix markup (bug#58445).
Eli Zaretskii [Tue, 11 Oct 2022 17:20:44 +0000 (20:20 +0300)]
; * doc/lispref/windows.texi (Window Hooks): Fix markup (bug#58445).

2 years agoAlso avoid setting _NET_WM_USER_TIME on crossing
Po Lu [Tue, 11 Oct 2022 11:55:14 +0000 (19:55 +0800)]
Also avoid setting _NET_WM_USER_TIME on crossing

* src/xterm.c (handle_one_xevent): Stop setting user time prop
on crossing events.

2 years ago; * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): run faster on mainframes
Mattias Engdegård [Tue, 11 Oct 2022 09:10:46 +0000 (11:10 +0200)]
; * src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): run faster on mainframes

2 years agoMake read-string-from-buffer and string-edit mention each other
Lars Ingebrigtsen [Tue, 11 Oct 2022 11:02:20 +0000 (13:02 +0200)]
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.

2 years agoSpeed up scrolling when lines are very long and truncated
Eli Zaretskii [Tue, 11 Oct 2022 10:26:01 +0000 (13:26 +0300)]
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.

2 years agoRemove some more unnecessary calls to block_input
Po Lu [Tue, 11 Oct 2022 07:45:08 +0000 (15:45 +0800)]
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.

2 years agoAccommodate missing spec values in erc-format-message
F. Jason Park [Sat, 8 Oct 2022 04:55:30 +0000 (21:55 -0700)]
Accommodate missing spec values in erc-format-message

* lisp/erc/erc.el (erc-format-message): Although not mentioned in its
log message, commit 5281946fbf6b3cdbec5ce82e0057c71849faf4d2 "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.

2 years agoAdd gettid to seccomp-filter
Philipp Stephani [Tue, 11 Oct 2022 00:52:51 +0000 (02:52 +0200)]
Add gettid to seccomp-filter

* lib-src/seccomp-filter.c (main): gettid is necessary on RHEL 9.0
(bug#56359).

2 years agoRemove the view-remove-frame-by-deleting variable
Lars Ingebrigtsen [Tue, 11 Oct 2022 00:39:05 +0000 (02:39 +0200)]
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 -- 357f93d245344 reworked the
code and stopped using it (bug#58413).

2 years agoFix Python completion failure under certain conditions
kobarity [Mon, 10 Oct 2022 13:24:17 +0000 (22:24 +0900)]
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).

2 years agoImprove error message from sqlite-execute
Lars Ingebrigtsen [Tue, 11 Oct 2022 00:18:19 +0000 (02:18 +0200)]
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.

2 years agoDon't prompt when killing an Emacs client if it's the last client
Jim Porter [Sun, 9 Oct 2022 22:53:27 +0000 (15:53 -0700)]
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).

2 years agoFix Tramp completion on MS Windows
Michael Albinus [Mon, 10 Oct 2022 19:46:24 +0000 (21:46 +0200)]
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)

2 years agoPort bwrap/allows-stdout test to Ubuntu 22.04.1
Paul Eggert [Mon, 10 Oct 2022 19:35:56 +0000 (12:35 -0700)]
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.

2 years agoAdd a test for sqlite "insert ... returning"
Lars Ingebrigtsen [Mon, 10 Oct 2022 12:09:54 +0000 (14:09 +0200)]
Add a test for sqlite "insert ... returning"

* test/src/sqlite-tests.el (sqlite-returning): Add a test for
"insert ... returning".

2 years agoFix `vc-prepare-patch' docstring
Robert Pluim [Mon, 10 Oct 2022 10:45:45 +0000 (12:45 +0200)]
Fix `vc-prepare-patch' docstring

* lisp/vc/vc.el (vc-prepare-patch): Correct description of
`vc-prepare-patches-separately'.

2 years ago; Update the doc string of 'compilation-auto-jump-to-first-error'
Eli Zaretskii [Mon, 10 Oct 2022 09:37:04 +0000 (12:37 +0300)]
; 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)

2 years ago; * doc/lispref/text.texi (Database): Fix markup in last change.
Eli Zaretskii [Mon, 10 Oct 2022 09:14:33 +0000 (12:14 +0300)]
; * doc/lispref/text.texi (Database): Fix markup in last change.

2 years agoSupport "insert into ... returning ..." in sqlite-execute
Lars Ingebrigtsen [Mon, 10 Oct 2022 08:58:33 +0000 (10:58 +0200)]
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).

2 years agoFix some indentation in Fsqlite_execute
Lars Ingebrigtsen [Sun, 9 Oct 2022 15:06:46 +0000 (17:06 +0200)]
Fix some indentation in Fsqlite_execute

* src/sqlite.c (Fsqlite_execute): Fix indentation.

2 years ago; Fix last change.
Eli Zaretskii [Mon, 10 Oct 2022 08:09:43 +0000 (11:09 +0300)]
; Fix last change.

2 years ago; Clarify correct use of 'xref-query-replace-in-results'
Eli Zaretskii [Mon, 10 Oct 2022 08:05:18 +0000 (11:05 +0300)]
; 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'.

2 years ago; * lisp/progmodes/gdb-mi.el (gdb): Fix a typo. (Bug#58400)
Eli Zaretskii [Mon, 10 Oct 2022 06:42:19 +0000 (09:42 +0300)]
; * lisp/progmodes/gdb-mi.el (gdb): Fix a typo.  (Bug#58400)

2 years agoTry to speed up extended command shorthand computation
Michael Heerdegen [Sun, 18 Sep 2022 10:26:53 +0000 (12:26 +0200)]
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.

2 years agoSet the PARENTS argument for language environments
समीर सिंह Sameer Singh [Sat, 8 Oct 2022 10:07:00 +0000 (15:37 +0530)]
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)

2 years agoMake Fsqlite_select error data better
Lars Ingebrigtsen [Sun, 9 Oct 2022 14:17:22 +0000 (16:17 +0200)]
Make Fsqlite_select error data better

* src/sqlite.c (Fsqlite_select): Add more the more specific error
text to the error data (bug#58363).

2 years agoClean up Fsqlite_select slightly
Lars Ingebrigtsen [Sun, 9 Oct 2022 00:19:14 +0000 (02:19 +0200)]
Clean up Fsqlite_select slightly

* src/sqlite.c (Fsqlite_select): Clean up code slightly.

2 years agoFix user time handling bug on GNOME Shell and Metacity
Po Lu [Sun, 9 Oct 2022 11:58:07 +0000 (19:58 +0800)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 9 Oct 2022 04:31:06 +0000 (06:31 +0200)]
Merge from origin/emacs-28

32ef7550ed ; Improve documentation of 'file-in-directory-p'

2 years ago* lisp/url/url-file.el (url-file): Don't bind `coding-system-for-read`
Stefan Monnier [Sun, 9 Oct 2022 03:06:03 +0000 (23:06 -0400)]
* 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`.

2 years ago; * test/src/fns-tests.el (fns-tests--string-lessp-cases): Extend.
Mattias Engdegård [Sat, 8 Oct 2022 16:39:48 +0000 (18:39 +0200)]
; * test/src/fns-tests.el (fns-tests--string-lessp-cases): Extend.

2 years agoRestrict string-lessp vectorisation to safe architectures
Mattias Engdegård [Sat, 8 Oct 2022 13:25:50 +0000 (15:25 +0200)]
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.

2 years agoBetter Lisp_String comments
Mattias Engdegård [Sat, 8 Oct 2022 14:24:40 +0000 (16:24 +0200)]
Better Lisp_String comments

* src/lisp.h (struct Lisp_String): Comments improved.
* src/pdumper.c (dump_string): Update hash (comment change only).

2 years agoImproved format string error message (bug#58168)
Mattias Engdegård [Fri, 7 Oct 2022 16:17:40 +0000 (18:17 +0200)]
Improved format string error message (bug#58168)

* src/editfns.c (styled_format): Better message when the conversion
char is non-ASCII from a unibyte format string.

2 years agopackage.el: Understand a few more variations in tarball formats
Stefan Monnier [Sat, 8 Oct 2022 16:19:40 +0000 (12:19 -0400)]
package.el: Understand a few more variations in tarball formats

* lisp/emacs-lisp/package.el (package-untar-buffer): Fix thinko.
(package-tar-file-info): Handle the case where the first file is in
a subdirectory.

* test/lisp/emacs-lisp/package-tests.el (package-test-bug58367): New test.
* test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar:
* test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar: New files.

2 years ago; * lisp/vc/vc.el (vc-prepare-patches-separately): Doc fix.
Eli Zaretskii [Sat, 8 Oct 2022 14:40:25 +0000 (17:40 +0300)]
; * lisp/vc/vc.el (vc-prepare-patches-separately): Doc fix.

2 years ago; * lisp/vc/vc.el (vc-prepare-patches-separately): Fix docstring
Philip Kaludercic [Sat, 8 Oct 2022 13:06:26 +0000 (15:06 +0200)]
; * lisp/vc/vc.el (vc-prepare-patches-separately): Fix docstring

Noticed by German Pacenza.

2 years ago; Add missing documentation strings
Philip Kaludercic [Sat, 8 Oct 2022 12:41:53 +0000 (14:41 +0200)]
; Add missing documentation strings

* lisp/vc/vc.el (vc-read-revision): Add a docstring.
(vc-read-multiple-revisions): Add a docstring.

2 years agoMake sqlite-select signal errors when there's an error
Lars Ingebrigtsen [Sat, 8 Oct 2022 13:41:14 +0000 (15:41 +0200)]
Make sqlite-select signal errors when there's an error

* src/sqlite.c (load_dll_functions): Update.
(Fsqlite_select): Signal an error when there's an error preparing
the statement.

2 years agoFix vtable-insert-object line insertion
Lars Ingebrigtsen [Sat, 8 Oct 2022 13:26:01 +0000 (15:26 +0200)]
Fix vtable-insert-object line insertion

* lisp/emacs-lisp/vtable.el (vtable-insert-object): Pass in the
correct ellipsis values (bug#58370).
(vtable--insert-line): Don't bug out on missing optional arguments.

2 years agoFix misleading prompt in vc-git-create-tag
Visuwesh [Sat, 8 Oct 2022 13:13:48 +0000 (15:13 +0200)]
Fix misleading prompt in vc-git-create-tag

* lisp/vc/vc-git.el (vc-git-create-tag): Actually pass the DEFAULT
argument to vc-read-revision (bug#58378).

2 years agoFix typo in etc/TODO
Lars Ingebrigtsen [Sat, 8 Oct 2022 12:57:47 +0000 (14:57 +0200)]
Fix typo in etc/TODO

2 years ago* etc/TODO (Wishlist items): Add libarchive(3) integration.
Michael Albinus [Sat, 8 Oct 2022 12:54:38 +0000 (14:54 +0200)]
* etc/TODO (Wishlist items): Add libarchive(3) integration.

2 years agoMention seq-keep in shortdoc
Lars Ingebrigtsen [Sat, 8 Oct 2022 11:20:17 +0000 (13:20 +0200)]
Mention seq-keep in shortdoc

* lisp/emacs-lisp/shortdoc.el (sequence): Mention seq-keep.

2 years ago; Improve documentation of 'file-in-directory-p'
Eli Zaretskii [Sat, 8 Oct 2022 11:13:50 +0000 (14:13 +0300)]
; Improve documentation of 'file-in-directory-p'

* lisp/files.el (file-in-directory-p): Clarify doc string.

* doc/lispref/files.texi (Truenames): Move the documentation of
'file-in-directory-p' from here...
(Contents of Directories): ...to here.  Add index entries.
(Bug#58364)

2 years agoAdd a VC command to prepare patches
Philip Kaludercic [Mon, 3 Oct 2022 18:54:38 +0000 (20:54 +0200)]
Add a VC command to prepare patches

* doc/emacs/vc1-xtra.texi (Miscellaneous VC):  Add new node.
(Editing VC Commands):  Document new feature.
* etc/NEWS:  Mention 'vc-prepare-patch'.
* lisp/vc/log-view.el: Autoload 'log-view-get-marked'.
* lisp/vc/vc-git.el (vc-git-prepare-patch):  Add Git implementation.
* lisp/vc/vc-hg.el (vc-git-prepare-patch):  Add Mercurial implementation.
* lisp/vc/vc-bzr.el (vc-git-prepare-patch):  Add Bazaar implementation.
* lisp/vc/vc.el (vc-read-revision):  Add a MULTIPLE argument.
(vc-read-multiple-revisions):  Add an auxiliary function that always
calls 'vc-read-revision' with a non-nil value for MULTIPLE.
(vc-prepare-patches-separately):  Add user option.
(message-goto-body):  Declare function.
(message--name-table):  Declare function.
(vc-default-prepare-patch): Add a default implementation.
(vc-prepare-patch):  Add command.  (Bug#57400)

2 years agoStop passing CurrentTime to SetInputFocus
Po Lu [Sat, 8 Oct 2022 08:38:30 +0000 (16:38 +0800)]
Stop passing CurrentTime to SetInputFocus

* src/xterm.c (xi_focus_handle_for_device, handle_one_xevent):
Set the last user time where required for focus to be handled
correctly.
(x_focus_frame): Do not perform actions prohibited by the ICCCM.

2 years agoAdd support for the Coptic script (bug#58330)
समीर सिंह Sameer Singh [Thu, 6 Oct 2022 12:04:28 +0000 (17:34 +0530)]
Add support for the Coptic script (bug#58330)

* lisp/language/misc-lang.el ("Coptic"): New language environment.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support coptic.
* lisp/leim/quail/misc-lang.el ("coptic"): New input method.

* etc/HELLO: Add a Coptic greeting.
* etc/NEWS: Announce the new language environment.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 8 Oct 2022 04:30:23 +0000 (06:30 +0200)]
Merge from origin/emacs-28

cfb1e21844 Update name of hs-mouse-toggle-hiding in Emacs manual

2 years ago; Silence byte-compiler in benchmark.el
Stefan Kangas [Fri, 7 Oct 2022 21:14:52 +0000 (23:14 +0200)]
; Silence byte-compiler in benchmark.el

* lisp/emacs-lisp/benchmark.el (cl-lib): Require.

2 years agoPrefer defvar-keymap in bibtex.el
Stefan Kangas [Fri, 7 Oct 2022 20:43:51 +0000 (22:43 +0200)]
Prefer defvar-keymap in bibtex.el

* lisp/textmodes/bibtex.el (bibtex-mode-map): Prefer defvar-keymap.

2 years agoFix setting the wallpaper with "swaybg" and "wbg"
Stefan Kangas [Fri, 7 Oct 2022 20:07:09 +0000 (22:07 +0200)]
Fix setting the wallpaper with "swaybg" and "wbg"

* lisp/image/wallpaper.el (wallpaper-setter): Add 'init-action'
and 'detach' fields to structure.
(wallpaper--init-action-kill): New helper function.
(wallpaper--default-setters): Use above new fields for "swaybg" and
"wbg", to start/restart the corresponding processes as needed.
(wallpaper-default-set-function): Call 'init-action' function if
there is one.  If 'detach', use 'call-process' instead of
'start-process'.  (Bug#57781)

* test/lisp/image/wallpaper-tests.el (wallpaper--find-setter)
(wallpaper--find-setter/call-predicate)
(wallpaper--find-setter/set-current-setter)
(wallpaper-set/runs-command, wallpaper-set/runs-command/detach)
(wallpaper-set/calls-init-action)
(wallpaper-set/calls-wallpaper-set-function): New tests.

2 years agosubr.el (inhibit-point-motion-hooks): Mark it as obsolete
Stefan Monnier [Fri, 7 Oct 2022 18:15:40 +0000 (14:15 -0400)]
subr.el (inhibit-point-motion-hooks): Mark it as obsolete

When Emacs-25 changed the default of `inhibit-point-motion-hooks` to t,
/etc/NEWS declared it as obsolete and so did its docstring, but
it was not marked as obsolete so as not to emit too many warnings
in code where it was impractical to remove the let-binding while
keeping backward compatibility with older Emacsen.
Those backward compatibility issues are not serious any more now that
Emacs-25 is itself considered old.

* lisp/subr.el (inhibit-point-motion-hooks): Mark it as obsolete.
* src/textprop.c (inhibit-point-motion-hooks): Don't mention it being
obsolete in the docstring any more.
* lisp/simple.el (line-move-1, line-move-finish): Silence warnings.

2 years ago* lisp/isearch.el (isearch-search): Don't bind `inhibit-point-motion-hooks`
Stefan Monnier [Fri, 7 Oct 2022 18:07:17 +0000 (14:07 -0400)]
* lisp/isearch.el (isearch-search): Don't bind `inhibit-point-motion-hooks`

The let-binding was added back in 1997 (commit 79c7a4fa5f974a9d3b)
"because we might have to search inside invisible and intangible text".
So it's been redundant since Emacs-25 changed the default to t.

2 years agoverilog-mode.el: Don't bind `inhibit-point-motion-hooks`
Stefan Monnier [Fri, 7 Oct 2022 17:54:36 +0000 (13:54 -0400)]
verilog-mode.el: Don't bind `inhibit-point-motion-hooks`

Keep binding it in Emacs<25 but not in Emacs≥25 (where such bindings
are redundant and the var is declared obsolete).

* lisp/progmodes/verilog-mode.el (verilog-save-buffer-state):
Don't bind `inhibit-point-motion-hooks` if Emacs≥25.
(verilog-save-font-no-change-functions): Same, and refrain from
binding `before/after-change-functions` as well while we're at it,
since `inhibit-modification-hooks` already covers it in Emacs≥25.

2 years ago(nxml-with-invisible-motion): Delete macro.
Stefan Monnier [Fri, 7 Oct 2022 17:25:36 +0000 (13:25 -0400)]
(nxml-with-invisible-motion): Delete macro.

Don't use this macro any more since it doesn't do anything since Emacs-25
changed the default of `inhibit-point-motion-hooks` to t.

* lisp/nxml/nxml-util.el (nxml-with-invisible-motion): Delete macro.
* lisp/nxml/nxml-mode.el (nxml-mode, nxml-cleanup):
* lisp/nxml/rng-valid.el (rng-do-some-validation):
* lisp/nxml/rng-nxml.el (rng-set-state-after): Don't use it.

2 years ago* lisp/pcomplete.el (pcomplete-arg): Simplify
Stefan Monnier [Fri, 7 Oct 2022 16:54:29 +0000 (12:54 -0400)]
* lisp/pcomplete.el (pcomplete-arg): Simplify

2 years ago(line-move-1): Obey `inhibit-point-motion-hooks`
Stefan Monnier [Fri, 7 Oct 2022 16:51:14 +0000 (12:51 -0400)]
(line-move-1): Obey `inhibit-point-motion-hooks`

`line-move-1` was written back before `inhibit-point-motion-hooks`
was made obsolete and it's written under the assumption that its
value is nil, whereas since Emacs-25 it's t.

To work around problems linked to a nil value of
`inhibit-point-motion-hooks`, the code temporarily binds that var to
t while it moves around trying to find the final destination and then
later in a few key spots it binds it "back" to nil so as to run the
point-motion hooks according to the final destination, as if the
overall motion had been made "normally".

Change the code so that the "bind back" indeed binds the var back to
the value it had originally, rather than always to nil.

* lisp/simple.el (line-move-1): Obey `inhibit-point-motion-hooks`
(line-move-finish): New optional arg `not-ipmh`.

2 years agoorg.el: Improve bindings of `inhibit-*` vars
Stefan Monnier [Fri, 7 Oct 2022 16:29:56 +0000 (12:29 -0400)]
org.el: Improve bindings of `inhibit-*` vars

Remove binding of `inhibit-point-motion-hooks` (it's t by default
anyway and it's obsolete) and don't "manually" bind
`inhibit-modification-hooks`.

* lisp/org/org.el (org-unfontify-region): Use `with-silent-modifications`.
(org-display-inline-remove-overlay): Remove ineffective binding of
`inhibit-modification-hooks` around code which doesn't modify the
buffer anyway.

2 years agoRemove aliases of `with-silent-modifications`
Stefan Monnier [Fri, 7 Oct 2022 16:25:09 +0000 (12:25 -0400)]
Remove aliases of `with-silent-modifications`

There were many reinventions of `with-silent-modifications` (tho
many of them weren't reinventions but copy&paste of code from
font-lock, IIUC).  Now that those don't even need to let-bind
`inhibit-point-motion-hooks` they're really just obsolete.

* lisp/font-lock.el (save-buffer-state): Delete macro.
(font-lock-unfontify-region, font-lock-default-fontify-region):
Use `with-silent-modifications` instead.
(font-lock-after-change-function, font-lock-fontify-block): Don't
let-bind `inhibit-point-motion-hooks`.

* lisp/htmlfontify.el (hfy-save-buffer-state): Delete macro.
(hfy-mark-trailing-whitespace, hfy-unmark-trailing-whitespace):
Use `with-silent-modifications` instead.

* lisp/jit-lock.el (with-buffer-prepared-for-jit-lock): Delete macro.
(jit-lock--debug-fontify, jit-lock-refontify, jit-lock-function)
(jit-lock-fontify-now, jit-lock-force-redisplay)
(jit-lock-deferred-fontify, jit-lock-context-fontify)
(jit-lock-after-change): Use `with-silent-modifications` instead.

* lisp/progmodes/antlr-mode.el (save-buffer-state-x): Delete macro.
(antlr-hide-actions): Use `with-silent-modifications` instead.

* lisp/progmodes/hideshow.el (hs-life-goes-on): Don't
let-bind `inhibit-point-motion-hooks`.

2 years agoRemove redundant let-bindings of `inhibit-point-motion-hooks`
Stefan Monnier [Fri, 7 Oct 2022 16:16:47 +0000 (12:16 -0400)]
Remove redundant let-bindings of `inhibit-point-motion-hooks`

`inhibit-point-motion-hooks` has defaulted to t (and been declared
obsolete) since Emacs-25, so remove left-over bindings to that
now default value.

* lisp/dabbrev.el (dabbrev--search):
* lisp/format.el (format-insert-file):
* lisp/forms.el (forms-next-field, forms-prev-field):
* lisp/minibuf-eldef.el (minibuf-eldef-setup-minibuffer):
* lisp/simple.el (primitive-undo):
* lisp/cedet/semantic/edit.el (semantic-change-function):
* lisp/cedet/srecode/fields.el (srecode-field-mod-hook):
* lisp/cedet/srecode/insert.el (srecode-insert-fcn):
* lisp/erc/erc-button.el (erc-button-add-buttons):
* lisp/erc/erc.el (erc-display-line):
* lisp/eshell/em-script.el (eshell-source-file):
* lisp/eshell/em-smart.el (eshell-smart-scroll-window):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/esh-cmd.el (eshell-with-temp-command):
* lisp/eshell/esh-mode.el (eshell-send-input, eshell-output-filter):
* lisp/gnus/gnus-art.el (gnus-with-article-headers)
(article-hide-headers, article-hide-boring-headers)
(article-decode-mime-words, article-decode-charset)
(article-decode-encoded-words, article-decode-group-name)
(article-decode-idna-rhs, article-hide-list-identifiers)
(article-strip-banner, article-really-strip-banner)
(article-strip-leading-blank-lines)
(article-strip-multiple-blank-lines, article-strip-leading-space)
(article-strip-trailing-space, article-strip-all-blank-lines)
(gnus-article-narrow-to-signature, gnus-article-show-hidden-text)
(article-date-ut, article-verify-x-pgp-sig)
(gnus-article-only-boring-p, gnus-article-highlight-signature)
(gnus-article-add-buttons, gnus-signature-toggle, gnus-button-push):
* lisp/gnus/gnus-cite.el (gnus-article-highlight-citation)
(gnus-article-fill-cited-article, gnus-article-hide-citation)
(gnus-article-toggle-cited-text, gnus-article-hide-citation-maybe)
(gnus-cite-parse-wrapper, gnus-cite-add-face, gnus-cite-toggle):
* lisp/gnus/gnus-gravatar.el (gnus-gravatar-insert):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-sum.el (gnus-summary-toggle-header):
* lisp/gnus/gnus-util.el (gnus-fetch-field):
* lisp/gnus/message.el (message-fetch-field, message-reply)
(message-followup, message-hide-headers):
* lisp/net/goto-addr.el (goto-address-fontify):
* lisp/obsolete/linum.el (linum-update-window):
* lisp/play/zone.el (zone-shift-left, zone-shift-right)
(zone-fill-out-screen):
* lisp/progmodes/opascal.el (opascal-save-excursion):
* lisp/progmodes/vhdl-mode.el (vhdl-prepare-search-2):
* lisp/textmodes/enriched.el (enriched-encode):
* lisp/textmodes/flyspell.el (flyspell-word-search-backward)
(flyspell-word-search-forward):
* lisp/textmodes/table.el (table--point-entered/left-cell-function):
Remove let-binding of `inhibit-point-motion-hooks`.

2 years agoUpdate name of hs-mouse-toggle-hiding in Emacs manual
Lars Ingebrigtsen [Fri, 7 Oct 2022 12:40:38 +0000 (14:40 +0200)]
Update name of hs-mouse-toggle-hiding in Emacs manual

* doc/emacs/programs.texi (Hideshow): Update the name of
hs-mouse-toggle-hiding (bug#58331).

2 years agoHandle successive mime sections in decoding.
Matt Armstrong [Fri, 7 Oct 2022 12:17:50 +0000 (08:17 -0400)]
Handle successive mime sections in decoding.

rmailsum.el (rmail-epa-decode):Handle blank lines at start.
Handle both ending delim and another starting delim.

2 years agoSpeed up string-lessp for multibyte strings
Mattias Engdegård [Thu, 6 Oct 2022 15:46:02 +0000 (17:46 +0200)]
Speed up string-lessp for multibyte strings

Improve comparison speed when both arguments are multibyte strings,
at least one of them containing a non-ASCII character.  (All-ASCII
multibyte strings are already fast.)
The speed-up is about 2× for strings of 10 chars, 10× for strings of
100 chars.

* src/fns.c (Fstring_lessp): Quickly skip the common prefix by
comparing words.

2 years agoClearer byte-compiler arity warnings (bug#58319)
Mattias Engdegård [Fri, 7 Oct 2022 09:43:19 +0000 (11:43 +0200)]
Clearer byte-compiler arity warnings (bug#58319)

* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature-string):
Replace '3+' and '3-4' with '3 or more' and '3 or 4', respectively.

2 years agocomint-fontify-input: Don't fontify output as input, different approach
Miha Rihtaršič [Thu, 6 Oct 2022 18:22:39 +0000 (20:22 +0200)]
comint-fontify-input: Don't fontify output as input, different approach

* lisp/comint.el (comint-output-filter): Propertize process output
with field=output before inserting it into buffer to prevent
comint-fontify-input from fontifying it (bug#58169).

2 years agoRevert "comint-fl: Prevent fontification of output as input"
Miha Rihtaršič [Thu, 6 Oct 2022 17:06:37 +0000 (19:06 +0200)]
Revert "comint-fl: Prevent fontification of output as input"

This reverts commit 90744ff0be581b69cedea1194b7e78265bdb67a4.

2 years ago* lisp/dired.el (dired-make-relative): Make change less aggressive.
Michael Albinus [Fri, 7 Oct 2022 11:14:46 +0000 (13:14 +0200)]
* lisp/dired.el (dired-make-relative): Make change less aggressive.

2 years agoHandle IM server disconnects during preedit
Po Lu [Fri, 7 Oct 2022 10:39:17 +0000 (18:39 +0800)]
Handle IM server disconnects during preedit

* src/xterm.c (x_maybe_clear_preedit): New function.
(xim_destroy_callback): Call that function.

2 years agoImprove package-check-signature docstring
Stefan Kangas [Fri, 7 Oct 2022 09:20:37 +0000 (11:20 +0200)]
Improve package-check-signature docstring

* lisp/emacs-lisp/package.el (package-check-signature): Improve
docstring.

2 years ago; Make wallpaper--format-arg more resilient
Stefan Kangas [Fri, 7 Oct 2022 08:53:55 +0000 (10:53 +0200)]
; Make wallpaper--format-arg more resilient

* lisp/image/wallpaper.el (wallpaper--format-arg): Make more
resilient to errors.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 7 Oct 2022 04:30:21 +0000 (06:30 +0200)]
Merge from origin/emacs-28

5f8849425c Fix typo in `(emacs) Lisp Doc'
f0a06364fb Fix references to 'default-indent-new-line'

2 years agoBetter support for remote file names in dired
Michael Albinus [Thu, 6 Oct 2022 20:18:21 +0000 (22:18 +0200)]
Better support for remote file names in dired

* lisp/dired.el (dired-make-relative): Expand DIR anyway, because
it could also be an abbreviated remote file name.  (Bug#58300)