]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMake ERC respect spaces in server passwords
F. Jason Park [Mon, 16 Aug 2021 04:57:24 +0000 (21:57 -0700)]
Make ERC respect spaces in server passwords

* lisp/erc/erc.el (erc-login): Also known as connection passwords,
these are sent as the sole arg to the PASS command, which is nowadays
often overloaded with other semantics imposed by various entities to
convey things like bouncer or services creds.

2 years agoRecognize ASCII and strict CASEMAPPINGs in ERC
F. Jason Park [Wed, 6 Oct 2021 02:03:56 +0000 (19:03 -0700)]
Recognize ASCII and strict CASEMAPPINGs in ERC

* lisp/erc/erc.el (erc-downcase, erc--casemapping-rfc1459-strict,
erc--casemapping-rfc1459): Add new translation tables for the latter
two mappings and use them in `erc-downcase'.

* test/lisp/erc/erc-tests.el: Add test for `erc-downcase'.

2 years agoUpdate ISUPPORT handling in ERC
F. Jason Park [Thu, 12 Aug 2021 10:10:31 +0000 (03:10 -0700)]
Update ISUPPORT handling in ERC

* lisp/erc/erc-backend (erc--isupport-params): Add new variable to
hold a hashmap of parsed `erc-server-parameters' in a more useful
format.  But keep `erc-server-parameters' around for public use.  We
currently lack dedicated local variables for certain discovered IRC
session properties, such as what prefix characters are supported for
channels, etc.  And the truth of this needs querying many times per
second at various points.  As such, caching here seems justified but
can be easily removed if deemed otherwise because all ingredients are
internal.
(erc--parse-isupport-value): Add helper function that parses an
ISUPPORT value and returns the component parts with backslash-x hex
escapes removed.  This can probably use some streamlining.
(erc--with-memoization): Add compat alias for use in internal ISUPPORT
getter.  Should be moved to `erc-compat.el' when that library is fully
reincorporated.
(erc--get-isupport-entry): Add internal getter to look up ISUPPORT
items.
(erc-server-005): Treat `erc-server-response' "command args" field as
read-only.  Previously, this field was set to nil after processing,
which was unhelpful to other parts of the library.  Also call above
mentioned helper to parse values.  And add some bookkeeping to handle
negation.

* lisp/erc/erc-capab.el (erc-capab-identify-send-messages): Use
internal ISUPPORT getter.

* lisp/erc/erc.el (erc-cmd-NICK, erc-parse-prefix,
erc-nickname-in-use): Use internal ISUPPORT getter.

* test/lisp/erc/erc-tests.el: Add tests for the above mentioned
changes in erc-backend.el.

2 years agoRequire erc-networks in erc.el
F. Jason Park [Tue, 17 Aug 2021 08:50:29 +0000 (01:50 -0700)]
Require erc-networks in erc.el

* lisp/erc/erc.el: Require erc-networks.el, which ERC can't run
without these days.  To sidestep the circular dependency, require it
last, just after erc-goodies.  Remove the `declare-function' for
`erc-network-name' because it's not currently needed at load time.
(erc-log-irc-protocol, erc-hide-current-message-p): Remove `fboundp'
guard logic from `erc-network-name' invocations but preserve meaning
by interpreting `erc-network' being unset to mean module isn't loaded
or authoritative network detection has failed.
(erc-format-network): Likewise here.  At the moment, this function
always returns the empty string because the function
`erc-network-name' always returns non-nil, perhaps from the
fallback/failure sentinel "Unknown", perhaps from the printed form of
nil.

* lisp/erc/erc-networks.el (erc-network): This is called throughout
erc.el but was previously cumbersome to use on account of being
guarded by `fboundp'.  It now relies on the fact that its namesake
variable is set in target buffers as well.

2 years agoDon't set erc-server-announced-name unless known
F. Jason Park [Tue, 15 Jun 2021 06:40:45 +0000 (23:40 -0700)]
Don't set erc-server-announced-name unless known

* lisp/erc/erc.el (erc-open): whenever this function is called, the
variable `erc-server-announced-name' may be set locally in the calling
server buffer.  However, if that buffer's dialed server matches that
of the one being created, the announced name is copied over on faith.
But there's no guarantee that the name will match the one ultimately
emitted by the server during its introductory burst.  Beyond
potentially causing confusion in protocol logs, this behavior may
complicate debugging efforts.  Setting the variable to nil helps
ensure a consistent environment when preparing a buffer for all newly
dialed connections.  This commit also simplifies the setting of
`erc-server-connected', which is always nil when connecting and
vice-versa.

2 years agoAllow exemption from flood penalty in erc-backend
F. Jason Park [Sun, 13 Mar 2022 09:34:10 +0000 (01:34 -0800)]
Allow exemption from flood penalty in erc-backend

* lisp/erc/erc-backend (erc-server-send, erc-server-PING): Change name
of param `forcep' in `erc-server-send' to `force' and change its type
to the union of the symbol `no-penalty' and the set of all other
non-nil values.  In `erc-server-PING', use this exemption when calling
`erc-server-send'.  This fix was fast tracked and summarily
incorporated into bug#48598 because users of the soju bouncer are all
affected.  See update #5 in the bug's email thread under the section
entitled "Riders" for an explanation.

