Po Lu [Mon, 8 Jul 2024 07:33:26 +0000 (15:33 +0800)]
Correct conditions for iconification on Android
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
<isPaused>: Rename to <isStopped>.
(attachWindow): Adjust to match.
(onPause): Delete function.
(onStop): Deem frames iconified after calls to onStop instead.
Michael Albinus [Sun, 7 Jul 2024 17:34:37 +0000 (19:34 +0200)]
Fix Tramp parser
* lisp/net/tramp.el (tramp-host-with-port-regexp): Declare.
(tramp-set-syntax): Set also `tramp-host-with-port-regexp'.
(tramp-build-host-with-port-regexp): New defun.
(tramp-host-with-port-regexp): Make it a defvar. (Bug#71972)
Stefan Kangas [Sun, 7 Jul 2024 11:40:59 +0000 (13:40 +0200)]
Make `checkdoc-verb-check-experimental-flag` default to nil
This user option leads to a very large amount of false positives in
practice. In my personal experience, almost all occurrences that are
flagged are false positives. Flipping the default to something less
intrusive should hopefully encourage more use of checkdoc.
* lisp/emacs-lisp/checkdoc.el
(checkdoc-verb-check-experimental-flag): Switch the default to nil.
Stefan Kangas [Sun, 7 Jul 2024 11:37:55 +0000 (13:37 +0200)]
checkdoc: Flag formatting mistakes in warnings
* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-next-string)
(checkdoc-message-text-engine): Flag formatting mistakes in warnings.
(checkdoc--warning-function-re): New variable.
Juri Linkov [Sun, 7 Jul 2024 06:57:34 +0000 (09:57 +0300)]
* lisp/files.el (insert-directory): Quote switches in wildcard case.
Use shell-quote-wildcard-pattern on the switches string split by
split-string-and-unquote. This helps to quote such switches as
"--block-size='1" (bug#71935).
Juri Linkov [Sun, 7 Jul 2024 06:52:01 +0000 (09:52 +0300)]
Fix uses of 'dired-omit-mode' (bug#71905)
* lisp/dired.el (dired-jump): Disable dired-omit-mode with -1.
* lisp/files.el (recover-session): Disable dired-omit-mode
explicitly afterwards instead of modifying dired-mode-hook
that fails when it contains a lambda.
Stefan Kangas [Sun, 7 Jul 2024 02:31:01 +0000 (04:31 +0200)]
Fix fontification of network files in `awk-mode`
* lisp/progmodes/cc-awk.el (awk-font-lock-keywords): Fix fontification
of special network file names such as "/inet4/tcp/0/localhost/daytime".
See Info node '(gawk) TCP/IP Networking'.
Po Lu [Sun, 7 Jul 2024 02:19:31 +0000 (10:19 +0800)]
Correct JNI string error checking and miscellaneous corrections
* src/android-emacs.c (main): Do not attempt to load the
bootstrap class path, which is redundant on all Android releases.
* src/android.c (initEmacs, android_browse_url): Do not assume
exceptions will be raised if GetStringUTFChars fails. Decode
Android JNI strings as Qandroid_jni.
* src/androidvfs.c (android_saf_check_nonnull): New function.
(android_saf_new_mkdir): Likewise.
JD Smith [Sat, 6 Jul 2024 13:22:33 +0000 (09:22 -0400)]
Fix formatting of tables with thead/tfoot but no tbody
Correctly handle formatting of tables containing thead and/or tfoot, but
without any tbody, to prevent including thead/tfoot content twice within
the table's derived body.
* lisp/net/shr.el (shr--fix-tbody): Omit 'thead' and 'tfoot' from
implicit body. (Bug#71685)
* test/lisp/net/shr-resources/table.html:
* test/lisp/net/shr-resources/table.txt: New tests for table rendering.
Vincenzo Pupillo [Thu, 27 Jun 2024 14:13:58 +0000 (16:13 +0200)]
Fix treesit range rule for jsdoc
The parser for jsdoc is local, so it is necessary for the range
rule to take this into account.
* lisp/progmodes/js.el (js-ts-mode): Add ':local' keyword.
(js-ts-language-at-point): Remove 'js-ts-language-at-point'.
(Bug#71776)
Daniel Semyonov [Mon, 1 Jul 2024 22:42:26 +0000 (01:42 +0300)]
nnfeed: (Mostly) fix group descriptions
* lisp/gnus/nnfeed.el (nnfeed--group-description): New function.
(nnfeed-request-group-description, nnfeed-request-list-newsgroups):
Use `nnfeed--group-description' and always return t if group data
is found. (Bug#71888)
Eli Zaretskii [Sat, 6 Jul 2024 07:32:39 +0000 (10:32 +0300)]
Fix returning to original TTY frame after 'rmail-reply'
* lisp/mail/rmail.el (rmail-start-mail): Record the frame from
which an Rmail command, such as 'rmail-mail' or 'rmail-reply', was
invoked.
(rmail--find-orig-rmail-frame): New function.
(rmail-mail-return): Use 'rmail--find-orig-rmail-frame' to find
the original frame, and make it the top frame on its TTY terminal.
(Bug#69738)
Eli Zaretskii [Fri, 5 Jul 2024 19:00:08 +0000 (22:00 +0300)]
Improve warnings from native compiler
* src/comp.c (syms_of_comp) <native-compiler>: Rename from 'comp'.
* src/lread.c (maybe_swap_for_eln):
* lisp/emacs-lisp/comp.el (comp--fwprop):
* lisp/emacs-lisp/comp-run.el
(comp--accept-and-process-async-output, native--compile-async):
Adjust to the new symbol.
Stefan Monnier [Fri, 5 Jul 2024 14:02:39 +0000 (10:02 -0400)]
perl-mode.el: Improve indent after hanging open-paren
Make the indentation of the code right after an open paren/brace
use the same rule as already used to indent the corresponding
matching paren/brace.
* lisp/progmodes/perl-mode.el (perl-calculate-indent):
Use `perl-indent-new-calculate`s "virtual" indentation instead of
approximating it with `current-indentation`.
Eli Zaretskii [Fri, 5 Jul 2024 10:58:11 +0000 (13:58 +0300)]
Fix file-name detection in Dired under -F
* lisp/files.el (insert-directory-clean): Support all the symbols
appended to file names by the -F/--classify option of 'ls'. See
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg00366.html
for the details.
Po Lu [Fri, 5 Jul 2024 04:09:52 +0000 (12:09 +0800)]
Enable Gnulib substitute on Android systems with defective strnlen
* configure.ac (AC_FUNC_STRNLEN): Detect a bug where strnlen is
liable to integer overflows if addition of the search limit to
the string would also overflow.
Jim Porter [Sun, 23 Jun 2024 21:53:49 +0000 (14:53 -0700)]
In SHR, load from URL cache if possible when zooming images
* lisp/net/shr.el (shr-replace-image): New function extracted from...
(shr-image-fetched): ... here.
(shr-zoom-image): Check URL cache and call 'shr-replace-image' if we
can.
Jim Porter [Sun, 23 Jun 2024 21:48:32 +0000 (14:48 -0700)]
Fix the different image zoom levels in SHR to work as expected
* lisp/net/shr.el (shr-image-zoom-levels): New option.
(shr-image-zoom-level-alist): New variable.
(shr-zoom-image): Take POSITION and ZOOM-LEVEL arguments. Consult
'shr-image-zoom-levels'.
(shr-put-image): Use 'shr-image-zoom-level-alist'.
(shr-rescale-image): Only reset width *or* height when either is too
large.
(shr--image-zoom-original-size, shr--image-zoom-image-size)
(shr--image-zoom-fill-height): New functions.
Jim Porter [Sun, 23 Jun 2024 19:25:25 +0000 (12:25 -0700)]
In SHR, keep track of image sizes as specified by the HTML
Previously, these values got lost when zooming the image.
* lisp/net/shr.el (shr-tag-img): Set 'image-dom-size'...
(shr-zoom-image): ... use it. Rename 'size' to 'zoom'.
(shr-image-fetched): Rename 'image-size' to 'image-zoom'.
(shr-put-image): Accept the zoom level as ':zoom' and document it.
Previously, FLAGS was a mix of alist and plist(!).
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Rename "size" to
"zoom".
Jim Porter [Sun, 23 Jun 2024 19:18:57 +0000 (12:18 -0700)]
Slice images based on their height in SHR, not their zoom level
* lisp/net/shr.el (shr-sliced-image-height): New option...
(shr-put-image): ... use it. Compute the number of slices in relation
to the image height; this way, each slice is roughly the height of a
line of ordinary text.
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Update test, since
zooming no longer necessarily triggers slicing.
Make `value<` compare fixnums and floats by value, as `<` does, instead
of coercing the fixnum to a float first which is what C would do.
This matters when the fixnum cannot be represented as a float. For
example, C would evaluate
Eli Zaretskii [Wed, 3 Jul 2024 19:13:42 +0000 (22:13 +0300)]
Fix MS-Windows build with native-compilation
* src/w32.c (globals_of_w32): Move re-initialization of
Vlibrary_cache from here...
* src/emacs.c (main): ...to here, as it must be after load_pdump.
(Bug#71916)
Stefan Kangas [Wed, 3 Jul 2024 00:02:31 +0000 (02:02 +0200)]
Focus more on MS-Windows than MS-DOS in FAQ
* doc/misc/efaq.texi (Editing Windows files): Rename section from
"Editing MS-DOS files", and update the text to focus on Windows.
* doc/misc/efaq.texi (Colors on a TTY)
(Emacs does not display 8-bit characters): Mention MS-Windows before
MS-DOS.
Stefan Kangas [Mon, 1 Jul 2024 03:14:25 +0000 (05:14 +0200)]
Autoload some string functions
These functions are documented in both `(elisp) Creating Strings' and
'M-x shortdoc RET string RET', so users will expect them to be available
without having to require 'subr-x'.
Po Lu [Wed, 3 Jul 2024 09:05:24 +0000 (17:05 +0800)]
Adapt doc-view-set-slice-using-mouse to touch-screen input
* doc/lispref/commands.texi (Touchscreen Events): Document means
of unconditionally enabling simple conversion.
* lisp/doc-view.el (doc-view-set-slice-using-mouse): Bind
touch-screen-simple-mouse-conversion to t, and read translated
mouse events with read-key rather than read-event.
* lisp/subr.el (read-key): Don't permit idle timer to interfere
with reporting of translated mouse events.
* lisp/touch-screen.el (touch-screen-simple-mouse-conversion):
New variable.
(touch-screen-handle-point-up, touch-screen-handle-touch):
Unconditionally enable `mouse-drag' translation if set. Decide
whether to send drag or mouse events by the values of the two
touchpoints' XY positions and point and double-click-fuzz, as in
make_lispy_event.
Stefan Monnier [Tue, 2 Jul 2024 20:28:08 +0000 (16:28 -0400)]
(buf_*pos_to_*pos): Fix minor off-by one
* src/marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
Slightly restructure the markers loop so we check `distance`
also before "consider"ing the first marker.
Po Lu [Tue, 2 Jul 2024 04:10:43 +0000 (12:10 +0800)]
Port seccomp acceleration to Linux 3.5.0
* etc/NEWS: Update correspondingly.
* exec/Makefile.in (config-mips.m4): Don't define rule
or predicate $(LOADOBJS) on it elsewhere than on MIPS.
* exec/README: Direct developers to GDB.
* exec/trace.c (finish_exec): Resume the tracee after reporting
an error in `exec'.
(after_fork): If seccomp is enabled on Android, and the kernel
is 4.7 or earlier, detect whether revisions to the sequencing of
seccomp events have been backported from 4.8.
(exec_waitpid): Resume the process with PTRACE_CONT after
receiving an unknown signal.
(exec_init): Cease disabling seccomp on Android kernels earlier
than 4.8.