]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months ago; LLDB support cleanup and extension
Gerd Möllmann [Mon, 16 Oct 2023 08:12:10 +0000 (10:12 +0200)]
; LLDB support cleanup and extension

14 months agoMerge from origin/emacs-29
Michael Albinus [Mon, 16 Oct 2023 07:02:39 +0000 (09:02 +0200)]
Merge from origin/emacs-29

07c45f20fd3 Fix test in files-tests
5d3f3288d22 ; * doc/emacs/search.texi (Regexp Backslash): Improve ind...
9525315c117 Add missing :version to two defcustoms
9044d4d94bb Fix a defcustom :type in eldoc.el
8141d73ea7f Document 'M-x align' in the Emacs manual

14 months agoProperly initialize argment list supplied to android_init_emacs
Po Lu [Mon, 16 Oct 2023 01:00:45 +0000 (09:00 +0800)]
Properly initialize argment list supplied to android_init_emacs

* src/android.c (initEmacs): NULL-terminate c_argv.

14 months agoRevert "Update etc/rgb.txt from X.Org upstream"
Po Lu [Mon, 16 Oct 2023 00:56:53 +0000 (08:56 +0800)]
Revert "Update etc/rgb.txt from X.Org upstream"

This reverts commit 11f10dc0d0b4b1d6af828102421eac9f79e0fcba.

* etc/rgb.txt: Restore X11R6.6 version, where non-portable color
names are absent.

14 months agoFixup for "no file modes on windows and dos"
Sam Steingold [Sun, 15 Oct 2023 15:51:34 +0000 (11:51 -0400)]
Fixup for "no file modes on windows and dos"

* lisp/ls-lisp.el (ls-lisp-format): Keep the first group of
permissions even when `modes' is not in `ls-lisp-verbosity'.

14 months agoc-indent-new-comment-line: don't test for a macro in a comment
Alan Mackenzie [Sun, 15 Oct 2023 10:54:23 +0000 (10:54 +0000)]
c-indent-new-comment-line: don't test for a macro in a comment

This fixes bug#9860.

* lisp/progmodes/cc-cmds (c-indent-new-comment-line): Test for
a comment/string before testing for a macro, thus preventing a
"macro" being spuriously recognized in a comment.  This allows
auto-fill-mode to work on a line beginning with # in a comment.

14 months agoFix test in files-tests
Michael Albinus [Sun, 15 Oct 2023 10:26:43 +0000 (12:26 +0200)]
Fix test in files-tests

* test/lisp/files-tests.el
(files-tests-file-name-non-special-expand-file-name-tilde): Fix test.

14 months ago; * doc/emacs/search.texi (Regexp Backslash): Improve indexing.
Eli Zaretskii [Sun, 15 Oct 2023 09:37:25 +0000 (12:37 +0300)]
; * doc/emacs/search.texi (Regexp Backslash): Improve indexing.

14 months ago; New command alias xprint for LLDB
Gerd Möllmann [Sun, 15 Oct 2023 07:40:24 +0000 (09:40 +0200)]
; New command alias xprint for LLDB

14 months ago; Correct typos in android.texi
Po Lu [Sun, 15 Oct 2023 07:02:43 +0000 (15:02 +0800)]
; Correct typos in android.texi

* doc/emacs/android.texi (Android Environment): Correct typos.

14 months agoCorrectly receive files through Android DND
Po Lu [Sun, 15 Oct 2023 05:10:34 +0000 (13:10 +0800)]
Correctly receive files through Android DND

* java/org/gnu/emacs/EmacsService.java (getUsefulContentResolver)
(getContentResolverContext): New functions which return a
content resolver from an EmacsActivity, if at all possible.
(openContentUri, checkContentUri): Probe or open URIs through
such content resolvers.  Probe URIs by opening them if merely
testing permissions fails, for DND URIs do not make
checkCallingUriPermission return true.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Address
potential crash.

* src/androidvfs.c (android_check_content_access): Circumvent
JNI dynamic method dispatch.
(android_authority_name): Guarantee NAME is never a directory.

14 months agoFix searching for tags in compressed files
Mauro Aranda [Thu, 12 Oct 2023 12:41:58 +0000 (09:41 -0300)]
Fix searching for tags in compressed files

