]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Thu, 30 Jun 2022 18:23:42 +0000 (20:23 +0200)]
Regenerate ldefs-boot.el

2 years agoFix define-obsolete-function-alias formatting in loaddefs-gen.el
Lars Ingebrigtsen [Thu, 30 Jun 2022 18:23:32 +0000 (20:23 +0200)]
Fix define-obsolete-function-alias formatting in loaddefs-gen.el

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Fix formatting of define-obsolete-function-alias statements
(bug#56292).

2 years ago(syntax-wholeline-max): New var
Stefan Monnier [Thu, 30 Jun 2022 17:20:33 +0000 (13:20 -0400)]
(syntax-wholeline-max): New var

Try and reduce the pain caused by font-lock and syntax-propertize's
wholeline-based operation in buffers made up of a few very long lines
(bug#45898).

* lisp/emacs-lisp/syntax.el (syntax-wholeline-max): New var.
(syntax--lbp): New function.
(syntax-propertize-wholelines): Use it.

* lisp/jit-lock.el (jit-lock--antiblink-post-command): Use `syntax--lbp`.

* lisp/font-lock.el (font-lock-extend-region-wholelines): Rewrite,
using `syntax-propertize-wholelines`.

2 years ago; * lisp/emacs-lisp/rx.el: Don't set indentation prop for `repeat`.
Mattias Engdegård [Thu, 30 Jun 2022 13:19:15 +0000 (15:19 +0200)]
; * lisp/emacs-lisp/rx.el: Don't set indentation prop for `repeat`.

2 years agoDon't say that macro-expansion error is a warning
Mattias Engdegård [Thu, 30 Jun 2022 12:55:45 +0000 (14:55 +0200)]
Don't say that macro-expansion error is a warning

* lisp/emacs-lisp/gv.el:
* lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load): Since
eager macro-expansion errors are no longer warnings, don't say so.

2 years ago* lisp/eshell/em-term.el (eshell-visual-commands): Add vim.
Stefan Kangas [Thu, 30 Jun 2022 12:58:11 +0000 (14:58 +0200)]
* lisp/eshell/em-term.el (eshell-visual-commands): Add vim.

2 years agoAlso add elisp-eval/byte-compile-buffer to lisp-interaction-mode
Lars Ingebrigtsen [Thu, 30 Jun 2022 12:45:55 +0000 (14:45 +0200)]
Also add elisp-eval/byte-compile-buffer to lisp-interaction-mode

* lisp/progmodes/elisp-mode.el (lisp-interaction-mode-map): Also
add elisp-eval-buffer and elisp-byte-compile-buffer to this map.

2 years agoDon't change indentation rules for `>=` and `=`
Mattias Engdegård [Thu, 30 Jun 2022 12:31:47 +0000 (14:31 +0200)]
Don't change indentation rules for `>=` and `=`

* lisp/emacs-lisp/rx.el: `>=` and `=` are much more likely functions
than RX constructs and the indentation machinery currently has
no way to tell them apart.
Suggested by Michael Herdeegen.

2 years agoFix typo in previous elisp-byte-compile-buffer change
Lars Ingebrigtsen [Thu, 30 Jun 2022 12:29:49 +0000 (14:29 +0200)]
Fix typo in previous elisp-byte-compile-buffer change

* lisp/progmodes/elisp-mode.el (elisp-byte-compile-buffer): Make
warnings point to the correct place.

2 years agoFix up warning links in elisp-byte-compile-buffer
Lars Ingebrigtsen [Thu, 30 Jun 2022 12:29:04 +0000 (14:29 +0200)]
Fix up warning links in elisp-byte-compile-buffer

* lisp/progmodes/elisp-mode.el (elisp-byte-compile-buffer): Make
warnings point to the correct place.

2 years ago; * lisp/emacs-lisp/testcover.el: Remove duplicate provide.
Stefan Kangas [Thu, 30 Jun 2022 12:11:28 +0000 (14:11 +0200)]
; * lisp/emacs-lisp/testcover.el: Remove duplicate provide.

2 years agoNew hook save-place-after-find-file-hook
Stefan Kangas [Thu, 30 Jun 2022 11:47:59 +0000 (13:47 +0200)]
New hook save-place-after-find-file-hook

This is intended for use in Org mode, where we currently use advise.
* lisp/saveplace.el (save-place-after-find-file-hook): New hook.
(save-place-find-file-hook): Run new hook.

2 years agoMake "eager macro-expansion" warning into an error
Lars Ingebrigtsen [Thu, 30 Jun 2022 11:18:15 +0000 (13:18 +0200)]
Make "eager macro-expansion" warning into an error

* doc/lispref/loading.texi (How Programs Do Loading): Update
documentation.

* lisp/emacs-lisp/macroexp.el:
(internal-macroexpand-for-load): We've been warning about eager
macro expansion for many years, so finally change that into an
error (bug#18154).

2 years agoDo NEWS tagging
Lars Ingebrigtsen [Thu, 30 Jun 2022 10:50:45 +0000 (12:50 +0200)]
Do NEWS tagging

2 years agoAdd find-function-setup-keys bindings for find-library commands
Lars Ingebrigtsen [Thu, 30 Jun 2022 10:49:40 +0000 (12:49 +0200)]
Add find-function-setup-keys bindings for find-library commands

* lisp/emacs-lisp/find-func.el (find-function-setup-keys): Add `L'
bindings for the find-library family of commands (bug#51240).

2 years agoRestore temp-buffer-resize-mode behaviour wrt. [back] buttons
Lars Ingebrigtsen [Thu, 30 Jun 2022 10:35:55 +0000 (12:35 +0200)]
Restore temp-buffer-resize-mode behaviour wrt. [back] buttons

* lisp/help.el (help--window-setup): If temp-buffer-resize-mode, do
the window setup after adding [back] buttons (bug#56306).

2 years agoFix typo in previous server.el change
Lars Ingebrigtsen [Thu, 30 Jun 2022 10:13:03 +0000 (12:13 +0200)]
Fix typo in previous server.el change

* lisp/server.el (server-process-filter): Fix typo in previous change.

2 years agoDon't ignore emacsclient's --frame-parameters option when -t
Michael Shields [Thu, 30 Jun 2022 10:10:45 +0000 (12:10 +0200)]
Don't ignore emacsclient's --frame-parameters option when -t

* lisp/server.el (server-process-filter): Add part of patch that
was mistakenly missed when the patch was applied (bug#24147).
This also fixes bug#56309.

2 years agoAdd new commands to elisp mode for eval/compilation
Lars Ingebrigtsen [Thu, 30 Jun 2022 10:00:49 +0000 (12:00 +0200)]
Add new commands to elisp mode for eval/compilation

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-map): Add new
keystrokes.
(elisp-eval-buffer, elisp-byte-compile-file)
(elisp-byte-compile-buffer): New commands.

2 years agoClarify `version-control' in the Emacs manual
Mike Kupfer [Thu, 30 Jun 2022 09:21:12 +0000 (11:21 +0200)]
Clarify `version-control' in the Emacs manual

* doc/emacs/files.texi (Backup Names): Rephrase for greater
clarity (bug#56291).

2 years agoRecognize Gradle error messages in compile-mode
Lars Ingebrigtsen [Thu, 30 Jun 2022 09:04:15 +0000 (11:04 +0200)]
Recognize Gradle error messages in compile-mode

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Recognize Gradle errors
(bug#56249).

2 years agoAdd provide to testcover
Lars Ingebrigtsen [Thu, 30 Jun 2022 08:58:14 +0000 (10:58 +0200)]
Add provide to testcover

* lisp/emacs-lisp/testcover.el (testcover): Provide (bug#55388).

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Thu, 30 Jun 2022 08:47:34 +0000 (10:47 +0200)]
Regenerated ldefs-boot.el

2 years agoAdd new commands to zoom emojis
Lars Ingebrigtsen [Thu, 30 Jun 2022 08:46:59 +0000 (10:46 +0200)]
Add new commands to zoom emojis

* lisp/international/emoji.el (emoji-zoom-map)
(emoji-zoom-increase, emoji-zoom-decrease): New commands.

* lisp/international/mule-cmds.el (ctl-x-map): Bind them.

2 years agoDisable unrelated drag-and-drop protocols during XDS drop
Po Lu [Thu, 30 Jun 2022 08:41:58 +0000 (16:41 +0800)]
Disable unrelated drag-and-drop protocols during XDS drop

* doc/lispref/frames.texi (Drag and Drop): Document variables
used to control drag-and-drop protocols.
* lisp/x-dnd.el (x-dnd-do-direct-save): Disable irrelevant DND
protocols.

* src/xterm.c (x_dnd_get_target_window_1):
(x_dnd_get_target_window):
(handle_one_xevent): Respect new variable.
(syms_of_xterm): New variable `x-dnd-disable-motif-protocol'.

2 years agoImprove compliance with the XDS and XDND protocols
Po Lu [Thu, 30 Jun 2022 06:13:30 +0000 (14:13 +0800)]
Improve compliance with the XDS and XDND protocols

* lisp/select.el (xselect-convert-to-text-uri-list): Return a
type of `text/uri-list' instead of STRING or C_STRING.

* lisp/x-dnd.el (x-dnd-xds-performed): New defvar.
(x-dnd-handle-direct-save): Set it to t and handle URIs with
hostnames correctly. Also return errors correctly.
(x-dnd-handle-octet-stream): New function.
(x-dnd-do-direct-save): Handle application/octet-stream, check
results.

2 years agoEUDC: Use "Surname" instead of "Name" in prompts
Thomas Fitzsimmons [Thu, 30 Jun 2022 01:53:39 +0000 (21:53 -0400)]
EUDC: Use "Surname" instead of "Name" in prompts

* lisp/net/eudc-vars.el (eudc-user-attribute-names-alist): Add
name/"Surname" association.
* lisp/net/eudc.el (eudc-get-email): Prompt for surname.
* lisp/net/eudc.el (eudc-get-phone): Likewise.

2 years agoFix preservation of the original value of PRIMARY after dropping on xterm
Po Lu [Thu, 30 Jun 2022 01:45:49 +0000 (09:45 +0800)]
Fix preservation of the original value of PRIMARY after dropping on xterm

* src/xselect.c (x_own_selection): New arg `dnd_data'.  Record
it.
(x_get_local_selection, x_handle_selection_request)
(x_convert_selection): Convert the DND data instead if the
situation warrants.
(Fx_own_selection_internal, Fx_get_selection_internal)
(Fx_get_local_selection): Update calls to x_get_local_selection.

* src/xterm.c (x_dnd_do_unsupported_drop): If obtaining
selection ownership failed, return.  Record DND value and
preserve the current value of PRIMARY, if it exists.

* src/xterm.h: Update prototypes.

2 years agoEUDC: Prevent field overlap when query form is reset
Thomas Fitzsimmons [Thu, 30 Jun 2022 01:37:57 +0000 (21:37 -0400)]
EUDC: Prevent field overlap when query form is reset

* lisp/net/eudc.el (eudc-query-form): Delete all overlays before
erasing buffer.  Remove widget-after-change from
after-change-functions.

2 years agoFix hscrolling of :align-to when display-line-numbers is in effect
Eli Zaretskii [Wed, 29 Jun 2022 17:15:36 +0000 (20:15 +0300)]
Fix hscrolling of :align-to when display-line-numbers is in effect

* src/dispextern.h (struct it): Rename 'tab_offset' member to
'stretch_adjust'.
* src/xdisp.c (gui_produce_glyphs, produce_stretch_glyph)
(display_line): All users of 'tab_offset' changed.
(produce_stretch_glyph): Fix calculation of ':align-to' when
line numbers are displayed and the window is hscrolled.
(calc_pixel_width_or_height): Fix calculation of width of 'space'
display property when 'display-line-numbers' is turned on, but the
line number was not yet produced for the current glyph row.
(Bug#56176)

2 years ago* lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case
Stefan Monnier [Wed, 29 Jun 2022 15:47:24 +0000 (11:47 -0400)]
* lisp/vc/diff-mode.el (diff--font-lock-prettify): Fix `diff-buffers` case

2 years agoMore robust `gnu` pattern (bug#56249)
Mattias Engdegård [Wed, 29 Jun 2022 15:18:04 +0000 (17:18 +0200)]
More robust `gnu` pattern (bug#56249)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Don't allow spaces in the file names, to avoid false matches.
Don't allow ad-hoc spaces preceding the program name either.

2 years agoComplete transition to rx for compilation `gnu` pattern
Mattias Engdegård [Wed, 29 Jun 2022 10:34:39 +0000 (12:34 +0200)]
Complete transition to rx for compilation `gnu` pattern

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Change from a mixture of traditional regexp syntax and rx,
to make intentions clearer.

2 years ago* lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.
Mattias Engdegård [Wed, 29 Jun 2022 09:01:16 +0000 (11:01 +0200)]
* lisp/emacs-lisp/rx.el: Indent some rx constructs correctly.

This includes group-n, submatch-n, =, >=, ** and repeat, whose first 1
or 2 arguments are special.

2 years ago; Manually sync ChangeLog and AUTHORS with emacs-28
Stefan Kangas [Wed, 29 Jun 2022 14:13:51 +0000 (16:13 +0200)]
; Manually sync ChangeLog and AUTHORS with emacs-28

* ChangeLog.3:
* etc/AUTHORS: Manually sync with emacs-28 to fix merge errors.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 29 Jun 2022 13:34:22 +0000 (15:34 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

f1de6c0e28 Bump Emacs version to 28.1.90

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

6c26f089a7 Update ChangeLog and AUTHORS for 28.1.90 pretest

# Conflicts:
# ChangeLog.3
# etc/AUTHORS

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 29 Jun 2022 13:34:21 +0000 (15:34 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

7f749e44db ; Auto-commit of loaddefs files.

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

bf137fdbd2 ; * admin/make-tarball.txt: Small clarification.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 29 Jun 2022 13:34:21 +0000 (15:34 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

3d91d55432 Update Tramp version (don't merge with master)

2 years agoFix handling invalidated selection requests
Po Lu [Wed, 29 Jun 2022 13:24:51 +0000 (21:24 +0800)]
Fix handling invalidated selection requests

* src/xselect.c (x_handle_selection_request): Correctly punt
when !dpyinfo.

2 years agoBump Emacs version to 28.1.90 emacs-28.1.90
Stefan Kangas [Wed, 29 Jun 2022 13:21:26 +0000 (15:21 +0200)]
Bump Emacs version to 28.1.90

* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.1.90.

2 years agoUpdate ChangeLog and AUTHORS for 28.1.90 pretest
Stefan Kangas [Wed, 29 Jun 2022 13:19:55 +0000 (15:19 +0200)]
Update ChangeLog and AUTHORS for 28.1.90 pretest

* ChangeLog.3:
* etc/AUTHORS: Update.

2 years agoFix some bugs found while testing drag-and-drop
Po Lu [Wed, 29 Jun 2022 13:12:12 +0000 (21:12 +0800)]
Fix some bugs found while testing drag-and-drop

* lisp/x-dnd.el (x-dnd-get-drop-width-height):
(x-dnd-get-drop-x-y): Fix doc string.
(x-dnd-handle-xdnd): Don't set update rect if
`dnd-indicate-insertion-point'.  Bug found testing with "JX
Application Framework".

2 years ago(cl--generic-compiler): Revert last change
Stefan Monnier [Wed, 29 Jun 2022 12:58:13 +0000 (08:58 -0400)]
(cl--generic-compiler): Revert last change

That change (introduced to circumvent an error now that `seq.el` is
preloaded) caused all dispatchers to be left uncompiled, which slows down
method dispatch very significantly.  Fix the problem in the old way,
i.e. by adding an explicit call to `cl--generic-prefill-dispatchers`.

* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Revert last change.
Add (cl--generic-prefill-dispatchers 1 integer) instead to handle
the new dispatchers needed for `seq.el`.
(cl--generic-prefill-generalizer-sample): New function.
(cl--generic-get-dispatcher): Use it to signal an error giving precise
instructions for what to do if we're about the load the byte-compiler
during the preload.
(cl--generic-oclosure-generalizer): Rename from
`cl-generic--oclosure-generalizer` for consistency with all
other generalizers.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 29 Jun 2022 12:20:24 +0000 (14:20 +0200)]
; Auto-commit of loaddefs files.

2 years ago; Fix build warnings
Po Lu [Wed, 29 Jun 2022 12:16:44 +0000 (20:16 +0800)]
; Fix build warnings

* lisp/x-dnd.el (x-begin-drag): Add missing declarations.

2 years agoUpdate dnd-tests.el to make sure remote files are removed when Emacs quits
Po Lu [Wed, 29 Jun 2022 12:14:15 +0000 (20:14 +0800)]
Update dnd-tests.el to make sure remote files are removed when Emacs quits

* test/lisp/dnd-tests.el (dnd-tests-begin-drag-files)
(dnd-tests-begin-file-drag): Test value of `kill-emacs-hook'.

2 years agoImplement starting X Direct Save (XDS) drops
Po Lu [Wed, 29 Jun 2022 12:10:25 +0000 (20:10 +0800)]
Implement starting X Direct Save (XDS) drops

* doc/lispref/frames.texi (Drag and Drop): Document new function
`dnd-direct-save'.
* etc/NEWS: Likewise.

* lisp/dnd.el (dnd-direct-save-remote-files): New defcustom.
(dnd-begin-file-drag): Implement defucstom.
(dnd-begin-drag-files): Add kill-emacs-hook after saving remote
file.
(dnd-direct-save): New function.
* lisp/x-dnd.el (x-dnd-known-types): Fix coding style.
(x-dnd-handle-drag-n-drop-event): Handle local value with
self-originating DND events.
(x-dnd-xds-current-file, x-dnd-xds-source-frame): New defvars.
(x-dnd-handle-direct-save, x-dnd-do-direct-save): New functions.

* src/xfns.c (Fx_begin_drag): Allow any atom to be used as a DND
action.
* src/xselect.c (symbol_to_x_atom): Make public.
* src/xterm.c (x_dnd_note_self_drop): Include selection local
value.
(x_ignore_errors_for_next_request): Don't assume x_error_message
is set.
* src/xterm.h: Update prototypes.

2 years ago; * admin/make-tarball.txt: Small clarification.
Stefan Kangas [Wed, 29 Jun 2022 12:07:36 +0000 (14:07 +0200)]
; * admin/make-tarball.txt: Small clarification.

2 years agoMake two text-property-search tests easier to read
Stefan Kangas [Wed, 29 Jun 2022 11:29:27 +0000 (13:29 +0200)]
Make two text-property-search tests easier to read

* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-search-forward/point-at-beginning)
(text-property-search-backward/point-at-end): Rewrite to make tests
easier to read.

2 years agoMinor cleanup in dired-x-bind-find-file
Stefan Kangas [Mon, 27 Jun 2022 14:08:10 +0000 (16:08 +0200)]
Minor cleanup in dired-x-bind-find-file

* lisp/dired-x.el (dired-x-bind-find-file): Use 'format-message'
and 'keymap-set'.

2 years agoImprove the eval-defun doc string
Lars Ingebrigtsen [Wed, 29 Jun 2022 11:05:46 +0000 (13:05 +0200)]
Improve the eval-defun doc string

* lisp/progmodes/elisp-mode.el (eval-defun): Document what the
command actually does w.r.t. finding a form to evaluate
(bug#47747).

2 years agoEnsure that In-Reply-To is saved in drafts in Message
Lars Ingebrigtsen [Wed, 29 Jun 2022 11:00:25 +0000 (13:00 +0200)]
Ensure that In-Reply-To is saved in drafts in Message

* lisp/gnus/message.el (message-hidden-headers): Hide In-Reply-To
now that we pre-generate it.
(message-setup-1): Pre-generate In-Reply-To so that it'll be saved
in drafts (bug#47639).

2 years agotest/lisp/progmodes/python-tests.el: add test for nav end of block
Tom Gillespie [Wed, 29 Jun 2022 02:55:31 +0000 (19:55 -0700)]
test/lisp/progmodes/python-tests.el: add test for nav end of block

Add test for python-nav-end-of-block to prevent regression of bug#56271.

2 years agolisp/progmodes/python.el (python-nav-end-of-block): prevent infinite loop
Tom Gillespie [Wed, 29 Jun 2022 02:28:05 +0000 (19:28 -0700)]
lisp/progmodes/python.el (python-nav-end-of-block): prevent infinite loop

lisp/progmodes/python.el (python-nav-end-of-block): Fix a bad
assumption that python-nav-end-of-statement always makes forward
progress by testing that it actually does. If this check is not made
then it is possible for python-nav-end-of-block to enter an infinite
loop. (bug#56271)

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 agoUpdate Tramp version (don't merge with master)
Michael Albinus [Wed, 29 Jun 2022 09:08:44 +0000 (11:08 +0200)]
Update Tramp version (don't merge with master)

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.3".

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.