Jonas Bernoulli [Mon, 24 Jun 2024 18:34:53 +0000 (20:34 +0200)]
Add missing builtin package declarations
* lisp/editorconfig-conf-mode.el:
* lisp/editorconfig-core-handle.el:
* lisp/editorconfig-core.el:
* lisp/editorconfig-fnmatch.el:
* lisp/editorconfig-tools.el: Declare library as part of the
'editorconfig' package.
This fixes two bugs, one of them restoring compatibility with the
version that ships with Emacs 29, making emoji-insert usable again.
The other changes are of cosmetic nature. The only exception is a new
command, whose creation lead to the discovery of one of the bugs, and
remains unused until a package author actually binds it in a prefix.
I.e., unless someone actually uses this, the risk of a regression is
close to zero, and even if it is used, it can only affect the prefix
that binds it.
Update options that depend on 'which-key-dont-use-unicode'
* lisp/which-key.el (which-key-dont-use-unicode): Add a custom setter
that re-evaluates a manual list of options use
'which-key-dont-use-unicode' to determine their default value.
Po Lu [Mon, 24 Jun 2024 04:04:05 +0000 (12:04 +0800)]
Fix omission of updates to child frames on Android
* java/org/gnu/emacs/EmacsView.java (onAttachedFromWindow):
Force a layout cycle rather than report exposure immediately.
(prepareForLayout): Delete function.
* java/org/gnu/emacs/EmacsWindow.java (mapWindow): Remove
redundant calls to prepareForLayout.
* src/androidterm.c (handle_one_android_event): Do not swap
buffers when exposure is registered by a frame only partially
updated.
Damien Cassou [Fri, 14 Jun 2024 08:46:42 +0000 (10:46 +0200)]
Add jsdoc support to js-ts-mode
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add jsdoc
font-lock settings.
(js--treesit-jsdoc-beginning-regexp): New variable to match the
beginning of a jsdoc block.
(js-ts-mode): Add jsdoc support. Save the 'javascript parser to
`treesit-primary-parser'. Configure `treesit-range-settings' to
use a jsdoc parser within a JavaScript file.
(js-ts-language-at-point): New function to return either 'jsdoc or
'javascript depending on where the point is.
Stefan Kangas [Sun, 23 Jun 2024 15:34:38 +0000 (17:34 +0200)]
Delete obsolete file process.cocci
* admin/coccinelle/process.cocci: Delete file. This semantic patch was
converting code to use the PVAR macro, which was removed by Paul Eggert
on 2012-08-17 (commit 6a09a33b5551).
Martin Rudalics [Sun, 23 Jun 2024 08:26:57 +0000 (10:26 +0200)]
Fix a bug in 'switch-to-buffer'
* lisp/window.el (switch-to-buffer): When asked to switch to the
buffer of the selected window,
'switch-to-buffer-obey-display-actions' is non-nil and
'pop-to-buffer' uses the selected window, don't try to restore
window start and point from 'window-prev-buffers' (Bug#71616).
Jim Porter [Thu, 20 Jun 2024 03:59:59 +0000 (20:59 -0700)]
Fix zooming images in SHR
Previously, for images with no alt-text, the zoomed image wouldn't get
properly inserted. For images with alt-text, both the zoomed and
unzoomed image would be displayed at once (bug#71666).
* lisp/net/shr.el (shr-sliced-image): New face.
(shr-zoom-image): Reimplement using
'next/previous-single-property-change', and don't bother deleting any of
the text.
(shr-image-fetched): Clean up any overlays when deleting the old region.
(shr-put-image): Ensure we always have a non-empty string to put the
image on. For sliced images, just use "*", since we'll repeat it, so we
can't preserve the original buffer text exactly anyway. Apply an
overlay to sliced images to prevent unsightly text decorations.
(shr-tag-img): Move the placeholder space insertion where it should be
and explain what it's doing.
* test/lisp/net/shr-tests.el (shr-test--max-wait-time)
(shr-test-wait-for): New helper functions.
(shr-test/zoom-image): New test.
Vincenzo Pupillo [Sat, 22 Jun 2024 21:11:17 +0000 (23:11 +0200)]
Colorize CSS property value like `css--fontify-region'
If the value of a property is text representing a CSS color,
it will be fontified such that its background is the color
itself. 'php-ts-mode-css-fontify-colors' can be used to
disable this behaviour.
* lisp/progmodes/php-ts-mode.el (php-ts-mode-css-fontify-colors):
New custom var.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--colorize-css-value):
New function.
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Use the new
function. (Bug#71724)
Stefan Kangas [Sat, 22 Jun 2024 22:16:42 +0000 (00:16 +0200)]
Add assignment form as `etc/copyright-assign.txt`
This change was discussed in:
https://lists.gnu.org/r/emacs-devel/2023-12/msg00326.html
* etc/copyright-assign.txt: New file copied from
https://www.gnu.org/s/gnulib/Copyright/request-assign.future
* doc/emacs/trouble.texi (Copyright Assignment):
* etc/TODO: Point to above new file.
Michael Albinus [Sat, 22 Jun 2024 17:52:06 +0000 (19:52 +0200)]
Minor changes in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-shell-file-name):
Use connection-local value.
(tramp--test-shell-command-switch): New defun.
(tramp-test28-process-file)
(tramp-test34-explicit-shell-file-name): Use it.
(tramp--test-supports-processes-p): Simplify.
(tramp--test-check-files): Use `tramp-compat-seq-keep'.
(tramp-test45-asynchronous-requests): Don't let-bind `shell-file-name'.
(tramp-test45-asynchronous-requests): Adjust timer.
(tramp-test45-asynchronous-requests): Add another test message.
Michael Albinus [Sat, 22 Jun 2024 17:49:45 +0000 (19:49 +0200)]
Tramp: Fix bug#71709, and other minor changes
* lisp/net/tramp-message.el (tramp-backtrace): Print also in batch mode.
* lisp/net/tramp.el (tramp-skeleton-file-exists-p): Check for
property only.
(tramp-skeleton-make-process): Don't set `default-directory'.
(tramp-handle-make-process): Set it. (Bug#71709)
Vincenzo Pupillo [Sat, 22 Jun 2024 14:22:16 +0000 (16:22 +0200)]
Fix for grammar change of keyword "virtual" in tree-sitter-cpp
The new rule works with both the new (>= 0.22.1) and the
old (<= 0.22.0) grammar libraries.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed
the keyword "virtual".
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
New font lock rule. (Bug#71518)
Stefan Kangas [Sat, 22 Jun 2024 16:42:06 +0000 (18:42 +0200)]
Replace literal whitespace with `\s`
* test/lisp/vc/log-edit-tests.el (log-edit-fill-entry-confinement)
(log-edit-fill-entry-space-substitution)
(log-edit-fill-entry-initial-wrapping): Replace literal space character
with '\s', to avoid tripping up merge scripts.
* lisp/editorconfig.el (editorconfig--get-indentation-python-mode):
New function.
(editorconfig-indentation-alist): Use it.
(editorconfig-indent-size-vars): Improve docstring.
(editorconfig--default-indent-size-function): Add docstring.
Ihor Radchenko [Fri, 21 Jun 2024 13:45:25 +0000 (15:45 +0200)]
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
* lisp/org/ol.el (org-link-expand-abbrev): Refuse expanding %(...)
link abbrevs that specify unsafe function. Instead, display a
warning, and do not expand the abbrev. Clear all the text properties
from the returned link, to avoid any potential vulnerabilities caused
by properties that may contain arbitrary Elisp.
Stefan Kangas [Sat, 22 Jun 2024 14:50:12 +0000 (16:50 +0200)]
Use UTC when generating man page timestamps
* doc/man/ebrowse.1:
* doc/man/emacs.1.in:
* doc/man/emacsclient.1:
* doc/man/etags.1: Add 'time-stamp-time-zone' to local variables to
prefer UTC when generating timestamp.
Vincenzo Pupillo [Fri, 21 Jun 2024 21:24:33 +0000 (23:24 +0200)]
Support for indentation of PHP alternative syntax control structures
For some control structures, PHP provides an alternative syntax.
A new rule has been added to handle this syntax.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--indent-styles):
New rule for PHP alternative syntax. (Bug#71710)
Vincenzo Pupillo [Sun, 16 Jun 2024 14:32:53 +0000 (16:32 +0200)]
Fix font lock regex for user defined constant in PHP
The old regex also captured functions with two or more
uppercase characters. This new regex fixes that issue.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings):
New regex that match only user-defined constants. (Bug#71593)
Make Compilation mode recognize non-legacy Kotlin/Gradle errors
The Compilation mode recognizes Kotlin/Gradle errors but only in
the now legacy format. The current format, which has been in wide
use for about a year, is not supported. This change adds support
for the current format.
* etc/compilation.txt: (symbols): Add examples of non-legacy
Kotlin/Gradle warnings and errors.
* lisp/progmodes/compile.el: (compilation-error-regexp-alist-alist):
Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add
'grade-kotlin' that matches the errors and warnings outputted by
the current (non-legacy) Kotlin/Gradle. (Bug#70797)
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Rename 'gradle-kotlin' to
'gradle-kotlin-legacy' and add two test cases for the newly added,
non-legacy Kotlin/Gradle warnings and errors.
Po Lu [Fri, 21 Jun 2024 07:12:07 +0000 (15:12 +0800)]
Fix execution of tool-bar commands read within minibuffer-error-handler
* src/keyboard.c (read_char): Arrange that the original event be
recorded when a posn is promoted to a prefix key and an END_TIME
is suppressing additions to this_command_keys.
Jim Porter [Fri, 14 Jun 2024 04:26:53 +0000 (21:26 -0700)]
Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs
The previous implementation in 6ae2b74ed20 only stopped at prompts,
which isn't the right behavior (bug#61545).
* lisp/eshell/em-prompt.el (eshell-forward-paragraph)
(eshell-backward-paragraph): Reimplement to handle prompts and
paragraphs (the latter by calling the original 'forward-paragraph').
* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/next-previous-prompt/multiline): Rename.
(em-prompt-test/forward-backward-paragraph-1): New function.
(em-prompt-test/forward-backward-paragraph)
(em-prompt-test/forward-backward-paragraph/multiline): New tests.
Jim Porter [Sat, 15 Jun 2024 18:03:33 +0000 (11:03 -0700)]
Limit the amount of text we examine when looking for password prompts
Both Comint and Eshell do this, and it can significantly slow down
commands that write a lot of output (bug#71576).
* lisp/comint.el (comint-password-prompt-max-length): New variable...
(comint-watch-for-password-prompt): ... use it. Additionally, use the
matched result for the Emacs-based password prompt.
* lisp/eshell/esh-mode.el (eshell-password-prompt-max-length): New
variable...
(eshell-watch-for-password-prompt): ... use it.
* lisp/net/net-utils.el (ping): With a prefix argument, prompt the user
for flags to pass to the "ping" command. (Bug#71438)
* etc/NEWS: Document the above change.
Stefan Kangas [Thu, 20 Jun 2024 11:30:11 +0000 (13:30 +0200)]
Remove more references to Windows 95
* doc/lispref/frames.texi (Window System Selections):
* doc/misc/ediff.texi (Patch and Diff Programs):
* doc/misc/efaq-w32.texi (Third-party multibyte, Swap Caps NT)
(Subprocesses and floppy drive):
* etc/PROBLEMS:
* lisp/printing.el (pr-path-alist, pr-command):
* lisp/ps-print.el: Remove more references to Windows 95, which is not
supported by Emacs.
Eli Zaretskii [Thu, 20 Jun 2024 10:42:04 +0000 (13:42 +0300)]
Fix last change
* src/xdisp.c (handle_line_prefix): Set the 'align_visually_p'
only after pushing the iterator.
(pop_it): Reset the 'align_visually_p' flag. (Bug#71605)