* lisp/progmodes/etags.el (etags--ensure-file): New function.
(etags--all-files): Make sure files in TAGS can be visited, even if
the files are compressed.  (Bug#2807)
(etags--xref-find-definitions): Report to xref a file that we are sure
it exists.  (Bug#44494)

14 months agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Sat, 14 Oct 2023 22:34:02 +0000 (00:34 +0200)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2023-10-01 03:58:26 UTC.

14 months agoUpdate etc/rgb.txt from X.Org upstream
Stefan Kangas [Sat, 14 Oct 2023 19:07:30 +0000 (21:07 +0200)]
Update etc/rgb.txt from X.Org upstream

The upstream version contains the following changes:

  2023-07-10  rgb: Make color entries uniform
  2014-07-06  Add aliases for colors that differ between X11 and CSS
  2014-07-06  Add missing colors from CSS Color Module Level 4
  2008-06-04  Nuke CVS version tags
  2003-11-14  R6.6 is the Xorg base-line

* etc/rgb.txt: Sync with the version in X.Org upstream
https://cgit.freedesktop.org/xorg/app/rgb/tree/rgb.txt
commit 0d2caecebf0e2a10994c22960921f366dd98d19a.  (Bug#66538)

14 months agoFix an infinite loop in c-beginning-of-defun-1
Alan Mackenzie [Sat, 14 Oct 2023 19:14:57 +0000 (19:14 +0000)]
Fix an infinite loop in c-beginning-of-defun-1

This fixes bug#61436.

The loop manifested itself in c-get-fallback-scan-pos as the
position returned wasn't at a {, so the search back in
c-beginning-of-defun-1 with a defun-prompt-regexp found the
same BOL and moved forward to after the match, repeat.

* lisp/progmodes/cc-defs.el (c-beginning-of-defun-1): Accept a
position found by beginning-of-defun (which uses
defun-prompt-regexp) only when the \\s( following it is a {.
Repeat the backward search when this isn't the case.

14 months agoAdd missing :version to two defcustoms
Stefan Kangas [Sat, 14 Oct 2023 19:00:00 +0000 (21:00 +0200)]
Add missing :version to two defcustoms

* lisp/emacs-lisp/eldoc.el (eldoc-print-after-edit)
(eldoc-echo-area-prefer-doc-buffer): Add missing custom :version.

14 months agoFix a defcustom :type in eldoc.el
Mauro Aranda [Sat, 14 Oct 2023 13:34:54 +0000 (10:34 -0300)]
Fix a defcustom :type in eldoc.el

* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-prefer-doc-buffer): Make
:type a choice, to allow for the value 'maybe'.  (Bug##66539)

14 months agoFix vc-hg-log-edit-toggle-amend
Dmitry Gutov [Sat, 14 Oct 2023 17:47:57 +0000 (20:47 +0300)]
Fix vc-hg-log-edit-toggle-amend

* lisp/vc/log-edit.el (log-edit--toggle-amend): Handle the case
when the VCS returns log entry that doesn't end with a newline
(bug#66423).

14 months ago(vc-default-checkin-patch): Try to be compatible with BSD 'patch'
Dmitry Gutov [Sat, 14 Oct 2023 17:10:08 +0000 (20:10 +0300)]
(vc-default-checkin-patch): Try to be compatible with BSD 'patch'

* lisp/vc/vc.el (vc-default-checkin-patch):
Try to be compatible with BSD 'patch' (bug#66211).

14 months ago(vc-root-diff): Don't compute and pass on WORKING-REVISION
Dmitry Gutov [Sat, 14 Oct 2023 17:01:24 +0000 (20:01 +0300)]
(vc-root-diff): Don't compute and pass on WORKING-REVISION

* lisp/vc/vc.el (vc-root-diff): Don't compute and pass on
WORKING-REVISION (bug#66364).  It was unused.

14 months agoOptimize vc-hg-state for directories
Spencer Baugh [Fri, 13 Oct 2023 01:06:53 +0000 (21:06 -0400)]
Optimize vc-hg-state for directories

Directories are never tracked in hg, so it's pointless to run
vc-hg-state on them.  And, in fact, our implementation previously
would list all the files contained in the directory and then parse
that in Emacs, which is very slow in large repos.

Let's just use the knowledge that directories aren't tracked in hg,
and skip running hg entirely.

* lisp/vc/vc-hg.el (vc-hg-state): Return nil for
directories.  (Bug#66364)

14 months ago;cperl-mode.el: Do not mistake a left-shift operator for a here-doc.
Harald Jörg [Sat, 14 Oct 2023 16:15:11 +0000 (18:15 +0200)]
;cperl-mode.el: Do not mistake a left-shift operator for a here-doc.

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Empty
unquoted delimiters for here-documents are now forbidden
(Bug#65834).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-65834):
New test.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-65834.pl: new
resource with source code from the bug report.

14 months agoFix indentation and fontification in shell-script (Bug#26217)
Mauro Aranda [Sat, 14 Oct 2023 12:05:35 +0000 (09:05 -0300)]
Fix indentation and fontification in shell-script (Bug#26217)

* lisp/progmodes/sh-script.el (sh-smie--sh-keyword-p): Treat "do" as
special, like we treat "in".
(sh-smie--sh-keyword-in-p): Change signature.  Take the token to
decide correctly if it's a keyword.
(sh-font-lock-keywords-var-1): Add do.

* test/lisp/progmodes/sh-script-resources/sh-indents.erts: New test.
* test/lisp/progmodes/sh-script-tests.el
(sh-script-test-do-fontification): New test.

14 months agoSimplify and describe docstrings-wide check
Mattias Engdegård [Sat, 14 Oct 2023 11:24:30 +0000 (13:24 +0200)]
Simplify and describe docstrings-wide check

* lisp/emacs-lisp/bytecomp.el
(byte-compile--wide-docstring-substitution-len): Remove.
* lisp/emacs-lisp/bytecomp.el (bytecomp--docstring-line-width):
Add back explanatory comments lost in a previous change.

14 months agoDocument 'M-x align' in the Emacs manual
Eshel Yaron [Mon, 2 Oct 2023 08:02:46 +0000 (10:02 +0200)]
Document 'M-x align' in the Emacs manual

* doc/emacs/indent.texi (Alignment): New section.
* doc/emacs/emacs.texi: Update menu. (Bug#66303)

14 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 14 Oct 2023 10:55:05 +0000 (06:55 -0400)]
Merge from origin/emacs-29

06a87738114 ; * lisp/calendar/time-date.el (days-to-time): Doc fix.
0ea2d6d9e82 Document that time-to-days and days-to-time use different...

14 months agoMake the docstrings-wide check 70x faster
Mattias Engdegård [Sat, 14 Oct 2023 09:42:44 +0000 (11:42 +0200)]
Make the docstrings-wide check 70x faster

Instead of performing a number of expensive transformations on the
original doc string and then use a dynamically-created regexp to find
wide lines, step through the lines in the unmodified string and only
perform the transformations on lines that exceed the limit.
This is sound because the transformations are contractive.

The new check will usually not cons nor perform any regexp matching.

* lisp/emacs-lisp/bytecomp.el (bytecomp--docstring-line-width): New.
(byte-compile--wide-docstring-p): Cheaper implementation.

14 months ago; * lisp/calendar/time-date.el (days-to-time): Doc fix.
Eli Zaretskii [Sat, 14 Oct 2023 09:00:51 +0000 (12:00 +0300)]
; * lisp/calendar/time-date.el (days-to-time): Doc fix.

14 months agoDocument that time-to-days and days-to-time use different epochs
Bob Rogers [Thu, 12 Oct 2023 17:23:35 +0000 (10:23 -0700)]
Document that time-to-days and days-to-time use different epochs

* doc/lispref/os.texi (Time Calculations):
* lisp/calendar/time-date.el (days-to-time, time-to-days): Doc fixes.
(Bug#66502)

14 months agoSort byte compiler warnings in alphabetic order
Mattias Engdegård [Fri, 13 Oct 2023 17:55:45 +0000 (19:55 +0200)]
Sort byte compiler warnings in alphabetic order

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types):
Rearrange.  Add a few missing ones.

14 months agoFix beginning-of-defun not jumping to BOF
Jens Schmidt [Tue, 26 Sep 2023 19:36:19 +0000 (21:36 +0200)]
Fix beginning-of-defun not jumping to BOF

In batch mode or when font-lock and some other niceties are switched
off, function `syntax-ppss' can modify match data held by function
`beginning-of-defun-raw'.  In that case, `beginning-of-defun' can jump
to some seemingly arbitrary position, and not the actual BOF.

* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Save match data
around a call to `syntax-ppss'. (Bug#66218)

14 months agoFix saving faces with attributes that need filtering
Mauro Aranda [Sat, 7 Oct 2023 14:57:18 +0000 (11:57 -0300)]
Fix saving faces with attributes that need filtering

* lisp/cus-edit.el (custom-face-save): The :shown-value property for
the custom-face widget is supposed to be a value suitable for the
customization widget.  (Bug#66391)

14 months agoMerge from origin/emacs-29
Michael Albinus [Sat, 14 Oct 2023 07:38:17 +0000 (09:38 +0200)]
Merge from origin/emacs-29

dc8b336d025 * lisp/files.el (file-name-non-special): Handle quoted ti...

14 months ago* lisp/files.el (file-name-non-special): Handle quoted tilde.
Michael Albinus [Sat, 14 Oct 2023 07:34:40 +0000 (09:34 +0200)]
* lisp/files.el (file-name-non-special): Handle quoted tilde.

(Bug#65685)

* test/lisp/files-tests.el
(files-tests-file-name-non-special-expand-file-name-tilde):
New test.

14 months agoImplement multi-window drag-and-drop under Android
Po Lu [Sat, 14 Oct 2023 02:15:20 +0000 (10:15 +0800)]
Implement multi-window drag-and-drop under Android

* java/org/gnu/emacs/EmacsNative.java (sendDndDrag, sendDndUri)
(sendDndText): Declare new event-sending functions.

* java/org/gnu/emacs/EmacsView.java (onDragEvent): New function.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): New
function; respond to each drag and drop event, request
permissions if necessary and transfer dropped data to Lisp.

* lisp/dnd.el (dnd-unescape-file-uris): New variable.
(dnd-get-local-file-name): If that variable is nil, refrain from
unescaping URLs provided.

* lisp/term/android-win.el (android-handle-dnd-event): New
function.
(special-event-map): Bind drag-n-drop-event.

* src/android.c (sendDndDrag, sendDndUri, sendDndText): New
functions.

* src/androidgui.h (enum android_event_type): New event types
ANDROID_DND_DRAG_EVENT, ANDROID_DND_URI_EVENT,
ANDROID_DND_TEXT_EVENT.
(struct android_dnd_event): New structure.
(union android_event) <dnd>: New field.

* src/androidterm.c (handle_one_android_event)
<ANDROID_DND_..._EVENT>: Generate drag-n-drop events for each
of these types.
(syms_of_androidterm) <Quri, Qtext>: New defsyms.

14 months agoHave gnus-summary-limit-to-age operate on calendar days
Eric Abrahamsen [Sat, 23 Sep 2023 23:31:10 +0000 (16:31 -0700)]
Have gnus-summary-limit-to-age operate on calendar days

Reported and patched by Łukasz Stelmach <stlman@poczta.fm>.

* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-age): Rather than
24-hour blocks. Also use `read-number', and drop the confusing option
to reverse younger/older both with the prefix argument and with a
negative number.

14 months ago(sit-for): Remove support for old calling convention
Stefan Monnier [Fri, 13 Oct 2023 23:28:30 +0000 (19:28 -0400)]
(sit-for): Remove support for old calling convention

* lisp/subr.el (sit-for): Remove support for old calling convention

* doc/lispref/functions.texi (Obsolete Functions): Adjust wording now
that we don't support `sit-for`s old convention any more.
* doc/lispref/commands.texi (Waiting): Remove mention of old calling
convention for `sit-for`.

14 months agocperl-mode.el: Add new user option to etc/NEWS
Harald Jörg [Fri, 13 Oct 2023 22:48:23 +0000 (00:48 +0200)]
cperl-mode.el: Add new user option to etc/NEWS

* etc/NEWS: Announce new user option `cperl-fontify-trailer'.

14 months agocperl-mode.el: Optionally treat trailing text as comment
Harald Jörg [Fri, 13 Oct 2023 22:34:41 +0000 (00:34 +0200)]
cperl-mode.el: Optionally treat trailing text as comment

* lisp/progmodes/cperl-mode.el (cperl-fontify-trailer): New
customization variable.  With a value of 'comment, cperl-mode
treats trailing text after after __END__ and __DATA__ as comment,
like perl-mode does (Bug#66161).
(cperl-find-pods-heres): Treat trailing text after __END__ and
__DATA__ according to the customization variable
`cperl-fontify-trailer'.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-66161):
New test, verifying the changed behavior if the custom variable is
set to 'comment.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-66161.pl: New
resource file, source code from the corresponding bug report.

14 months agoMore defcustom fixes in ERC (Bug#66520)
Mauro Aranda [Fri, 13 Oct 2023 13:36:29 +0000 (10:36 -0300)]
More defcustom fixes in ERC (Bug#66520)

* lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation): Change
:type to choice, to allow nil.
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-style): Fix
copy-pasta.
* lisp/erc/erc-networks.el (erc-networks-alist): Don't advertise that
MATCHER can be a function since it doesn't look like that's ever been
the case, reaching as far back as erc-networks.el's introduction to
the old CVS repo, in 2006.  (Bug#66520)

14 months agoAdd command to refill buffer in erc-fill-wrap-mode
F. Jason Park [Thu, 21 Sep 2023 13:54:27 +0000 (06:54 -0700)]
Add command to refill buffer in erc-fill-wrap-mode

* lisp/erc/erc-fill.el (erc-fill-function, erc-fill-wrap-mode):
Mention new command `erc-fill-wrap-refill-buffer' in doc string.
(erc-fill--wrap-rejigger-last-message): New internal variable.
(erc-fill--wrap-rejigger-region, erc-fill-wrap-refill-buffer): New
command and helper function for fixing alignment issues that arise,
for example, from adjusting pixel-display widths of buffer text during
a session.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--simulate-refill):
New function for approximating `erc-fill-wrap-refill-buffer'.
(erc-fill-wrap--merge): Assert refilling is idempotent.  (Bug#60936)

14 months agoTreat previous/next-line specially in erc-fill-wrap
F. Jason Park [Mon, 9 Oct 2023 09:29:44 +0000 (02:29 -0700)]
Treat previous/next-line specially in erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill-wrap-visual-keys): Mention option
`erc-fill-wrap-force-screen-line-movement' in doc string.
(erc-fill-wrap-force-screen-line-movement): New option to suppress
logical-line movement with `previous-line' and `next-line' when
`erc-fill-wrap-mode' is enabled.
(erc-fill--wrap-move): Accept trailing args.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Use
`erc-fill--wrap-move', like all the other `fill-wrap' commands.
(Bug#60936)

14 months agoSwap hook positions of erc-fill and erc-match-message
F. Jason Park [Tue, 10 Oct 2023 07:32:21 +0000 (00:32 -0700)]
Swap hook positions of erc-fill and erc-match-message

* etc/ERC-NEWS: Fix new order of reserved modify-hook members.
* lisp/erc/erc-fill.el: Increase depth of `erc-fill' in both modify
hooks from 40 to 60.
* lisp/erc/erc-match.el (erc-match-mode, erc-match-enable,
erc-match-disable): Use general module setup function
`erc-match--setup' for buffer-local modifications instead of calling
`erc-match--modify-invisibility-spec' directly.  Add and remove new
post-modify hook `erc-match--on-insert-post'.
(erc-hide-fools): Use `erc--msg-props' for communicating to
post-processing step for applying invisible props instead of doing so
immediately.
(erc-match--on-insert-post): New function to apply module-specific
`invisible' props.  Will likely be replaced by a general service to do
the same, perhaps provided by a future "erc-ignore"-like module.
(erc-match--modify-invisibility-spec, erc-match--setup): Rename former
to latter and only operate on current buffer.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-left-fools-invisible,
erc-scenarios-match--stamp-right-fools-invisible,
erc-scenarios-match--stamp-right-invisible-fill-wrap,
erc-scenarios-match--stamp-both-invisible-fill-static): Update
expected order of ERC-owned `invisible' prop members `match-fools' and
`timestamp'.
* test/lisp/erc/erc-tests.el (erc--essential-hook-ordering): Swap
expected order of `erc-fill' and `erc-add-timestamp' in both hooks.
(Bug#64301)

14 months agoManage some text props for ERC insertion-hook members
F. Jason Park [Fri, 22 Sep 2023 06:54:31 +0000 (23:54 -0700)]
Manage some text props for ERC insertion-hook members

* etc/ERC-NEWS: Mention that ERC only adds the text property
`cursor-sensor-functions' when `erc-echo-timestamps' is enabled.  Also
mention that date stamps are now inserted as separate messages.
* lisp/erc/erc-fill.el (erc-fill): Look for text prop `erc-cmd'
instead of `erc-command' and use helper utility to do so.
(erc-fill-static): Skip date stamps because this fill style leaves
them flush left.
(erc-fill-wrap-mode, erc-fill-wrap-enable, erc-fill-wrap-disable):
Don't hook on the soon-to-be-removed function interface
`erc-stamp--insert-date-function' because date stamps are now separate
messages.
(erc-fill--wrap-continued-message-p): Restore accidentally discarded
doc string.  Derive context about current message from text props at
`point-min', and use updated property names and utility functions.
Abort when previous message is now hidden.
(erc-fill--wrap-stamp-insert-prefixed-date): Remove unused function,
originally meant to be new in ERC 5.6, and move logic for date-stamp
measuring portion directly to `erc-fill-wrap' itself.
(erc-fill--wrap-measure): New helper function.
(erc-fill-wrap): Use helper `erc-fill--wrap-measure' and incorporate
date-stamp detection and width measuring from removed helper.  Don't
dedent first word for messages of unknown origin, such as those
inserted by `erc-display-line' alone without prior preparation from
`erc-display-message'.
* lisp/erc/erc-goodies.el (erc-readonly-mode, erc-readonly-enable):
Set hook depth explicitly to 70.
* lisp/erc/erc-stamp.el (erc-timestamp-format-left): Mention that a
trailing newline is implicit if not provided and that users who don't
want date stamps should use `erc-timestamp-format-right' instead.
(erc-stamp-mode, erc-stamp-enable): Call `erc-stamp--setup' instead
of `erc-munge-invisibility-spec', and bump hook depth for
`erc-add-timestamp' to 70.
(erc-stamp--current-time): Use `erc-ts' instead of `erc-timestamp'
text property in doc string.
(erc-stamp--skip): New internal variable.
(erc-stamp--allow-unmanaged): New variable for legacy code to force
`erc-add-timestamps' to run when `erc--msg-props' is nil.
(erc-add-timestamp): Always run when `erc-stamp--allow-unmanaged' is
non-nil unless `erc-stamp--skip' is as well because the latter takes
precedence.  Don't add `erc-ts' text prop directly unless
`erc-stamp--allow-unmanaged is non-nil.  Instead, use the new
`erc--msg-props' facility to defer until after modification hooks.
Likewise, don't add `cursor-senor-functions' directly either unless
the same compatibility flag is enabled.  Instead, expect the latter to
be handled by a post-modify hook conditioned on the option
`erc-echo-timestamps'.
(erc-timestamp-last-inserted-left): Mention that the final trailing
newline specified in the format string no longer appears in the
recorded value.
(erc-stamp-prefix-log-filter): Use updated name for timestamp
property as well as helper utility for accessing it.
(erc-stamp--inherited-props): Add doc string.
(erc-insert-timestamp-right): Fix bug involving object cycle where
the time-stamp string would appear in its own `display' property.
(erc-stamp--insert-date-function, erc-stamp--insert-date-hook): Remove
unused internal function-valued interface variable and replace with
the latter, a normal hook.
(erc-stamp--date-format-end, erc-stamp--propertize-left-date-stamp):
New function and auxiliary variable to apply date stamp properties at
the post-modify stage.  Add text property `erc-stamp-type' to inserted
date stamps to help folks distinguish between them and other
left-sided stamps.
(erc-stamp--current-datestamp-left,
erc-stamp--format-date-stamp,
erc-stamp--insert-date-stamp-as-phony-message,
erc-stamp--lr-date-on-pre-modify): New functions and state variable to
help ERC treat date stamps as separate messages while working within
the established mechanism for processing inserted messages.  Shadow
`erc-stamp--invisible-property' when calling `erc-format-timestamp' in
order to prevent date stamps from inheriting other `invisible' props.
These date stamps are special in that they have no business being
hidden along with the current message.
(erc-insert-timestamp-left-and-right): On initial run in any buffer,
remember whether the date stamp needed newline massaging on insertion.
Move all business for inserting date stamps to post-modify hooks, but
run them forcibly if this is the very first date stamp in the current
buffer.  Also mention some specifics related to relevant text props in
the doc string.
(erc-format-timestamp): Don't add `invisible' prop to stamp unless
`erc-stamp--invisible-property' is non-nil.
(erc-stamp--csf-props-updated-p): New local variable.
(erc-munge-invisibility-spec): Restore `cursor-sensor-functions' text
property for existing messages when a user enables the option
mid-session.  Add and remove hooks for use with automatic timestamp
echoing.
(erc-stamp--add-csf-on-post-modify): New function to add
`cursor-sensor-functions' property on post-modify hooks.
(erc-stamp--setup): Perform some additional teardown.
(erc-stamp--on-clear-message): Look for text property `erc-ts' instead
of `erc-timestamp'.
(erc-echo-timestamp, erc--echo-ts-csf): Use utility to find time-stamp
text prop in current message.
(erc-stamp--update-saved-position, erc-stamp--reset-on-clear): Use
hook `erc-stamp--insert-date-hook' instead of excised function-valued
variable interface `erc-stamp--insert-date-function'.
* lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Use internal
utility to find beginning of message.
* lisp/erc/erc.el (erc--msg-props, erc--msg-props-overrides): New
internal variables for initializing and conveying metadata-oriented
text properties among insert and send hooks.
(erc-insert-modify-hook): Mention reserved depth ranges for built-in
members in doc string.
(erc-send-action):  Use convenience variable to modifying text props
instead of awkwardly overriding `erc-insert-pre-hook'.
(erc--check-msg-prop, erc--get-inserted-msg-bounds,
erc--get-inserted-msg-prop, erc--with-inserted-msg,
erc--traverse-inserted): New utility functions and macros to help
modules find metadata and message-delimiting text props.
(erc-display-line-1): Ensure the first character of every message in
an ERC buffer has the `erc-msg' property, as well as any other props
in `erc--msg-props', when populated.
(erc--hide-message): Don't bother offsetting start of first message in
a buffer.
(erc--ranked-properties, erc--order-text-properties-from-hash): New
variable and function to convert `erc--msg-props' into a plist
suitable for `add-text-properties'.
(erc-display-message): Make doc string more informative.  Bind and
initialize `erc--msg-props' for use by all hooks.  Respect
`erc--msg-prop-overrides' when non-nil.  Don't add `erc-command'
property.  Instead, ensure `erc--msg-props' contains an `erc-cmd' item
when the parameter PARSED is non-nil.
(erc--own-property-names): Add `erc-stamp-type'.
(erc--get-speaker-bounds): Use helper to find message start.
(erc-process-ctcp-query, erc-send-current-line): Use convenience
variable to leverage framework for manipulating message metadata
instead of overriding `erc-insert-pre-hook'.
(erc-display-msg): Bind `erc--msg-props' for use by all send-related
hooks.  Add text props from table after `erc-send-post-hook'.
(erc-restore-text-properties): Improve doc string.
(erc--get-eq-comparable-cmd): Use `if-let' instead of `if-let*'.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg):
Make phony message more realistic.
(erc-fill-tests--wrap-populate): Shorten overlong line.
(erc-fill-tests--wrap-check-prefixes): Make test utility more vigilant
in asserting no gaps exist in `line-prefix' property interval.
(erc-fill-tests--compare): Compare text props on text-prop values that
are themselves strings.
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--clear-stamp):
Ensure `erc-stamp' is loaded.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-left-current-nick,
erc-scenarios-match--invisible-stamp): Use `default-value' for
`erc-insert-modify-hook' in ordering assertion.
(erc-scenarios-match--find-bol, erc-scenarios-match--find-eol): Remove
unused assertion helper functions.
(erc-scenarios-match--stamp-right-fools-invisible): Remove misplaced
ERT tag from function and use utility to find message bounds.
(erc-scenarios-match--stamp-right-fools-invisible): Use real utility
from main library to find message end.
(erc-scenarios-match--fill-wrap-stamp-dedented-p): New assertion
utility function.
(erc-scenarios-match--hide-fools/stamp-both/fill-wrap) New test.
(erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak): New
test.
(erc-scenarios-match--stamp-both-invisible-fill-static): Expect
`erc-cmd' at beginning of inserted message's filled line, even if the
line starts with white space.  Also, add new function parameter
`assert-ds', a callback to run when visiting the second date stamp,
which is followed by a hidden message.  In the test of the same name,
expect the date stamp's invisibility interval to begin at the newline
after the previous message and to not contain any existing
invisibility props, namely, those belonging to the subsequent hidden
"fools" message.  Also use shortened "metadata" text prop names.
(erc-scenarios-match--stamp-both-invisible-fill-static--nooffset):
Expect the date stamp's invisibility interval to match its field's
instead of starting and ending sooner.
* test/lisp/erc/erc-stamp-tests.el: Put well-known metadata prop at
the start of the message.
* test/lisp/erc/erc-tests.el (erc--refresh-prompt): Prevent modules
from mutating hooks.
(erc--order-text-properties-from-hash, erc--check-msg-prop): New
tests.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update
test data.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update
test data.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
* test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
* test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update.
* test/lisp/erc/resources/match/fools/fill-wrap.eld: New file.
(Bug#60936)

14 months agoEasily excise list-valued text prop members in ERC
F. Jason Park [Wed, 4 Oct 2023 06:15:40 +0000 (23:15 -0700)]
Easily excise list-valued text prop members in ERC

* lisp/erc/erc.el (erc--remove-from-prop-value-list): New function for
removing `invisible' and `face' prop members cleanly.
* test/lisp/erc/erc-tests.el (erc--remove-from-prop-value-list,
erc--remove-from-prop-value-list/many): New tests.  (Bug#60936)

14 months agoDeprecate option erc-remove-parsed-property
F. Jason Park [Tue, 3 Oct 2023 07:00:19 +0000 (00:00 -0700)]
Deprecate option erc-remove-parsed-property

* etc/ERC-NEWS: Add entry for `erc-remove-parsed-property'.
* lisp/erc/erc.el (erc-remove-parsed-property): Deprecate option
because the potential for inadvertent self harm outweighs the
potential benefits.  Additionally, replicating this functionality via
hooks is trivial.
(erc-display-line-1): Remove quasi-deprecated `tags' property because
the preferred format for `erc-response.tags' has changed, and ERC has
never supported IRCv3 tags.

14 months agoUse erc-display-message instead of erc-make-notice
F. Jason Park [Thu, 5 Oct 2023 03:39:03 +0000 (20:39 -0700)]
Use erc-display-message instead of erc-make-notice

* lisp/erc/erc-backend.el (erc-server-JOIN): Let `erc-display-message'
handle formatting instead of baking out a string.  The text ultimately
inserted remains unchanged, but forwarding the original `format-spec'
arguments now has the side effect of influencing text properties, which
conveys richer meaning for modules to act upon when doing things like
deciding whether to hide a given message.
* lisp/erc/erc.el (erc-cmd-IGNORE, erc-cmd-UNIGNORE,
erc--unignore-user, erc-cmd-IDLE, erc-cmd-BANLIST, erc-cmd-MASSUNBAN):
Use `erc-display-message' with `notice' for the TYPE parameter instead
of composing `erc-make-notice' and `erc-display-line'.

14 months agoAllow spoofing process marker in erc-display-line-1
F. Jason Park [Tue, 3 Oct 2023 05:59:22 +0000 (22:59 -0700)]
Allow spoofing process marker in erc-display-line-1

* lisp/erc/erc.el (erc--insert-marker): New internal variable for
overriding `erc-insert-marker' when displaying messages at a
non-default location in the buffer.
(erc-display-line-1): Favor `erc--insert-marker' over
`erc-insert-marker' when non-nil.
; * test/lisp/erc/resources/base/assoc/multi-net/barnet.eld: Timeouts.
; * test/lisp/erc/resources/base/assoc/multi-net/foonet.eld: Timeouts.
; * test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld: Timeouts.
; * test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld: Timeouts.
; * test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Timeouts.
; * test/lisp/erc/resources/sasl/scram-sha-1.eld: Timeouts.
; * test/lisp/erc/resources/sasl/scram-sha-256.eld: Timeouts.

14 months agoSort and dedupe when loading modules in erc-open
F. Jason Park [Sat, 7 Oct 2023 00:34:04 +0000 (17:34 -0700)]
Sort and dedupe when loading modules in erc-open

* doc/misc/erc.texi: Add new subheading "Module Loading" under the
"Modules" chapter.
* lisp/erc/erc.el (erc--sort-modules): New utility function to sort
and dedupe modules.
(erc-modules): In `custom-set' function, factor out collation into
separate utility `erc--sort-modules'.
(erc-update-modules): Call `erc--update-modules' with an argument, the
current value of `erc-modules'.
(erc--aberrant-modules): New variable, a list of symbols whose modules
ERC suspects of being incorrectly defined.
(erc--warn-about-aberrant-modules): New function to print an error
message and emit a warning prior to connecting when
`erc--aberrant-modules' is non-nil.
(erc--find-mode): Make heuristic more robust by always checking for a
mode activation command rather than just a state variable.  This fixes
a compatibility bug, new in 5.6, affecting third-party modules that
autoload module definitions instead of their corresponding
mode-activation commands.
(erc--update-modules): Add new positional argument `modules'.
(erc--setup-buffer-hook): Add new default member,
`erc--warn-about-aberrant-modules'.
(erc-open): Pass sorted `erc-modules' to `erc--update-modules'.
* test/lisp/erc/erc-tests.el (erc--sort-modules): New test.
(erc-tests--update-modules): New fixture.
(erc--update-modules): Remove and rework as three separate tests
dedicated to specific contexts.  The existing one had poor coverage
and was difficult, if not impossible, to follow.
(erc--update-modules/unknown, erc--update-modules/local,
erc--update-modules/realistic): New tests.  (Bug#57955)

14 months agoHonor nil values in erc--restore-initialize-priors
F. Jason Park [Thu, 5 Oct 2023 07:16:46 +0000 (00:16 -0700)]
Honor nil values in erc--restore-initialize-priors

* lisp/erc/erc.el (erc--restore-initialize-priors): Don't produce
invalid "empty" `setq' form when parameter VARS contains defaults that
initialize to nil.  This function is mainly used by local modules,
which were first made usable in ERC 5.5 (bug#57955).
* test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): Fix
expected expansion, which is now slightly leaner.  (Bug#60936)

14 months agoSkip post-minibuffer restore in erc-scrolltobottom-all
F. Jason Park [Wed, 11 Oct 2023 01:14:53 +0000 (18:14 -0700)]
Skip post-minibuffer restore in erc-scrolltobottom-all

* etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in
entry for module `scrolltobottom'.
* lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of
abandoned option `erc-scrolltobottom-relaxed'.
(erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed'
by recognizing a third value state, `relaxed'.  A separate option
would make more sense if other options also depended on
`erc-scrolltobottom-all'.
(erc-scrolltobottom-relaxed): Remove redundant option, which was to be
new in ERC 5.6.
(erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user
attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not
supported.
(erc--scrolltobottom-relaxed-commands,
erc--scrolltobottom-post-force-commands,
erc--scrolltobottom-relaxed-skip-commands): Remove unused variables.
(erc--scrolltobottom-on-pre-command,
erc--scrolltobottom-on-pre-command-relaxed,
erc--scrolltobottom-on-post-command-relaxed): Remove unused functions.
(erc--scrolltobottom-on-post-command): Remove conditional branch for
dealing with a non-nil `erc--scrolltobottom-window-info'.
(erc--scrolltobottom-setup): Convert from generic to normal function
and remove setup and teardown for unused hooks.  Set variable
`read-minibuffer-restore-windows' locally when option
`erc-scrolltobottom-all' is non-nil.
(erc--scrolltobottom-on-pre-insert): Replace reference to subsumed
option `erc-scrolltobottom-relaxed' with new value `relaxed' for
existing option `erc-scrolltobottom-all'.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
(erc-scenarios-scrolltobottom--relaxed): Replace option
`erc-scrolltobottom-relaxed' with new value `relaxed' for
`erc-scrolltobottom-all'.  (Bug#64855)

14 months agoFix `ls-lisp-verbosity` custom type
Mattias Engdegård [Fri, 13 Oct 2023 14:36:46 +0000 (16:36 +0200)]
Fix `ls-lisp-verbosity` custom type

* lisp/ls-lisp.el (ls-lisp-verbosity): Include `modes` in the type
and doc string.

14 months agoFix c-in-knr-argdecl to avoid false recognition of K&R
Alan Mackenzie [Fri, 13 Oct 2023 14:27:18 +0000 (14:27 +0000)]
Fix c-in-knr-argdecl to avoid false recognition of K&R

In the OP's test case, the type of a declaration was a macro
with parentheses, which confused c-in-knr-argdecl.

* lisp/progmodes/cc-engine.el (c-in-knr-argdecl): Amend this
function to return nil if a "parameter declaration" can't be
parsed as a declaration.

14 months agoMerge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:18:06 +0000 (16:18 +0200)]
Merge from origin/emacs-29

c8ea14e7825 Handle quoted tilde in Tramp
30239759ee4 ; Set maintainer for elint.el to emacs-devel
eedd9db6190 Update to Org 9.6.10

# Conflicts:
# lisp/net/tramp-gvfs.el

14 months ago; Merge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:22 +0000 (16:16 +0200)]
; Merge from origin/emacs-29

The following commit was skipped:

73ccd9d2959 Don't call font-lock-mode in treesit-major-mode-setup (bu...

14 months agoMerge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:19 +0000 (16:16 +0200)]
Merge from origin/emacs-29

53292c5d818 Fix treesit-query-validate for string input (bug#66400)
81a0c1ed2e4 ; Improve documentation of VC commands
0590e3e69a9 Recommend `M-x man` in woman.el docs
809da7fc9a1 ; * doc/lispref/processes.texi (Process Buffers): More ac...
8f23a02a9ea Fix updating process-mark position in 'set-process-buffer'

14 months ago; Merge from origin/emacs-29
Michael Albinus [Fri, 13 Oct 2023 14:16:11 +0000 (16:16 +0200)]
; Merge from origin/emacs-29

The following commit was skipped:

247743bd1e9 ; * lisp/treesit.el (treesit-language-at-point-function):...

14 months agoHandle quoted tilde in Tramp
Michael Albinus [Fri, 13 Oct 2023 14:09:51 +0000 (16:09 +0200)]
Handle quoted tilde in Tramp

* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Handle quoted tilde.  (Bug#65685)

* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-tilde):
New test.

14 months agoAdd convenience wrapper for regexp disassembly
Mattias Engdegård [Fri, 13 Oct 2023 13:21:26 +0000 (15:21 +0200)]
Add convenience wrapper for regexp disassembly

* lisp/emacs-lisp/disass.el (re-disassemble): New.
* etc/NEWS: Describe the new function instead of the internal
`re--describe-compiled`.

14 months agoverilog-mode.el: remove impossible cond clause
Mattias Engdegård [Fri, 13 Oct 2023 13:12:03 +0000 (15:12 +0200)]
verilog-mode.el: remove impossible cond clause

* lisp/progmodes/verilog-mode.el (verilog-set-auto-endcomments):
Remove can't-happen clause.

14 months agoSeparate `docstrings-wide` warning identifier
Mattias Engdegård [Fri, 13 Oct 2023 12:31:18 +0000 (14:31 +0200)]
Separate `docstrings-wide` warning identifier

This allows the docstring line width warning to be disabled without
also disabling the one checking for curly quotes etc.

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile-docstring-style-warn):
Add `docstrings-wide`.
* etc/NEWS: Annonuce.

14 months agoClarify java/INSTALL
Po Lu [Fri, 13 Oct 2023 04:57:30 +0000 (12:57 +0800)]
Clarify java/INSTALL

* java/INSTALL: Correct erroneous include exports and also
introduce those omitted within patches to external libraries.
(bug#66507)

14 months agoTry harder to generate tombstones upon emacs_abort
Po Lu [Fri, 13 Oct 2023 03:57:46 +0000 (11:57 +0800)]
Try harder to generate tombstones upon emacs_abort

* src/android.c (HAS_BUILTIN_TRAP): New macro definition.
(emacs_abort) [HAS_BUILTIN_TRAP]: Call __builtin_trap to abort,
in place of dereferencing NULL.

* src/androidterm.c (android_draw_fringe_bitmap): Correct
comment transplanted from X code.

14 months agoReset the Eshell prompt when signaling with no foreground process
Jim Porter [Fri, 13 Oct 2023 01:23:46 +0000 (18:23 -0700)]
Reset the Eshell prompt when signaling with no foreground process

This fixes a small regression from commit eef32d13da5.

* lisp/eshell/esh-proc.el (eshell-reset): Declare here.
(eshell-reset-after-proc): Move implementation to...
(eshell--reset-after-signal): ... here...
(eshell-interrupt-process, eshell-kill-process eshell-quit-process)
(eshell-stop-process, eshell-continue-process): ... and call it.

14 months agoFix a defcustom :type
Mauro Aranda [Thu, 12 Oct 2023 13:17:57 +0000 (10:17 -0300)]
Fix a defcustom :type

* lisp/progmodes/ruby-mode.el (ruby-insert-encoding-magic-comment):
Allow always-utf8.  (Bug#66498)

14 months ago; Correct typo
Po Lu [Thu, 12 Oct 2023 14:04:34 +0000 (22:04 +0800)]
; Correct typo

* etc/NEWS: Fix typo.

14 months agoEnable highlighting Gud execution lines without hl-line-mode
Po Lu [Thu, 12 Oct 2023 13:46:54 +0000 (21:46 +0800)]
Enable highlighting Gud execution lines without hl-line-mode

* doc/emacs/building.texi (Debugger Operation): Mention two new
options and the relationship between Gud and HL Line Mode.

* etc/NEWS (Editing Changes in Emacs 30.1): Mention the new
option.

* lisp/progmodes/gud.el (gud-highlight-current-line-overlay):
New variable.
(gud-sentinel) <signal, exit>: Delete that overlay if set.
(gud-highlight-current-line, gud-highlight-current-line-face):
New user options.
(gud-display-line): Create and move an overlay without employing
hl-line-mode, if so enjoined by the user.

14 months ago; Set maintainer for elint.el to emacs-devel
Stefan Kangas [Thu, 12 Oct 2023 11:23:38 +0000 (13:23 +0200)]
; Set maintainer for elint.el to emacs-devel

* lisp/emacs-lisp/elint.el: Set maintainer to emacs-devel.

14 months agoNew filenotify tests
Michael Albinus [Thu, 12 Oct 2023 09:02:53 +0000 (11:02 +0200)]
New filenotify tests

* src/inotify.c (Finotify_watch_list, Finotify_allocated_p):
Fix argument list.

* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Use `skip-when'.
(file-notify-test12-unmount, file-notify-test12-unmount-remote):
New tests.

14 months agoRespond to JNI errors around drawing operations
Po Lu [Thu, 12 Oct 2023 00:43:56 +0000 (08:43 +0800)]
Respond to JNI errors around drawing operations

* src/android.c (android_fill_polygon, android_draw_rectangle)
(android_draw_point, android_draw_line, android_lock_bitmap):
Check or clear errors around potential JNI errors; the penalty
incurred to performance is not as significant as was expected.

14 months agoFix behavior of Eshell prompt when yanking output into it
Jim Porter [Wed, 11 Oct 2023 18:38:27 +0000 (11:38 -0700)]
Fix behavior of Eshell prompt when yanking output into it

* lisp/eshell/esh-util.el (eshell--unmark-string-as-output): New
function...

* lisp/eshell/esh-mode.el (eshell-mode): ... use it.

* test/lisp/eshell/eshell-tests.el (eshell-test/yank-output): New test
(bug#66469).

14 months agoDocument cl-print.el in cl.texi.
Alan Mackenzie [Wed, 11 Oct 2023 15:03:43 +0000 (15:03 +0000)]
Document cl-print.el in cl.texi.

* doc/misc/cl.texi: (Printing): New chapter which documents
cl-print.el.

* NEWS (cl-print): Add "+++" markings to all the subitems,
which have now been documented.

14 months agoIn cl-prin1, enable raw printing for a byte-compiled function
Alan Mackenzie [Wed, 11 Oct 2023 13:26:01 +0000 (13:26 +0000)]
In cl-prin1, enable raw printing for a byte-compiled function

* lisp/emacs-lisp/cl-print.el (cl-print-compiled): document the
new option `raw'.
(cl-print-object/compiled-function): when cl-print-compiled is
`raw', just print the function using `prin1'.  Apply a button
to this output which, when activated disassembles the function.

* etc/NEWS (cl-print): Add an entry for this new feature.

14 months agoRemedy typo in android.texi
Po Lu [Wed, 11 Oct 2023 10:48:27 +0000 (18:48 +0800)]
Remedy typo in android.texi

* doc/emacs/android.texi (Android Fonts): Replace @xref with
@pxref.

14 months agoUpdate Android keysym list
Po Lu [Wed, 11 Oct 2023 08:58:01 +0000 (16:58 +0800)]
Update Android keysym list

* src/keyboard.c (lispy_function_keys): Introduce entries for
scroll lock, num lock, and input method keys.

14 months ago* lisp/progmodes/project.el (project-mode-line-face): New variable.
Juri Linkov [Wed, 11 Oct 2023 06:27:28 +0000 (09:27 +0300)]
* lisp/progmodes/project.el (project-mode-line-face): New variable.

(project-mode-line-format): Use it (bug#66317).

14 months agoFix erc-server-prevent-duplicates :type
Mauro Aranda [Tue, 10 Oct 2023 23:22:06 +0000 (20:22 -0300)]
Fix erc-server-prevent-duplicates :type

* lisp/erc/erc-backend.el (erc-server-prevent-duplicates): Change
:type to allow a variable-length list of strings.  (Bug#66456)

14 months agoRevert commits dafa6d6badd6 and 72c45fa9109a
Jim Porter [Wed, 6 Sep 2023 01:27:21 +0000 (18:27 -0700)]
Revert commits dafa6d6badd6 and 72c45fa9109a

These were there to work around deficiencies in how Eshell produces
completions for 'pcomplete-argument' (Eshell passed various non-string
objects to Pcomplete, which broke things).  Now, Eshell always returns
a stringified form of the argument, with the original value stored via
the text property 'pcomplete-arg-value'.

* lisp/pcomplete.el (pcomplete-arg): Revert changes back to a simpler
form.

14 months agoFile notifications report unmount events (bug#66381)
Michael Albinus [Tue, 10 Oct 2023 17:51:22 +0000 (19:51 +0200)]
File notifications report unmount events (bug#66381)

* doc/lispref/os.texi (File Notifications): Unmounting a watched
filesystem is reported now.

* etc/NEWS: File notifications report unmount events now.
Fix typos.

* lisp/filenotify.el (file-notify--callback-inotify)
(file-notify--add-watch-inotify): Handle `unmount'.
(file-notify--callback-kqueue, file-notify--add-watch-kqueue):
Handle `revoke'.
(file-notify--callback-gfilenotify): Handle `unmounted'.
(file-notify-callback): Handle `unmount' and `unmounted'.
(file-notify--add-watch-inotify):

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Handle `unmounted'.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Handle `unmount' and `unmounted'.

* src/gfilenotify.c (dir_monitor_callback): Handle Qunmounted.

* src/inotify.c (symbol_to_inotifymask): Handle IN_IGNORED and
IN_UNMOUNT.

* src/kqueue.c (kqueue_callback, Fkqueue_add_watch):
Handle NOTE_REVOKE.
(Fkqueue_add_watch): Adapt docstring.
(syms_of_kqueue): Declare `revoke.

14 months ago; Fix spelling of my name in all source files
Ulrich Müller [Tue, 10 Oct 2023 14:31:53 +0000 (16:31 +0200)]
; Fix spelling of my name in all source files

14 months ago; * lisp/calc/calc-units.el (math-standard-units): Doc improvement.
Mattias Engdegård [Tue, 10 Oct 2023 13:18:52 +0000 (15:18 +0200)]
; * lisp/calc/calc-units.el (math-standard-units): Doc improvement.

14 months ago; * lisp/calc/calc-units.el: Fix spelling of my name.
Ulrich Müller [Tue, 10 Oct 2023 09:59:15 +0000 (11:59 +0200)]
; * lisp/calc/calc-units.el: Fix spelling of my name.

14 months agoUpdate astronomical length units in Calc
Ulrich Müller [Tue, 10 Oct 2023 09:58:03 +0000 (11:58 +0200)]
Update astronomical length units in Calc

* lisp/calc/calc-units.el (math-standard-units): Update the
astronomical unit and the parsec, using their definitions by the
International Astronomical Union.

14 months agoCorrect temperature names in Calc
Mattias Engdegård [Tue, 10 Oct 2023 12:20:05 +0000 (14:20 +0200)]
Correct temperature names in Calc

* doc/misc/calc.texi (The Units Table, Predefined Units):
* lisp/calc/calc-units.el (math-standard-units):
It's just Kelvin, not degree Kelvin.

14 months ago* lisp/calc/calc-units.el (math-standard-units): Document.
Mattias Engdegård [Tue, 10 Oct 2023 11:50:44 +0000 (13:50 +0200)]
* lisp/calc/calc-units.el (math-standard-units): Document.

Some guesswork, but at least it helps someone trying to make sense of
it next time.

14 months ago* doc/emacs/android.texi (Android Software): Fix typo.
Po Lu [Tue, 10 Oct 2023 12:13:50 +0000 (20:13 +0800)]
* doc/emacs/android.texi (Android Software): Fix typo.

14 months agoImprove documentation of 'project-mode-line'
Eli Zaretskii [Tue, 10 Oct 2023 11:46:08 +0000 (14:46 +0300)]
Improve documentation of 'project-mode-line'

* etc/NEWS:
* doc/emacs/maintaining.texi (Projects):
* lisp/progmodes/project.el (project-mode-line): Improve the
documentation of 'project-mode-line'.  (Bug#66317)

14 months agoRevise Android documentation
Po Lu [Tue, 10 Oct 2023 11:34:56 +0000 (19:34 +0800)]
Revise Android documentation

* doc/emacs/android.texi (Android Environment, Android Windowing)
(Android Fonts, Android Troubleshooting, Android Software):
Correct typos and improve wording.

14 months agoImprove documentation of inhibit-double-buffering
Po Lu [Tue, 10 Oct 2023 08:58:21 +0000 (16:58 +0800)]
Improve documentation of inhibit-double-buffering

* doc/lispref/frames.texi (Management Parameters): Reword joke
and mention the precise circumstances where
inhibit-double-double-buffering is useful.

14 months agoImplement frame restacking under Android
Po Lu [Tue, 10 Oct 2023 05:11:14 +0000 (13:11 +0800)]
Implement frame restacking under Android

* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1):
Synchronize with window.children for iteration through it.

* java/org/gnu/emacs/EmacsService.java (queryTree): Synchronize
with windowList for iteration through it.

* java/org/gnu/emacs/EmacsView.java (moveChildToBack): Correct
formatting mistake.
(moveAbove, moveBelow): New functions.

* java/org/gnu/emacs/EmacsWindow.java (destroyHandle, reparentTo)
(raise, lower): Remedy synchronization blunders.
(reconfigure): New function.

* src/android.c (android_init_emacs_window): Link with
`reconfigure'.
(android_reconfigure_wm_window): New wrapper function.

* src/androidfns.c (android_frame_restack): New function.
(Fandroid_frame_restack): Properly implement this function and
expunge outdated comment.

* src/androidgui.h (enum android_stack_mode)
(enum android_window_changes): New enumerators.

14 months agoUpdate to Org 9.6.10
Kyle Meyer [Tue, 10 Oct 2023 03:47:52 +0000 (23:47 -0400)]
Update to Org 9.6.10

14 months agoNew option 'project-mode-line' to show project name on mode line (bug#66317)
Juri Linkov [Mon, 9 Oct 2023 18:09:03 +0000 (21:09 +0300)]
New option 'project-mode-line' to show project name on mode line (bug#66317)

* lisp/bindings.el (standard-mode-line-format):
Add '(project-mode-line project-mode-line-format)'.

* lisp/progmodes/project.el (project-mode-line): New user option.
(project-menu-entry, project-mode-line-map): New variables.
(project-mode-line-format): New variable.
(project-mode-line-format): New function.

14 months ago* lisp/progmodes/xref.el: Show the number of matches on mode-line (bug#66332)
Juri Linkov [Mon, 9 Oct 2023 18:03:03 +0000 (21:03 +0300)]
* lisp/progmodes/xref.el: Show the number of matches on mode-line (bug#66332)

(xref-num-matches-found, xref-num-matches-face, xref-mode-line-matches):
New variables.
(xref--show-xref-buffer): Set xref-num-matches-found to the length of xrefs,
and buffer-local mode-line-process to xref-mode-line-matches.

14 months ago; cperl-mode.el: Don't override fontificaton in comments.
Harald Jörg [Mon, 9 Oct 2023 15:49:15 +0000 (17:49 +0200)]
; cperl-mode.el: Don't override fontificaton in comments.

* lisp/progmodes/cperl-mode.el (cperl-init-faces): Reorder the
matchers for fontification of array and hash elements and keys so
that they don't override comment and string fontification (Bug#66145).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-66145):
New test for all combinations of sigils and brackets/braces to
verify that strings and comments are left untouched.  This test
also works for perl-mode which has always done it correctly.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-66145.pl: New
resource file for the above test.

14 months agoDon't allow Services entries in pop-up menus on macOS (bug#66420)
Mattias Engdegård [Mon, 9 Oct 2023 15:18:17 +0000 (17:18 +0200)]
Don't allow Services entries in pop-up menus on macOS (bug#66420)

* src/nsmenu.m ([EmacsMenu runMenuAt:forFrame:keymaps:]):
Prevent the system from adding context menu plug-ins
(Services entries or sub-menu) to all our pop-up menus.

14 months ago; LLDB synthetic child provider
Gerd Möllmann [Mon, 9 Oct 2023 13:20:37 +0000 (15:20 +0200)]
; LLDB synthetic child provider

14 months agoImprove formatting of bindings in 'help-quick'
Philip Kaludercic [Mon, 9 Oct 2023 08:23:36 +0000 (10:23 +0200)]
Improve formatting of bindings in 'help-quick'

* lisp/help.el (help-quick): Prevent format's padding from extending
text properties beyond the initial string containing the key binding.

14 months agoUse text-mode as default value for 'rcirc-multiline-major-mode'
Philip Kaludercic [Mon, 9 Oct 2023 08:10:47 +0000 (10:10 +0200)]
Use text-mode as default value for 'rcirc-multiline-major-mode'

* lisp/net/rcirc.el (rcirc-multiline-major-mode): Update default value.

14 months agoDon't call font-lock-mode in treesit-major-mode-setup (bug#66223)
Yuan Fu [Wed, 27 Sep 2023 07:21:40 +0000 (00:21 -0700)]
Don't call font-lock-mode in treesit-major-mode-setup (bug#66223)

* lisp/treesit.el (treesit-major-mode-setup): Remove.

(cherry picked from commit a3a840c80a217db7d4d125c667ff7d4946507fbb)

14 months agoFix treesit-query-validate for string input (bug#66400)
nverno [Sun, 8 Oct 2023 02:36:44 +0000 (19:36 -0700)]
Fix treesit-query-validate for string input (bug#66400)

* lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is
string.