Merge from savannah/emacs-30

58e4bfe340 Add two missing NULL checks of malloc'd values on Android
81ca9c75f1 ; * etc/PROBLEMS: Document how to grant storage permissio...
d82d468979 ; * etc/TODO: Rethink finder-known-keywords.
b9b9c33dcb Fix (Non)GNU ELPA description in manual
87a61eba1b Move 'package-archives' documentation to emacs manual
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242).
3cfbeb3fca ; Fix >72 character long lines in docstring
c68886ddb7 ; Change "virus" to "malicious" in lispref
6701866be4 Document (Non-)GNU ELPA in emacs manual
02851768b7 ; * .mailmap: Add entry for Thuna.  (Bug#76221)
2d7a8cbf4c Fix author name
1931425748 Use c-ts-common's comment setup in go-ts-mode (bug#75978)
316893ca38 Add java-language-server to eglot-server-programs
This commit is contained in:
Po Lu 2025-02-15 16:58:55 +08:00
commit c37e7cef42
12 changed files with 83 additions and 43 deletions

View file

@ -192,6 +192,7 @@ Tassilo Horn <tsdh@gnu.org> <tassilo@member.fsf.org>
Ted Zlatanov <tzz@lifelogs.com>
Thien-Thi Nguyen <ttn@gnu.org> <ttn@gnuvola.org>
Thierry Volpiatto <thievol@posteo.net> <thierry.volpiatto@gmail.com>
Thuna <thuna.cing@gmail.com>
Tino Calancha <ccalancha@suse.com> <f92capac@gmail.com>
Tino Calancha <ccalancha@suse.com> <tino.calancha@gmail.com>
Tom Tromey <tom@tromey.com> <tromey@redhat.com>

View file

@ -279,7 +279,7 @@ files.")
("Thomas Dye" "Tom Dye")
("Thomas Horsley" "Tom Horsley") ; FIXME ?
("Thomas Wurgler" "Tom Wurgler")
("Umut Thuna Akgul" "thuna\\.cing@gmail\\.com")
("Umut Tuna Akgül" "thuna\\.cing@gmail\\.com")
("Toby Cubitt" "Toby S\\. Cubitt")
("Tomohiko Morioka" "MORIOKA Tomohiko")
("Torbjörn Axelsson" "Torbjvrn Axelsson")

View file

@ -35,10 +35,13 @@ install or uninstall packages via this buffer. @xref{Package Menu}.
name of a package, and displays a help buffer describing the
attributes of the package and the features that it implements.
By default, Emacs downloads packages from a package archive
maintained by the Emacs developers and hosted by the GNU project.
Optionally, you can also download packages from archives maintained by
third parties. @xref{Package Installation}.
@cindex GNU ELPA
@cindex NonGNU ELPA
By default, Emacs downloads packages from two archives:
@url{https://elpa.gnu.org/, GNU ELPA} and @url{https://elpa.nongnu.org/,
NonGNU ELPA}. These are maintained by the Emacs developers and hosted
by the GNU project. Optionally, you can also download packages from
third-party archives. @xref{Package Installation}.
For information about turning an Emacs Lisp program into an
installable package, @xref{Packaging,,,elisp, The Emacs Lisp Reference
@ -397,17 +400,44 @@ package is somehow unavailable, Emacs signals an error and stops
installation.) A package's requirements list is shown in its help
buffer.
@vindex package-archives
By default, packages are downloaded from a single package archive
maintained by the Emacs developers. This is controlled by the
variable @code{package-archives}, whose value is a list of package
archives known to Emacs. Each list element must have the form
@code{(@var{id} . @var{location})}, where @var{id} is the name of a
package archive and @var{location} is the @acronym{URL} or
By default, Emacs downloads packages from two archives:
@url{https://elpa.gnu.org/, GNU ELPA} and @url{https://elpa.nongnu.org/,
NonGNU ELPA}. These are maintained by the Emacs developers and hosted
by the GNU project. @dfn{GNU ELPA} contains GNU packages that we
consider part of GNU Emacs, but are distributed separately from the core
Emacs. @dfn{NonGNU ELPA} contains third-party packages whose copyright
has not been assigned to the Free Software Foundation.@footnote{For more
information about copyright assignments, see
@url{https://www.gnu.org/licenses/why-assign.html, Why the FSF Gets
Copyright Assignments from Contributors}.}
@noindent
This is controlled by the variable @code{package-archives}, whose value
is a list of package archives known to Emacs. Each list element must
have the form @code{(@var{id} . @var{location})}, where @var{id} is the
name of a package archive and @var{location} is the @acronym{URL} or
name of the package archive directory. You can alter this list if you
wish to use third party package archives---but do so at your own risk,
and use only third parties that you think you can trust!
@defopt package-archives
The value of this variable is an alist of package archives recognized
by the Emacs package manager.
Each alist element corresponds to one archive, and should have the
form @code{(@var{id} . @var{location})}, where @var{id} is the name of
the archive (a string) and @var{location} is its @dfn{base location}
(a string).
If the base location starts with @samp{http:} or @samp{https:}, it
is treated as an HTTP(S) URL, and packages are downloaded from this
archive via HTTP(S) (as is the case for the default GNU archive).
Otherwise, the base location should be a directory name. In this
case, Emacs retrieves packages from this archive via ordinary file
access. Such local archives are mainly useful for testing.
@end defopt
@anchor{Package Signing}
@cindex package security
@cindex package signing

View file

@ -2998,7 +2998,7 @@ known cases where @code{unsafep} returns @code{nil} for an unsafe
expression. However, a safe Lisp expression can return a string
with a @code{display} property, containing an associated Lisp
expression to be executed after the string is inserted into a buffer.
This associated expression can be a virus. In order to be safe, you
This associated expression can be malicious. In order to be safe, you
must delete properties from all strings calculated by user code before
inserting them into buffers.

View file

@ -309,25 +309,6 @@ hosted on @url{https://elpa.gnu.org, GNU ELPA} and
@url{https://elpa.nongnu.org, non-GNU ELPA}. This section describes
how to set up and maintain a package archive.
@cindex base location, package archive
@defopt package-archives
The value of this variable is an alist of package archives recognized
by the Emacs package manager.
Each alist element corresponds to one archive, and should have the
form @code{(@var{id} . @var{location})}, where @var{id} is the name of
the archive (a string) and @var{location} is its @dfn{base location}
(a string).
If the base location starts with @samp{http:} or @samp{https:}, it
is treated as an HTTP(S) URL, and packages are downloaded from this
archive via HTTP(S) (as is the case for the default GNU archive).
Otherwise, the base location should be a directory name. In this
case, Emacs retrieves packages from this archive via ordinary file
access. Such local archives are mainly useful for testing.
@end defopt
A package archive is simply a directory in which the package files,
and associated files, are stored. If you want the archive to be
reachable via HTTP, this directory must be accessible to a web server;

View file

@ -3804,6 +3804,16 @@ devices manufactured by OnePlus and possibly others. Sadly, to the best
of our knowledge such events cannot be distinguished from legitimate
keypresses.
** Emacs crashes or is not acknowledged by the OS when requesting storage permissions.
This is only possible on Wear OS (an Android distribution), where the
system component that provides confirmation dialogs for this type of
permission is unavailable. You may circumvent this component by
connecting to your device over ADB as in the preceding entries and
executing:
$ adb shell appops set --uid org.gnu.emacs MANAGE_EXTERNAL_STORAGE allow
* Build-time problems
** Configuration

View file

@ -95,6 +95,14 @@ modify things in their .emacs.
** See if other files can use generated-autoload-file (see e.g. ps-print)
** Come up with better set of keywords for 'finder-known-keywords'.
Eli writes: "The keywords we use today are IMO not rational and mostly
not useful. On the one hand, we have specific keywords like 'abbrevs',
OTOH we have general and vague keywords like 'convenience' and 'tools'
... I'd very much appreciate if someone will volunteer to rethink our
keywords and come up with a useful list (which probably will be
longer)."
** Do interactive mode tagging for commands
Change "(interactive)" to "(interactive nil foo-mode)" for command
completion purposes. Pick a major mode or ELisp library, and check

View file

@ -3555,7 +3555,8 @@ like the `beginning-of-buffer' command."
(defun read-file-name (prompt &optional dir default-filename mustmatch initial predicate)
"Read file name, prompting with PROMPT and completing in directory DIR.
The return value is not expanded---you must call `expand-file-name' yourself.
The return value is not expanded---you must call `expand-file-name'
yourself.
DIR is the directory to use for completing relative file names.
It should be an absolute directory name, or nil (which means the
@ -3589,8 +3590,8 @@ Fourth arg MUSTMATCH can take the following values:
input unquoted by `substitute-in-file-name', which see. If the
function returns a non-nil value, the minibuffer is exited with
that argument as the value.
- anything else behaves like t except that typing RET does not exit if it
does non-null completion.
- anything else behaves like t except that typing RET does not exit if
it does non-null completion.
Fifth arg INITIAL specifies text to start with. It will be
interpreted as the trailing part of DEFAULT-FILENAME, so using a

View file

@ -283,7 +283,8 @@ automatically)."
. ("gopls"))
((R-mode ess-r-mode) . ("R" "--slave" "-e"
"languageserver::run()"))
((java-mode java-ts-mode) . ("jdtls"))
((java-mode java-ts-mode)
. ,(eglot-alternatives '("jdtls" "java-language-server")))
((dart-mode dart-ts-mode)
. ("dart" "language-server"
"--client-id" "emacs.eglot-dart"))

View file

@ -42,6 +42,7 @@
;;; Code:
(require 'treesit)
(require 'c-ts-common)
(eval-when-compile (require 'rx))
(treesit-declare-unavailable-functions)
@ -279,9 +280,7 @@
(setq treesit-primary-parser (treesit-parser-create 'go))
;; Comments.
(setq-local comment-start "// ")
(setq-local comment-end "")
(setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
(c-ts-common-comment-setup)
;; Navigation.
(setq-local treesit-defun-type-regexp
@ -564,9 +563,7 @@ what the parent of the node would be if it were a node."
(setq treesit-primary-parser (treesit-parser-create 'gomod))
;; Comments.
(setq-local comment-start "// ")
(setq-local comment-end "")
(setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
(c-ts-common-comment-setup)
;; Indent.
(setq-local indent-tabs-mode t

View file

@ -2530,6 +2530,11 @@ NATIVE_NAME (sendDndUri) (JNIEnv *env, jobject object,
length = (*env)->GetStringLength (env, string);
buffer = malloc (length * sizeof *buffer);
/* Out of memory. */
if (!buffer)
return 0;
characters = (*env)->GetStringChars (env, string, NULL);
if (!characters)
@ -2567,6 +2572,11 @@ NATIVE_NAME (sendDndText) (JNIEnv *env, jobject object,
length = (*env)->GetStringLength (env, string);
buffer = malloc (length * sizeof *buffer);
/* Out of memory. */
if (!buffer)
return 0;
characters = (*env)->GetStringChars (env, string, NULL);
if (!characters)

View file

@ -3437,7 +3437,8 @@ characters; nil stands for the empty string.
FUNCTION must be a function of one argument, and must return a value
that is a sequence of characters: either a string, or a vector or
list of numbers that are valid character codepoints. */)
list of numbers that are valid character codepoints; nil is treated
as an empty string. */)
(Lisp_Object function, Lisp_Object sequence, Lisp_Object separator)
{
USE_SAFE_ALLOCA;