]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix compilation-mode parsing of file names in Gradle errors
Lars Ingebrigtsen [Wed, 29 Jun 2022 09:53:16 +0000 (11:53 +0200)]
Fix compilation-mode parsing of file names in Gradle errors

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Fix parsing of file names
in Gradle output (bug#56249).

2 years ago* lisp/pgtk-dnd.el (pgtk-dnd-use-offix-drop): Remove extra variable.
Po Lu [Wed, 29 Jun 2022 07:59:56 +0000 (15:59 +0800)]
* lisp/pgtk-dnd.el (pgtk-dnd-use-offix-drop): Remove extra variable.

2 years agoClean up failable requests in more places
Po Lu [Wed, 29 Jun 2022 07:09:17 +0000 (15:09 +0800)]
Clean up failable requests in more places

* lisp/term/haiku-win.el (haiku-get-numeric-enum): Fix build.

* src/xterm.c (x_clean_failable_requests): Avoid redundant
memcpy if first == last.
(x_ignore_errors_for_next_request): Fix check for last request.
(x_check_errors, x_had_errors_p): Clean up failable requests
here.

2 years agoHandle be:actions field in Haiku DND messages
Po Lu [Wed, 29 Jun 2022 06:05:25 +0000 (06:05 +0000)]
Handle be:actions field in Haiku DND messages

* lisp/term/haiku-win.el (haiku-get-numeric-enum): New function.
(haiku-numeric-enum): New macro.
(haiku-select-encode-xstring, haiku-select-encode-utf-8-string):
Replace hard-coded numeric enumerators.
(haiku-parse-drag-actions): New function.
(haiku-drag-and-drop): Use action returned by that function.
(x-begin-drag): Replace hard-coded enumerator.

2 years agoEnsure correct toggle menu item display
Gerd Möllmann [Wed, 29 Jun 2022 05:53:35 +0000 (07:53 +0200)]
Ensure correct toggle menu item display

* lisp/menu-bar.el (menu-bar-make-toggle-command): Call
force-mode-line-update. (Bug#56155)

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

2eba8cad20 Tramp shall not trap unrelated D-Bus errors
a8e72eb0e2 ; * etc/NEWS: Fix file name quotations.
091b22cb12 Fix hash table function return values in manual

# Conflicts:
# etc/NEWS

2 years agoFix reported problem with drag-and-drop inside VirtualBox
Po Lu [Wed, 29 Jun 2022 02:24:14 +0000 (10:24 +0800)]
Fix reported problem with drag-and-drop inside VirtualBox

* lisp/x-dnd.el (x-dnd-handle-old-kde, x-dnd-handle-offix)
(x-dnd-handle-motif): Select window before handling drop, like
on Xdnd.
(x-dnd-convert-to-offix, x-dnd-do-offix-drop)
(x-dnd-handle-unsupported-drop): Accept local selection data and
use that instead.

* src/keyboard.c (kbd_buffer_get_event): Call unsupported drop
function with local selection data as 8th arg.
* src/xselect.c (x_get_local_selection): Accept new arg
`local_value'.  All callers changed.
(Fx_get_local_selection): New function.
(syms_of_xselect): Update defsubrs.

* src/xterm.c (x_dnd_lose_ownership): New function.
(x_dnd_begin_drag_and_drop): Unless new variable is true, disown
XdndSelection after returning.  This supposedly makes
drag-and-drop from guest to host work in VirtualBox without
causing pointer motion to become choppy afterwards.
(syms_of_xterm): New variable `x_dnd_preserve_selection_data'
and update doc string of `x-dnd-unsupported-drop-function'.

* test/lisp/dnd-tests.el (dnd-tests-begin-text-drag)
(dnd-tests-begin-file-drag, dnd-tests-begin-drag-files): Set new
variable to nil during tests.

2 years agoFix typo in previous maintaining.texi change
Lars Ingebrigtsen [Tue, 28 Jun 2022 20:04:30 +0000 (22:04 +0200)]
Fix typo in previous maintaining.texi change

* doc/emacs/maintaining.texi (Looking Up Identifiers): Fix typo.

2 years ago* lisp/isearch.el (isearch-delete-char): Improve fix for bug#52248.
Juri Linkov [Tue, 28 Jun 2022 17:20:21 +0000 (20:20 +0300)]
* lisp/isearch.el (isearch-delete-char): Improve fix for bug#52248.

When reaching the top of the stack where isearch-other-end is nil,
still close unnecessary overlays for the previous position.
(isearch-close-unnecessary-overlays): Rename arg BEG for consistency.

2 years agotrouble.texi (Long Lines): Fix typo.
Visuwesh [Tue, 28 Jun 2022 15:41:32 +0000 (17:41 +0200)]
trouble.texi (Long Lines): Fix typo.

* doc/emacs/trouble.texi (Long Lines): Fix typo (bug#56283).

2 years agoPut the obsoletion earlier in the *Help* buffer
Lars Ingebrigtsen [Tue, 28 Jun 2022 13:22:13 +0000 (15:22 +0200)]
Put the obsoletion earlier in the *Help* buffer

* lisp/help-fns.el (help-fns--obsolete): Remove indentation and fill.
(help-fns--var-obsolete): Ditto.
(describe-function-1): Output the obsoletion info first since it's
vital information.
(describe-variable): Ditto (bug#56251).

2 years agoImprove sxhash-equal documentation
Lars Ingebrigtsen [Tue, 28 Jun 2022 12:58:20 +0000 (14:58 +0200)]
Improve sxhash-equal documentation

* doc/lispref/hash.texi (Defining Hash): Explain more about what
sxhash-equal is for and what the caveats are.
* src/fns.c (Fsxhash_eql, Fsxhash_equal): Clarify doc string.

2 years agoAllow using define-short-documentation-group without loading shortdoc
Lars Ingebrigtsen [Tue, 28 Jun 2022 12:41:32 +0000 (14:41 +0200)]
Allow using define-short-documentation-group without loading shortdoc

* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
Allow using without loading shortdoc.el (bug#56260).

2 years agoTramp shall not trap unrelated D-Bus errors
Michael Albinus [Tue, 28 Jun 2022 12:41:45 +0000 (14:41 +0200)]
Tramp shall not trap unrelated D-Bus errors

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector): Declare.
(tramp-gvfs-file-name-handler): Let-bind it.
(tramp-gvfs-dbus-event-vector): Fix docstring.
(tramp-gvfs-maybe-open-connection): Do not set it globally.  (Bug#56162)

2 years ago; * etc/NEWS: Fix file name quotations.
Michael Albinus [Tue, 28 Jun 2022 12:40:52 +0000 (14:40 +0200)]
; * etc/NEWS: Fix file name quotations.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 28 Jun 2022 12:38:39 +0000 (15:38 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; Fix documentation of 'rename-visited-file'
Eli Zaretskii [Tue, 28 Jun 2022 12:37:55 +0000 (15:37 +0300)]
; Fix documentation of 'rename-visited-file'

* etc/NEWS: Move to proper place and mark as documented.

* doc/emacs/files.texi (Save Commands): Fix typo.

2 years agoClarify Looking Up Identifiers in the manual
Lars Ingebrigtsen [Tue, 28 Jun 2022 12:33:23 +0000 (14:33 +0200)]
Clarify Looking Up Identifiers in the manual

* doc/emacs/maintaining.texi (Looking Up Identifiers): Clarify the
text about C-M-, (bug#56261).

2 years agoAdd new command `rename-visited-file'
Zachary Kanfer [Tue, 28 Jun 2022 12:13:58 +0000 (14:13 +0200)]
Add new command `rename-visited-file'

* doc/emacs/files.texi (Save Commands): Document it.

* lisp/files.el (rename-visited-file): New command (bug#56229).

2 years agoFix configure.ac quoting of AC_CHECK_LIB's 2nd arg
Jim Meyering [Mon, 27 Jun 2022 04:26:01 +0000 (21:26 -0700)]
Fix configure.ac quoting of AC_CHECK_LIB's 2nd arg

Running an autoconf-head-generated configure, would fail like this:
  /emacs/configure: line 18002: syntax error near unexpected token `;;'
  /emacs/configure: line 18002: `  ;;'
That is due to under-quoting of AC_CHECK_LIB's second argument, which led to
the comma in an embedded string being interpreted as paramater-delimiting.
* configure.ac: Quote the second arg of each AC_CHECK_LIB invocation.
(Bug#56272)

Copyright-paperwork-exempt: yes

2 years agoAdjust x-clipboard-yank for recent selection ownership changes
Po Lu [Tue, 28 Jun 2022 10:25:50 +0000 (18:25 +0800)]
Adjust x-clipboard-yank for recent selection ownership changes

* lisp/term/x-win.el (x-clipboard-yank): Don't own CLIPBOARD
inside kill-new.

2 years agoClean up Fx_begin_drag
Po Lu [Tue, 28 Jun 2022 07:31:09 +0000 (15:31 +0800)]
Clean up Fx_begin_drag

* src/xfns.c (Fx_begin_drag): Use FOR_EACH_TAIL instead of
iterating manually.

2 years agoAutomatically detect cyclic lists in some Haiku functions
Po Lu [Tue, 28 Jun 2022 05:43:13 +0000 (05:43 +0000)]
Automatically detect cyclic lists in some Haiku functions

* src/haikuselect.c (haiku_lisp_to_message): Use FOR_EACH_TAIL
to iterate over message data.

2 years agoFix hash table function return values in manual
Basil L. Contovounesios [Sat, 21 May 2022 20:11:33 +0000 (23:11 +0300)]
Fix hash table function return values in manual

* doc/lispref/hash.texi (Hash Access): Reconcile documented return
values of puthash and clrhash with their respective
docstrings (bug#55562).

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

a280df4cab ; Mention in NEWS the need to use --bindir

# Conflicts:
# etc/NEWS

2 years agoFix handling "C-S-u" and such when using XKB
Po Lu [Tue, 28 Jun 2022 01:42:40 +0000 (09:42 +0800)]
Fix handling "C-S-u" and such when using XKB

* src/xterm.c (handle_one_xevent): Don't rely on XKB for
consumed modifiers.

2 years agoAlways use XKB to translate keysyms when no input method is available
Po Lu [Tue, 28 Jun 2022 01:40:22 +0000 (09:40 +0800)]
Always use XKB to translate keysyms when no input method is available

* src/xterm.c (handle_one_xevent) [HAVE_XKB]: Also use XKB to
handle core KeyPress events.

2 years ago* lisp/subr.el (plistp): Simplify (bug#47427).
Basil L. Contovounesios [Mon, 27 Jun 2022 20:20:55 +0000 (23:20 +0300)]
* lisp/subr.el (plistp): Simplify (bug#47427).

2 years ago"make clean" etc. problem now fixed on Solaris.
Paul Eggert [Mon, 27 Jun 2022 13:29:32 +0000 (08:29 -0500)]
"make clean" etc. problem now fixed on Solaris.

2 years agoPrevent regexp cache entries from being GC'ed in more cases
Gerd Möllmann [Fri, 24 Jun 2022 08:44:17 +0000 (10:44 +0200)]
Prevent regexp cache entries from being GC'ed in more cases

* src/search.c (string_match_1, fast_string_match_internal)
(fast_c_string_match_ignore_case): Use freeze_pattern.
(Bug#56108)

2 years ago; Mention in NEWS the need to use --bindir
Eli Zaretskii [Mon, 27 Jun 2022 12:57:36 +0000 (15:57 +0300)]
; Mention in NEWS the need to use --bindir

* etc/NEWS: Mention the need to use --bindir= at configure time
when installing outside of the ${prefix} tree.  (Bug#46790)

2 years agoFix deletion of composed text
Eli Zaretskii [Mon, 27 Jun 2022 12:32:53 +0000 (15:32 +0300)]
Fix deletion of composed text

* lisp/composite.el (lgstring-glyph-boundary): New function.
* lisp/simple.el (delete-forward-char): Call
'lgstring-glyph-boundary' to find where to end the deletion inside
an automatic composition.  (Bug#56237)

2 years agoFix some missed Fplist_put adjustments in src/w32.c
Lars Ingebrigtsen [Mon, 27 Jun 2022 10:39:42 +0000 (12:39 +0200)]
Fix some missed Fplist_put adjustments in src/w32.c

* src/w32.c (serial_configure): Adjust some missed Fplist_put renames.

2 years agoAdd new type predicate plistp
Lars Ingebrigtsen [Mon, 27 Jun 2022 10:36:37 +0000 (12:36 +0200)]
Add new type predicate plistp

* lisp/subr.el (plistp): New type predicate (bug#47427).  This
referred to in the error message from plist-put: "Debugger
entered--Lisp error: (wrong-type-argument plistp (a b c))".

2 years agoAdjust plist calls in .m files
Lars Ingebrigtsen [Mon, 27 Jun 2022 10:26:19 +0000 (12:26 +0200)]
Adjust plist calls in .m files

* src/nsterm.m (mod_of_kind):
* src/nsimage.m (ns_load_image): Adjust plist calls in .m files.

2 years agoAllow plist-get/plist-put/plist-member to take a comparison function
Lars Ingebrigtsen [Mon, 27 Jun 2022 10:22:05 +0000 (12:22 +0200)]
Allow plist-get/plist-put/plist-member to take a comparison function

* doc/lispref/lists.texi (Plist Access): Document it.

* lisp/filesets.el (filesets-reset-fileset)
(filesets-ingroup-cache-get):
(filesets-ingroup-cache-put):
(filesets-build-menu-now): Don't use lax-plist functions.

* lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from
fns.c and make obsolete.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark
plist functions as side-effect-free or pure.

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type.

* lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated
functions.

* src/xdisp.c (build_desired_tool_bar_string):
(display_mode_element):
(store_mode_line_string):
(display_string):
(produce_stretch_glyph):
(note_mode_line_or_margin_highlight):
(note_mouse_highlight):
* src/w32.c (serial_configure):
* src/sysdep.c (serial_configure):
* src/sound.c (parse_sound):
* src/process.c (Fset_process_buffer):
(Fset_process_sentinel):
(Fprocess_contact):
(Fmake_process):
(Fmake_pipe_process):
(Fset_network_process_option):
(Fserial_process_configure):
(Fmake_serial_process):
(set_network_socket_coding_system):
(finish_after_tls_connection):
(connect_network_socket):
(Fmake_network_process):
(server_accept_connection):
* src/lread.c (ADDPARAM):
(hash_table_from_plist):
* src/keyboard.c (make_lispy_position):
* src/indent.c (check_display_width):
* src/image.c (postprocess_image):
* src/gnutls.c (gnutls_verify_boot):
(Fgnutls_boot):
(gnutls_symmetric):
(Fgnutls_hash_mac):
(Fgnutls_hash_digest):
* src/dired.c (filter):
* src/data.c (add_to_function_history):
* src/coding.c (Fcoding_system_put): Adjust callers from
Fplist_put (etc) to plist_put.

* src/fns.c (plist_get):
(plist_put):
(plist_member): New functions (without optional third parameter)
to be used in C code.

* src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an
optional predicate parameter (bug#47425).

* src/lisp.h: Declare new plist_put, plist_get and plist_member
functions.

* test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get.

* test/src/fns-tests.el (test-cycle-lax-plist-get):
(test-cycle-lax-plist-put):
(lax-plist-get/odd-number-of-elements):
(test-plist): Remove lax-plist tests, since semantics have changed
(they no longer error out on cycles).

2 years agoAdd NEWS entry about C-h v font locking
Lars Ingebrigtsen [Mon, 27 Jun 2022 08:11:06 +0000 (10:11 +0200)]
Add NEWS entry about C-h v font locking

2 years agoFix detecting dotted pairs in icalendar-export-region
hokomo [Mon, 27 Jun 2022 08:03:30 +0000 (10:03 +0200)]
Fix detecting dotted pairs in icalendar-export-region

* lisp/calendar/icalendar.el (icalendar-export-region): Fix detecting
dotted pairs (bug#56241).
Copyright-paperwork-exempt: yes

2 years agofind-dired: Add find-dired-with-command
Allen Li [Mon, 27 Jun 2022 07:46:27 +0000 (09:46 +0200)]
find-dired: Add find-dired-with-command

Add a command that runs and sets up the find-dired buffer with an
arbitrary find command.  Also rewrite the existing find-dired commands
using it.

The set of commands possible with find-dired is limited; the new
command allows users to run the full set of commands, but also leaves
the responsibility to the user to construct the command manually.

* lisp/find-dired.el (find-command-history): New var.
(find-dired-with-command): New command.
(find-dired): Rewritten with new command.

2 years agofind-dired: Factor out find-dired--escaped-ls-option
Allen Li [Mon, 27 Jun 2022 07:44:29 +0000 (09:44 +0200)]
find-dired: Factor out find-dired--escaped-ls-option

Deduplicate this logic for other future find-dired commands.

* lisp/find-dired.el (find-dired--escaped-ls-option): New function.
(find-dired): Use find-dired--escaped-ls-option.

2 years agoFix off-by-one error in Fsignal_names
Lars Ingebrigtsen [Mon, 27 Jun 2022 07:02:26 +0000 (09:02 +0200)]
Fix off-by-one error in Fsignal_names

* src/process.c (Fsignal_names): Fix off-by-one error.

2 years agoUse correct background for image mask color on Haiku
Po Lu [Mon, 27 Jun 2022 06:21:16 +0000 (06:21 +0000)]
Use correct background for image mask color on Haiku

* src/haikuterm.c (haiku_draw_image_glyph_string): Use adjusted
background for image mask.

2 years agoImplement stipples for images on Haiku
Po Lu [Mon, 27 Jun 2022 06:16:52 +0000 (06:16 +0000)]
Implement stipples for images on Haiku

* src/haiku_draw_support.cc (be_draw_bitmap_with_mask): New
function.
* src/haiku_support.h: Add prototype.

* src/haikuterm.c (haiku_draw_image_glyph_string): Draw stipple
correctly.
(haiku_draw_glyph_string): Fix conditions under which
row->stipple_p is set.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 27 Jun 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28

48bda83d35 Update to Org 9.5.4-3-g6dc785
c66b90a534 Mention Solaris 10 'make clean' and 'make check'
ade34cf821 Mention further crashes on Solaris 10

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Mon, 27 Jun 2022 04:30:25 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

fd04009d16 Port distribution tarball to Solaris 10

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 27 Jun 2022 04:30:24 +0000 (06:30 +0200)]
Merge from origin/emacs-28

a9d338818a ; elec-pair: Fix docstring typo (bug#56233)

2 years agoUpdate to Org 9.5.4-3-g6dc785
Kyle Meyer [Mon, 27 Jun 2022 03:00:38 +0000 (23:00 -0400)]
Update to Org 9.5.4-3-g6dc785

2 years agoCorrectly convert event state in more places
Po Lu [Mon, 27 Jun 2022 01:13:33 +0000 (09:13 +0800)]
Correctly convert event state in more places

* src/xterm.c (handle_one_xevent): Use `xi_convert_event_state'
to handle synthetic and xwidget button events.

2 years agoMention Solaris 10 'make clean' and 'make check'
Paul Eggert [Sun, 26 Jun 2022 22:36:22 +0000 (17:36 -0500)]
Mention Solaris 10 'make clean' and 'make check'

2 years agoMention further crashes on Solaris 10
Paul Eggert [Sun, 26 Jun 2022 22:23:20 +0000 (17:23 -0500)]
Mention further crashes on Solaris 10

2 years agoMinor clean up of previous Fsignal_names patch
Lars Ingebrigtsen [Sun, 26 Jun 2022 20:50:50 +0000 (22:50 +0200)]
Minor clean up of previous Fsignal_names patch

* src/process.c (Fsignal_names): Clean up code slightly.

2 years agoMake `signal-process' allow completing over signal names
Lars Ingebrigtsen [Sun, 26 Jun 2022 20:45:39 +0000 (22:45 +0200)]
Make `signal-process' allow completing over signal names

* lisp/simple.el (read-signal-name): New function.
* src/process.c (Fsignal_process): Use it to allow completing over
the signal names (bug#56239).
(Fsignal_names): New function.

2 years agoFont-lock variable values in *Help*
Lars Ingebrigtsen [Sun, 26 Jun 2022 19:41:42 +0000 (21:41 +0200)]
Font-lock variable values in *Help*

* lisp/help-fns.el (describe-variable): Font-lock the variable
value (bug#47363).

2 years agoOptimise away functions in for-effect context
Mattias Engdegård [Sun, 26 Jun 2022 16:46:13 +0000 (18:46 +0200)]
Optimise away functions in for-effect context

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Turn functions into nil when compiled for-effect since they have no
side-effects on their own.  This may enable further improvements such
as the elimination of variable bindings.
`unwind-protect` forms can be treated as plain function call at this
point.  In particular, their unwind function argument should be
not optimised for effect since it's a function.

2 years ago(oclosure-test-limits): Fix test failure when interpreted
Stefan Monnier [Sun, 26 Jun 2022 17:15:15 +0000 (13:15 -0400)]
(oclosure-test-limits): Fix test failure when interpreted

* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test-limits):
Make sure we bind `byte-compile-debug` dynamically.

2 years agoFix re-composition under 'composition-break-at-point'
Eli Zaretskii [Sun, 26 Jun 2022 16:55:13 +0000 (19:55 +0300)]
Fix re-composition under 'composition-break-at-point'

* src/xdisp.c (try_window_id): Disable this optimization if
'composition-break-at-point' is non-nil.

2 years ago* lisp/simple.el (delete-forward-char): Fix bug #56237.
Eli Zaretskii [Sun, 26 Jun 2022 16:35:57 +0000 (19:35 +0300)]
* lisp/simple.el (delete-forward-char): Fix bug #56237.

2 years agoWhen closing an Eshell process target, send EOF three times
Jim Porter [Sun, 26 Jun 2022 16:27:20 +0000 (18:27 +0200)]
When closing an Eshell process target, send EOF three times

* lisp/eshell/esh-io.el (eshell-close-target): Send EOF 3 times.

* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-tests--deftest):
Re-enable these tests on EMBA.

This patch is adapted by one from Ken Brown, who uncovered the reason
for this bug (bug#56025).

2 years agoReconvert EPUB buffers when user CSS is changed
Kjartan Óli Ágústsson [Sun, 26 Jun 2022 15:52:29 +0000 (17:52 +0200)]
Reconvert EPUB buffers when user CSS is changed

* lisp/doc-view.el (doc-view-epub-user-stylesheet): Add
`doc-view-custom-set-mutool-user-stylesheet' as setter, change name.
(doc-view-custom-set-epub-font-size): Factor reconvert logic out
(doc-view--epub-reconvert): Add defun
(doc-view--epub-stylesheet-watcher): Add defvar
(doc-view-custom-set-epub-user-stylesheet): Add defun (bug#55825).

2 years agoMake <mouse-2> in mode line more careful as well
Visuwesh [Sun, 26 Jun 2022 15:45:45 +0000 (17:45 +0200)]
Make <mouse-2> in mode line more careful as well

* lisp/mouse.el (mouse-delete-other-windows): Only delete other
windows if the user didn't move the cursor off the
mode-line (bug#56198).

2 years agoMake <mouse-3> in the mode line more careful
Visuwesh [Sun, 26 Jun 2022 15:30:04 +0000 (17:30 +0200)]
Make <mouse-3> in the mode line more careful

* lisp/mouse.el (mouse-delete-window): Only delete the window if
the user hasn't moved point out of the mode line before releasing
the button (bug#56198).

2 years agoMake Eshell globs ending in "/" match directories only
Jim Porter [Sun, 26 Jun 2022 01:19:01 +0000 (18:19 -0700)]
Make Eshell globs ending in "/" match directories only

* lisp/eshell/em-glob.el (eshell-glob-convert): Return whether to
match directories only.
(eshell-glob-entries): Add ONLY-DIRS argument.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/match-any-directory): New test.
(em-glob-test/match-recursive)
(em-glob-test/match-recursive-follow-symlinks): Add test cases for
when "**/" or "***/" are the last components in a glob.

* etc/NEWS: Announce this change (bug#56227).

2 years agoConvert Eshell globs ahead of time instead of doing it repeatedly
Jim Porter [Fri, 24 Jun 2022 15:39:42 +0000 (08:39 -0700)]
Convert Eshell globs ahead of time instead of doing it repeatedly

* lisp/eshell/em-glob.el (eshell-glob-recursive): New variable.
(eshell-glob-convert-1, eshell-glob-convert): New functions.
(eshell-extended-glob): Use 'eshell-glob-convert'.
(eshell-glob-entries): Adapt function to use pre-converted globs.

* test/lisp/eshell-em-glob-tests.el (em-glob-test/match-dot-files):
New test.

2 years agoOptionally signal an error if an Eshell predicate fails to match anything
Jim Porter [Sun, 26 Jun 2022 03:05:57 +0000 (20:05 -0700)]
Optionally signal an error if an Eshell predicate fails to match anything

* lisp/eshell/em-pred.el (eshell-error-if-no-glob): Declare it.
(eshell-apply-modifiers): Add STRING-DESC argument and signal an error
if there are no matches and 'eshell-error-if-no-glob' is set.
(eshell-parse-arg-modifier): Pass modifier string to
'eshell-apply-modifiers'.

* test/lisp/eshell/em-pred-tests.el (eshell-eval-predicate): Simplify.
(em-pred-test/no-matches): New test.

* doc/misc/eshell.texi (Bugs and ideas): Remove todo entry about this
change.

2 years agoFix typo in signal-process-functions
Daniel Martín [Sun, 26 Jun 2022 10:27:55 +0000 (12:27 +0200)]
Fix typo in signal-process-functions

* doc/lispref/processes.texi (Signals to Processes): Update reference
to correct default variable in the ELisp manual.
* etc/NEWS: The same for the NEWS entry (bug#56234).

2 years agoUpdate term-char-mode doc string
Lars Ingebrigtsen [Sun, 26 Jun 2022 14:45:09 +0000 (16:45 +0200)]
Update term-char-mode doc string

* lisp/term.el (term-char-mode): Update doc string.

2 years agoFix Bug#56110 (switching from line-mode to char-mode)
Michael Heerdegen [Tue, 21 Jun 2022 11:41:51 +0000 (13:41 +0200)]
Fix Bug#56110 (switching from line-mode to char-mode)

* lisp/term.el (term-char-mode): Make `add-function' override the
correct place (the buffer local variable `term-input-sender').

2 years agoFix a recent Lisp mode filling test failure
Lars Ingebrigtsen [Sun, 26 Jun 2022 14:31:33 +0000 (16:31 +0200)]
Fix a recent Lisp mode filling test failure

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Restore the
"fill first line separately" logic.

2 years agoPort distribution tarball to Solaris 10
Paul Eggert [Sat, 25 Jun 2022 19:51:28 +0000 (14:51 -0500)]
Port distribution tarball to Solaris 10

* make-dist (taropt): Use 'tar -H ustar' to generate a portable
tar file format instead of a GNU-specific format.  Needed now that
Emacs tarballs contain file names longer than 100 bytes, e.g.:
emacs-28.1/test/lisp/gnus/mml-sec-resources/private-keys-v1.d/C072AF82DCCCB9A7F1B85FFA10B802DC4ED16703.key
emacs-28.1/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el
Without this patch, extracting a tarball on Solaris 10 fails with
many diagnostics like “tar: ././@LongLink: typeflag 'L' not
recognized, converting to regular file”.

(cherry picked from commit 4410f5d86997b6b238ff05c2ece338b28e1163b1)

2 years ago* lisp/emacs-lisp/syntax.el: Rework the handling of nested calls.
Stefan Monnier [Sun, 26 Jun 2022 12:59:38 +0000 (08:59 -0400)]
* lisp/emacs-lisp/syntax.el: Rework the handling of nested calls.

Nested calls to `syntax-ppss` and `syntax-propertize` can easily
happen unexpectedly via ondemand propertizing or `forward-sexp`.
Refine the handling of nested calls so we detect them more reliably
(e.g. also within `syntax-propertize-extend-region-functions`)
and so that the `syntax-ppss` cache is automatically flushed in case
it might have been filled with data that's become obsolete since.

(syntax-propertize--inhibit-flush): Delete var.
(syntax-propertize--in-process-p): New function to replace it.
(syntax-ppss-flush-cache): Use it.
(syntax-ppss--updated-cache): New var.
(syntax-propertize): Make `syntax-propertize--done` binding apply to
`syntax-propertize-extend-region-functions` as well, as intended (fixes
bug#46713).  Use `syntax-ppss--updated-cache` to flush
syntax-ppss cache at the end when needed.
Don't bind `syntax-propertize--inhibit-flush` any more.
(syntax-ppss): Set `syntax-ppss--updated-cache` when applicable.

2 years agoDon't create HOME if it doesn't exist
Lars Ingebrigtsen [Sat, 25 Jun 2022 15:28:12 +0000 (17:28 +0200)]
Don't create HOME if it doesn't exist

* lisp/files.el (locate-user-emacs-file): Don't create HOME if it
doesn't exist (bug#47298).  This returns us to Emacs 26.3
behaviour here.

2 years ago; Pacify unknown fun warning in mh-utils-tests.el.
Basil L. Contovounesios [Sun, 26 Jun 2022 12:08:57 +0000 (15:08 +0300)]
; Pacify unknown fun warning in mh-utils-tests.el.

2 years ago; Minor cosmetics adjustment to xterm.c
Po Lu [Sun, 26 Jun 2022 10:14:17 +0000 (18:14 +0800)]
; Minor cosmetics adjustment to xterm.c

* src/xterm.c: Rename xIOErrorHandler & friends to
"Emacs_XIOErrorHandler" so they don't look like X protocol
header types.

2 years agoFix narrowing problem in tramp-debug-buffer-command-completion-p
Michael Albinus [Sun, 26 Jun 2022 08:57:00 +0000 (10:57 +0200)]
Fix narrowing problem in tramp-debug-buffer-command-completion-p

* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing.  (Bug#56225)

2 years ago; elec-pair: Fix docstring typo (bug#56233)
Allen Li [Sun, 26 Jun 2022 07:37:07 +0000 (00:37 -0700)]
; elec-pair: Fix docstring typo (bug#56233)

* lisp/elec-pair.el (electric-pair-post-self-insert-function): Fix typo.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 26 Jun 2022 08:11:28 +0000 (11:11 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoAdd some more common predefined atoms
Po Lu [Sun, 26 Jun 2022 07:36:43 +0000 (15:36 +0800)]
Add some more common predefined atoms

* src/xterm.c (x_intern_cached_atom, x_get_atom_name): Add
DRAWABLE, BITMAP, COLORMAP, CURSOR and FONT.

2 years agoFix ispell-word on colorless TTY frames
Eli Zaretskii [Sun, 26 Jun 2022 07:22:20 +0000 (10:22 +0300)]
Fix ispell-word on colorless TTY frames

* lisp/textmodes/ispell.el
(ispell-highlight-spelling-error-generic): Keep marker position of
END intact, deletion of text notwithstanding.  (Bug#56219)

2 years agoStop catching errors for some requests
Po Lu [Sun, 26 Jun 2022 05:34:43 +0000 (13:34 +0800)]
Stop catching errors for some requests

* src/xterm.c (x_dnd_compute_toplevels)
(frame_set_mouse_pixel_position, x_focus_frame): Use
`x_ignore_errors_for_next_request'.  This results in a healthy
~30% speedup for the involved requests.

2 years agoHandle errors while sending client events asynchronously
Po Lu [Sun, 26 Jun 2022 02:20:35 +0000 (10:20 +0800)]
Handle errors while sending client events asynchronously

* src/xterm.c (xm_send_drop_message)
(xm_send_top_level_enter_message, xm_send_drag_motion_message)
(xm_send_top_level_leave_message, x_dnd_send_enter)
(x_dnd_send_position, x_dnd_send_leave, x_dnd_send_drop): Avoid
sync to check for errors while sending client events.
(x_dnd_begin_drag_and_drop, handle_one_xevent, XTread_socket):
Clean up failable requests.
(x_request_can_fail): New functions.
(x_clean_failable_requests, x_ignore_errors_for_next_request)
(x_uncatch_errors): Clean up failable requests.
(x_error_handler): If a request is allowed to fail, just return.
(x_term_init): Set up new pointer.
* src/xterm.h (N_FAILABLE_REQUESTS): New macro.
(struct x_display_info): New field `failable_requests' and
associated next pointer.

2 years agoPort ‘make clean’ to Solaris 10
Paul Eggert [Sat, 25 Jun 2022 21:45:28 +0000 (16:45 -0500)]
Port ‘make clean’ to Solaris 10

* test/Makefile.in (CLEAN_XML_FILES): New macro.
(clean): Use it.

2 years agoPort distribution tarball to Solaris 10
Paul Eggert [Sat, 25 Jun 2022 19:51:28 +0000 (14:51 -0500)]
Port distribution tarball to Solaris 10

* make-dist (taropt): Use 'tar -H ustar' to generate a portable
tar file format instead of a GNU-specific format.  Needed now that
Emacs tarballs contain file names longer than 100 bytes, e.g.:
emacs-28.1/test/lisp/gnus/mml-sec-resources/private-keys-v1.d/C072AF82DCCCB9A7F1B85FFA10B802DC4ED16703.key
emacs-28.1/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el
Without this patch, extracting a tarball on Solaris 10 fails with
many diagnostics like “tar: ././@LongLink: typeflag 'L' not
recognized, converting to regular file”.

2 years agoPort test SUBDIRS to Solaris 10
Paul Eggert [Sat, 25 Jun 2022 18:09:22 +0000 (13:09 -0500)]
Port test SUBDIRS to Solaris 10

* test/Makefile.in (SUBDIRS): Port to traditional ‘find’, which
lacks -path.

2 years agoPacify Oracle Studio re xterm.c
Paul Eggert [Sat, 25 Jun 2022 18:00:28 +0000 (13:00 -0500)]
Pacify Oracle Studio re xterm.c

* src/xterm.c (xErrorHandler,  xIOErrorHandler):
New typedefs.
(xm_get_drag_window_1, x_connection_closed): Use them instead of
void *, since the C standard frowns on converting function
pointers to and from void *.  This pacifies Oracle Studio
diagnostics like “warning: assignment type mismatch: pointer to
void "=" pointer to function(pointer to struct _XDisplay {})\
returning int”.
(x_detect_pending_selection_requests, x_had_errors_p): Do not rely
on implicit conversion of a pointer to a bool return value; use !!
instead.  This pacifies Oracle Studio’s “warning: improper
pointer/integer combination: op "="”.
(xim_open_dpy) [HAVE_X11R6 && !HAVE_X11R6_XIM]: Do not use
xim_destroy_callback; configure.ac says “inoue@ainet.or.jp says
Solaris has a bug related to X11R6-style ## XIM support” and
Oracle Studio complains “warning: assignment type mismatch:
pointer to function(pointer to struct _XIC {}, pointer to char,
pointer\ to char) returning void "=" pointer to function(pointer
to struct _XIM {}, pointer to char, pointer to char) returning
void”.

2 years agoPacify Oracle Studio re print_vectorlike
Paul Eggert [Sat, 25 Jun 2022 16:44:33 +0000 (11:44 -0500)]
Pacify Oracle Studio re print_vectorlike

* src/print.c (print_vectorlike): Use explicit cast of function
pointer to void *, to pacify Oracle Studio 12.6’s “warning:
assignment type mismatch: pointer to void "=" pointer to
function(pointer to void) returning void”.  Admittedly this is
not strictly conforming C code even with the cast.

2 years agoPacify Oracle Studio re Time_to_position
Paul Eggert [Sat, 25 Jun 2022 16:41:07 +0000 (11:41 -0500)]
Pacify Oracle Studio re Time_to_position

* src/keyboard.c (Time_to_position): Use no-op position_to_Time to
pacify Oracle Studio 12.6’s “warning: initializer will be
sign-extended”.

2 years agoMake `M-q' work on the first line of a multi-line string again
Lars Ingebrigtsen [Sat, 25 Jun 2022 12:58:01 +0000 (14:58 +0200)]
Make `M-q' work on the first line of a multi-line string again

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Exclude the
quote marks from the region so that filling works (bug#56197).

2 years agoUpdate input_pending after deferring selection requests
Po Lu [Sat, 25 Jun 2022 12:07:35 +0000 (20:07 +0800)]
Update input_pending after deferring selection requests

* src/xterm.c (x_defer_selection_requests): If kbd_fetch_ptr
moved, update input_pending.  Bug found calling
`input-pending-p' inside the DND movement function.

2 years agoNew command recentf-open
Stefan Kangas [Sat, 25 Jun 2022 10:55:15 +0000 (12:55 +0200)]
New command recentf-open

* lisp/recentf.el (recentf-open): New command.  (Bug#56148)
(recentf): New alias.
(recentf, recentf-mode): Update documentation to focus more on the
list of recently opened files and ways of accessing it, instead of
focusing on the menu bar only.
(recentf-list, recentf-enabled-p): Minor doc fixes.

* doc/emacs/files.texi (File Conveniences): Update documentation.

2 years agoFix subr-x fix that was missed when re-reverting
Lars Ingebrigtsen [Sat, 25 Jun 2022 10:45:32 +0000 (12:45 +0200)]
Fix subr-x fix that was missed when re-reverting

* lisp/replace.el (require): Fix subr-x build warning.

2 years agoDon't error out on invalid literal key substitutions
Stefan Kangas [Sat, 25 Jun 2022 10:25:58 +0000 (12:25 +0200)]
Don't error out on invalid literal key substitutions

It would be backwards-incompatible to error out on invalid literal key
substitutions.  Consider this docstring fragment, where "\\`" should
have been escaped but wasn't:

    "Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"."

If we error out, we can't display this docstring at all.  However, it
is clearly better to display something in such cases, even if
suboptimal, than refusing to display anything at all.

* lisp/help.el (substitute-command-keys): Don't error out on invalid
literal key substitutions: just ignore them instead.
* test/lisp/help-tests.el
(help-tests-substitute-command-keys/literal-key-sequence-errors):
Delete test.
(help-tests-substitute-command-keys/literal-key-sequence-ignore-invalid):
New test.

2 years agoRe-fix build warnings about subr-x defsubsts
Lars Ingebrigtsen [Sat, 25 Jun 2022 10:20:05 +0000 (12:20 +0200)]
Re-fix build warnings about subr-x defsubsts

* lisp/term/haiku-win.el (require):
* lisp/progmodes/elisp-mode.el (require):
* lisp/isearch.el (require): Require subr-x at compile time, since
these use defsubsts/macros from there.

* lisp/emacs-lisp/subr-x.el (string-empty-p): Move from here...
* lisp/simple.el (string-empty-p): ... to here.  This is to help
with a build problem where files.el is using the defsubst, but
requiring subr-x.el at compile time leads to load errors.

2 years ago; Fix last change regarding 'record-all-keys'
Eli Zaretskii [Sat, 25 Jun 2022 09:33:45 +0000 (12:33 +0300)]
; Fix last change regarding 'record-all-keys'

* src/keyboard.c (syms_of_keyboard):
* etc/NEWS: Minor fixes of documentation of 'record-all-keys'.

2 years agoAvoid recording passwords' chars
Manuel Giraud [Tue, 14 Jun 2022 09:14:02 +0000 (11:14 +0200)]
Avoid recording passwords' chars

* lisp/cus-start.el (standard): New user custom `record-all-keys'.
* src/keyboard.c (syms_of_keyboard): Un-obsolete
`inhibit--record-char'.
* lisp/subr.el (read-passwd): Use `inhibit--record-char' to
inhibit passwords recording.

2 years ago; * CONTRIBUTE: Mention checks performed by commit hooks. (Bug#56108)
Eli Zaretskii [Sat, 25 Jun 2022 09:17:46 +0000 (12:17 +0300)]
; * CONTRIBUTE: Mention checks performed by commit hooks.  (Bug#56108)

2 years agoMinor optimization of the "abort redisplay" feature
Eli Zaretskii [Sat, 25 Jun 2022 07:46:10 +0000 (10:46 +0300)]
Minor optimization of the "abort redisplay" feature

* src/xdisp.c (init_iterator, set_iterator_to_next)
(redisplay_internal):
* src/syntax.c (scan_sexps_forward):
* src/regex-emacs.c (re_match_2_internal):
* src/bidi.c (bidi_fetch_char, bidi_paragraph_init)
(bidi_find_bracket_pairs, bidi_find_other_level_edge): Don't call
'update_redisplay_ticks' if aborting too-long redisplay is
disabled.  (Bug#45898)

2 years agoImplement image transform smoothing on Haiku
Po Lu [Sat, 25 Jun 2022 07:34:43 +0000 (07:34 +0000)]
Implement image transform smoothing on Haiku

* src/dispextern.h (struct image): New field
`use_bilinear_filtering'.
* src/haiku_draw_support.cc (BView_DrawBitmap): Accept it.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_draw_image_glyph_string):
* src/image.c (image_set_transform): Set it.

2 years agoFix false positive due to 'max-redisplay-ticks' feature
Eli Zaretskii [Sat, 25 Jun 2022 07:14:11 +0000 (10:14 +0300)]
Fix false positive due to 'max-redisplay-ticks' feature

* src/xdisp.c (redisplay_internal): Reset the tick count at end of
redisplay cycle.  (Bug#45898)

2 years agoFix non-XI2 build
Po Lu [Sat, 25 Jun 2022 06:38:54 +0000 (14:38 +0800)]
Fix non-XI2 build

* src/xterm.c (handle_one_xevent): Don't make `event' const when
passing it to RandR functions.  Also, update out of date
comment.

2 years ago; Fix typo in last change
Po Lu [Sat, 25 Jun 2022 06:24:18 +0000 (14:24 +0800)]
; Fix typo in last change

; * src/dispextern.h (struct image): Fix typo.