2 years agoCustomize displaying of ERC buffers on reconnect
F. Jason Park [Fri, 19 Nov 2021 07:39:54 +0000 (23:39 -0800)]
Customize displaying of ERC buffers on reconnect

* lisp/erc/erc-backend.el (erc--server-last-reconnect-count):
Add variable to record last reconnect tally.

* lisp/erc/erc.el (erc-reconnect-display): Add new option to specify
channel-buffer display behavior on reconnect.
(erc-setup-buffer): Use option `erc-reconnect-display' if warranted.
(erc-cmd-JOIN): Forget last reconnect count when issuing a manual
/JOIN command.
(erc-connection-established): Record reconnect count in internal var
before resetting.
(Bug#51753)

2 years agoRemove duplicate ERC prompt on reconnect
F. Jason Park [Wed, 6 Apr 2022 00:45:00 +0000 (17:45 -0700)]
Remove duplicate ERC prompt on reconnect

* lisp/erc/erc-backend.el (erc--unhide-prompt, erc--hide-prompt,
erc--unhide-prompt-on-self-insert): Add functions to ensure prompt is
hidden on disconnect and shown when a user types /reconnect in a
disconnected server buffer.
(erc-process-sentinel): Register aforementioned function with
`pre-command-hook' when prompt is deleted after disconnecting.
(erc-server-PRIVMSG): Ensure prompt is showing when a new message
arrives from target.

* lisp/erc/erc.el (erc-hide-prompt): Repurpose unused option by
changing meaning slightly to mean "selectively hide prompt when
disconnected."  Also delete obsolete, commented-out code that at some
point used this option in its prior incarnation.
(erc-prompt-hidden): Add new option to specify look of prompt when
hidden.
(erc-unhide-query-prompt): Add option to force-reveal query prompts on
reconnect.
(erc-open): Augment earlier reconnect-detection semantics by
incorporating `erc--server-reconnecting'.  In existing buffers, remove
prompt-related hooks and reveal prompt, if necessary.
(erc-cmd-RECONNECT): Allow a user to reconnect when already
connected (by first disconnecting).
(erc-connection-established): Possibly unhide query prompts.
(Bug#54826)

* test/lisp/erc/erc-tests.el (erc-tests--test-prep,
erc-tests--set-fake-server-process): Factor out some common
buffer-prep boilerplate involving user input and the server process.
Shared with bug#54536.

2 years agoAccept user keyword arg in ERC entry-point commands
F. Jason Park [Sun, 3 Apr 2022 21:24:24 +0000 (14:24 -0700)]
Accept user keyword arg in ERC entry-point commands

* lisp/erc/erc-backend.el (erc-server-reconnect): Reuse the username
argument from the previous session's USER command when reconnecting.
Also pass the existing client certificate, fixing an issue related to
bug#47788.
(erc-session-user-full-name): Move variable here from erc.el.
(erc-session-username): Add new local variable to store entry point
parameter.

* lisp/erc/erc.el (erc-session-user-full-name): Move variable to
erc-backend.
(erc-open, erc-determine-parameters, erc, erc-tls): Accept new
optional user parameter.
(erc-query): Preserve current `erc-session-username' when calling
`erc-open'.
(erc-login): Use `erc-session-username' instead of deriving it.
(erc-compute-user): Add new function to determine user name from
explicit argument or user options.
(Bug#54824)

2 years agoInitialize erc-server-filter-data in erc-backend
F. Jason Park [Tue, 5 Apr 2022 08:30:07 +0000 (01:30 -0700)]
Initialize erc-server-filter-data in erc-backend

* lisp/erc/erc-backend.el (erc-server-connect): Set
`erc-server-filter-data' to nil upon (re)connecting.

* lisp/erc/erc.el (erc-open): For the sake of clarity, don't
initialize `erc-server-filter-data' here because non-connect
invocations merely set up a target buffer and have no business
touching this variable.

2 years agoRework mutual dependency between erc and erc-backend
F. Jason Park [Tue, 5 Apr 2022 05:38:22 +0000 (22:38 -0700)]
Rework mutual dependency between erc and erc-backend

* lisp/erc/erc.el: Declare needed variables exported by erc-backend.el
as special near the top of the file, and only require `erc-backend'
after providing `erc' as a feature at the very end.

* lisp/erc/erc-backend.el: Don't preemptively provide `erc-backend'.

* test/lisp/erc/erc-tests.el (erc--meta--backend-dependencies): Add
utility test to scrape for unused vars that may accumulate over time.
(Bug#54825)

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)