Merge from savannah/emacs-30

0edacf2aa7 Add jsdoc support to js-ts-mode
cace0cbee9 ; Restore inadvertently removed line.
2b04effb13 ; * test/lisp/net/shr-tests.el (shr-test--rendering-check...
6619aec6bc ; Don't run new 'shr-test/zoom-image' when built without ...
5d19bfda32 ; * admin/release-branch.txt: Update and fix typo.
fb11294d41 ; Fix typos
This commit is contained in:
Po Lu 2024-06-24 09:43:16 +08:00
commit cb3d92da82
31 changed files with 92 additions and 38 deletions

View file

@ -128823,7 +128823,7 @@
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program "msmtp")
the message seding is handled by an external program, so no Unicode
the message sending is handled by an external program, so no Unicode
encoding is performed in Emacs. Thus Emacs must not assert that the
Unicode encoding was performed.
@ -129602,7 +129602,7 @@
2019-05-27 Glenn Morris <rgm@gnu.org>
* test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.
* test/lisp/autorevert-tests.el: Give up on remote hydra.nixos tests.
(auto-revert--test-enabled-remote): Disable on hydra.nixos.
@ -135286,7 +135286,7 @@
92ce2dd Improve documentation of window parameters
6dc42c5 Improve commentary in frame.el
a8cffcf Fix typo in a doc string
9e79f19 (emacs-26) ; * src/fontset.c (set-fontset-font): Use uppercas...
9e79f19 (emacs-26) ; * src/fontset.c (set-fontset-font): Use uppercase...
# Conflicts:
# lisp/vc/vc.el
@ -223245,7 +223245,7 @@
Make delete-trailing-whitespace delete spaces after form feed
* lisp/simple.el (delete-trailing-whitespace): Treat form fead as
a non-whitespace character (regradless of whether its character syntax
a non-whitespace character (regardless of whether its character syntax
is whitespace) and delete any whitespace following it instead of leaving
lines with form feeds completely unchanged. I.e. a line like "\f " will
now became "\f".

View file

@ -309,7 +309,7 @@
2024-03-31 Michael Albinus <michael.albinus@gmx.de>
Adapt Tramp versio (don't merge)
Adapt Tramp version (don't merge)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.3".

View file

@ -5406,7 +5406,7 @@
(syms_of_androidselect): Define it.
* src/emacs.c (load_pdump): Eschew excessively elaborate dump file
location code on on Android.
location code on Android.
* src/pdumper.c (Fdump_emacs_portable): Allow dumping while
interactive on Android.

View file

@ -87,7 +87,7 @@ be shown. On positions 3,4, and 7, the @samp{alog} function will be
As is my wont, I started hacking on it almost immediately. I first
The latter criterion is the "je ne sais quoi" of the artistic aspect of
order but are now listed consecutively en bloc.
"mot de passe" "Mot de passe")
"mot de passe" "Mot de passe")
Reported by Mor Zahavi <morzahavi@me.com>. (Bug#51271)
* etc/refcards/fr-refcard.tex (section{Formater}): Remove mention
Reported by Ture Pålsson.

View file

@ -32,6 +32,7 @@ msdos
ot
parm
parms
proced
reenable
reenabled
requestor

View file

@ -42,7 +42,8 @@ Instructions for cutting the Emacs release branch
M-x set-version RET XY+1.0.50 RET
This creates a new file etc/NEWS.XY. "git add" it.
This creates a new file etc/NEWS. "git add" it.
(The original NEWS gets renamed into NEWS.XY.)
Change the value of 'customize-changed-options-previous-release'
in cus-edit.el to reference emacs-XY.1, the next version to be
@ -60,7 +61,7 @@ Instructions for cutting the Emacs release branch
module_env_snippet_XY+1="$srcdir/src/module-env-XY+1.h"
. adding a new 'struct emacs_env_XY+1' to src/emacs-module.h.in,
with the contents identical to'struct emacs_env_XY', with one
with the contents identical to 'struct emacs_env_XY', with one
line added:
@module_env_snippet_XY+1@

View file

@ -4890,7 +4890,7 @@
2011-05-10 Jim Meyering <meyering@redhat.com>
* minibuf.texi: Fix typo "in in -> in".
* minibuf.texi: Fix typo.
2011-05-06 Paul Eggert <eggert@cs.ucla.edu>

View file

@ -29,7 +29,7 @@ current buffer, using a given set of rules.
@cindex root, of parsing expression grammar
@cindex entry-point, of parsing expression grammar
Each rule in a @acronym{PEG} is referred to as a @dfn{parsing
expression} (@acronym{PEX}), and can be specified a a literal string, a
expression} (@acronym{PEX}), and can be specified a literal string, a
regexp-like character range or set, a peg-specific construct resembling
an Emacs Lisp function call, a reference to another rule, or a
combination of any of these. A grammar is expressed as a tree of rules

View file

@ -5128,7 +5128,7 @@ started on line 2. Lines 4 and 5 get the syntaxes
though part of a function.
Note that the @code{requires} on Line 3 begins a @dfn{requires
expression}, not a a requires clause, hence its components are not
expression}, not a requires clause, hence its components are not
assigned @code{constraint-cont}. See
@url{https://en.cppreference.com/w/cpp/language/requires}.

View file

@ -20413,7 +20413,7 @@ Anyway, if you'd like to dig into it yourself, here's an example:
(read-only nil)
(orphan -10)
(adapt t)
(files "/hom/larsi/News/gnu.SCORE")
(files "/home/larsi/News/gnu.SCORE")
(exclude-files "all.SCORE")
(local (gnus-newsgroup-auto-expire t)
(gnus-summary-make-false-root empty))

View file

@ -177,7 +177,7 @@ Previously, when exporting to Org, all the citations and
=print_bibliography= keywords, were transformed according to the
chosen citation processor.
This is no loner the case. All the citation-related markup is now
This is no longer the case. All the citation-related markup is now
exported as is.
The previous behavior can be reverted by setting new custom option

View file

@ -848,7 +848,7 @@ more..."
`(org-example ((,class (:foreground "blue" :background "#EEFFEE"))))
`(org-footnote ((,class (:underline t :foreground "#008ED1"))))
`(org-formula ((,class (:foreground "chocolate1"))))
;; org-habit colours are thanks to zenburn
;; org-habit colors are thanks to zenburn
`(org-habit-ready-face ((t :background "#7F9F7F"))) ; ,zenburn-green
`(org-habit-alert-face ((t :background "#E0CF9F" :foreground "#3F3F3F"))) ; ,zenburn-yellow-1 fg ,zenburn-bg
`(org-habit-clear-face ((t :background "#5C888B"))) ; ,zenburn-blue-3

View file

@ -570,7 +570,7 @@
1986-01-18 Richard M. Stallman (rms@prep)
* doctor.el: Fix typo "symtoms".
* doctor.el: Fix typo for "symptoms".
1986-01-10 Richard Mlynarik (mly@prep)

View file

@ -622,7 +622,7 @@ Included databases are filtered based on `semanticdb-find-default-throttle'."
;; INCLUDETAG should have some way to reference where it came
;; from! If not, TABLE should provide the way. Each time we
;; look up a tag, we may need to find it in some relative way
;; and must set our current buffer eto the origin of includetag
;; and must set our current buffer to the origin of includetag
;; or nothing may work.
(setq originfiledir
(cond ((semantic-tag-file-name includetag)

View file

@ -992,7 +992,7 @@ Each symbol is bound to a single completion entry.")
;; Updating the database
;;-----------------------------------------------
;;
;; These are the internal functions used to update the datebase
;; These are the internal functions used to update the database
;;
;;
(defvar completion-to-accept nil

View file

@ -256,7 +256,7 @@ specifying a region in the current buffer, or (:file . FILENAME)
to temporarily insert the contents of FILENAME.
Before executing BODY, narrow the buffer to the text for COMMAND
and and set point to the beginning of the narrowed region.
and set point to the beginning of the narrowed region.
The value returned is the last form in BODY."
(declare (indent 1))

View file

@ -5560,7 +5560,7 @@
2011-05-10 Jim Meyering <meyering@redhat.com>
* shr.el (shr-colorize-region): Fix typo "on on -> on".
* shr.el (shr-colorize-region): Fix typo.
2011-05-10 Julien Danjou <julien@danjou.info>

View file

@ -2861,7 +2861,7 @@ file's directory then expand relative links.
If the optional TYPE is passed as `attachment' and the path is a
descendant of the DEFAULT-DIRECTORY, the generated link will be
specified as an an \"attachment:\" style link."
specified as an \"attachment:\" style link."
(when (stringp result)
(let* ((result-file-name (expand-file-name result))
(base-file-name (buffer-file-name (buffer-base-buffer)))

View file

@ -105,7 +105,7 @@ For details see the variable `org-adapt-indentation'."
(defcustom org-indent-post-buffer-init-functions nil
"Hook run after org-indent finishes initializing a buffer.
The function(s) in in this hook must accept a single argument representing
The function(s) in this hook must accept a single argument representing
the initialized buffer."
:group 'org-indent
:package-version '(Org . "9.7")

View file

@ -15434,7 +15434,7 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like
(defun org-modify-ts-extra (ts-string pos nincrements increment-step)
"Change the lead-time/repeat fields at POS in timestamp string TS-STRING.
POS is the position in the timestamp string to be changed.
NINCREMENTS is the number of incremenets/decrements.
NINCREMENTS is the number of increments/decrements.
INCREMENT-STEP is step used for a single increment when POS in on
minutes. Before incrementing minutes, they are rounded to

View file

@ -1954,7 +1954,7 @@ ender."
;; The following is no longer used (2020-02-16).
;; (c-lang-defconst c-last-open-c-comment-start-on-line-re
;; "Regexp which matches the last block comment start on the
;; current ine, if any, or nil in those languages without block
;; current one, if any, or nil in those languages without block
;; comments. When a match is found, submatch 1 contains the comment
;; starter."
;; t "\\(/\\*\\)\\([^*]\\|\\*+\\([^*/]\\|$\\)\\)*$"

View file

@ -347,7 +347,7 @@ The actually processing is done by DO-STRING and DO-REGION
DEFVAR forms reset the variables to the init values."
(save-excursion
;; Find the end of the defun this way to avoid having the region
;; possibly end with a comment (it there'a a comment after the
;; possibly end with a comment (it there's a comment after the
;; final parenthesis).
(beginning-of-defun)
(forward-sexp)

View file

@ -3634,7 +3634,32 @@ Check if a node type is available, then return the right indent rules."
:language 'javascript
:feature 'escape-sequence
:override t
'((escape_sequence) @font-lock-escape-face))
'((escape_sequence) @font-lock-escape-face)
:language 'jsdoc
:override t
:feature 'keyword
'((tag_name) @font-lock-keyword-face)
:language 'jsdoc
:override t
:feature 'bracket
'((["{" "}"]) @font-lock-bracket-face)
:language 'jsdoc
:override t
:feature 'property
'((type) @font-lock-variable-use-face)
:language 'jsdoc
:override t
:feature 'definition
'((identifier) @font-lock-variable-name-face)
:language 'jsdoc
:override t
:feature 'comment
'((description) @font-lock-comment-face))
"Tree-sitter font-lock settings.")
(defun js--fontify-template-string (node override start end &rest _)
@ -3857,6 +3882,9 @@ See `treesit-thing-settings' for more information.")
"Nodes that designate sexps in JavaScript.
See `treesit-thing-settings' for more information.")
(defvar js--treesit-jsdoc-beginning-regexp (rx bos "/**")
"Regular expression matching the beginning of a jsdoc block comment.")
;;;###autoload
(define-derived-mode js-ts-mode js-base-mode "JavaScript"
"Major mode for editing JavaScript.
@ -3882,7 +3910,8 @@ See `treesit-thing-settings' for more information.")
(setq-local syntax-propertize-function #'js-ts--syntax-propertize)
;; Tree-sitter setup.
(treesit-parser-create 'javascript)
(setq-local treesit-primary-parser (treesit-parser-create 'javascript))
;; Indent.
(setq-local treesit-simple-indent-rules js--treesit-indent-rules)
;; Navigation.
@ -3909,6 +3938,16 @@ See `treesit-thing-settings' for more information.")
( assignment constant escape-sequence jsx number
pattern string-interpolation)
( bracket delimiter function operator property)))
(when (treesit-ready-p 'jsdoc t)
(setq-local treesit-range-settings
(treesit-range-rules
:embed 'jsdoc
:host 'javascript
`(((comment) @capture (:match ,js--treesit-jsdoc-beginning-regexp @capture))))))
(setq-local treesit-language-at-point-function #'js-ts-language-at-point)
;; Imenu
(setq-local treesit-simple-imenu-settings
`(("Function" "\\`function_declaration\\'" nil nil)
@ -3950,6 +3989,17 @@ See `treesit-thing-settings' for more information.")
(put-text-property ns (1+ ns) 'syntax-table syntax)
(put-text-property (1- ne) ne 'syntax-table syntax)))))
(defun js-ts-language-at-point (point)
"Return the language at POINT."
(let ((node (treesit-node-at point 'javascript)))
(if (and (treesit-ready-p 'jsdoc)
(equal (treesit-node-type node) "comment")
(string-match-p
js--treesit-jsdoc-beginning-regexp
(treesit-node-text node)))
'jsdoc
'javascript)))
;;;###autoload
(define-derived-mode js-json-mode prog-mode "JSON"
:syntax-table js-mode-syntax-table

View file

@ -717,7 +717,7 @@ characters of the current line."
(c-ts-common-comment-2nd-line-matcher
c-ts-common-comment-2nd-line-anchor
1)))
"Tree-sitter indentation rules for for `phpdoc'.")
"Tree-sitter indentation rules for `phpdoc'.")
;;; Font-lock
@ -1561,7 +1561,7 @@ The optional TYPE can be the symbol \"port\", \"hostname\", \"document-root\" or
(defun run-php (&optional cmd config)
"Run an PHP interpreter as a inferior process.
Arguments CMD an CONFIG, default to `php-ts-mode-php-executable'
Arguments CMD and CONFIG, default to `php-ts-mode-php-executable'
and `php-ts-mode-php-config' respectively, control which PHP interpreter is run.
Prompt for CMD if `php-ts-mode-php-executable' is nil.
Optional CONFIG, if supplied, is the php.ini file to use."

View file

@ -1418,7 +1418,7 @@ Leave point at the beginning of the tag."
(with-syntax-table sgml-tag-syntax-table
(let ((pos (point)))
(condition-case nil
;; FIXME: This does not correctly skip over PI an CDATA tags.
;; FIXME: This does not correctly skip over PI and CDATA tags.
(sgml-forward-sexp 1)
(scan-error
;; This < seems to be just a spurious one, let's ignore it.

View file

@ -1052,7 +1052,7 @@ replacement.
In the second case, the second string is used to provide a longer
name for the keys under a prefix.
MORE allows you to specifcy additional KEY REPLACEMENT pairs. All
MORE allows you to specify additional KEY REPLACEMENT pairs. All
replacements are added to `which-key-replacement-alist'."
;; TODO: Make interactive
(while key-sequence
@ -1923,7 +1923,7 @@ Requires `which-key-compute-remaps' to be non-nil."
PREFIX limits bindings to those starting with this key
sequence. START is a list of existing bindings to add to. If ALL
is non-nil, recursively retrieve all bindings below PREFIX. If
EVIL is non-nil, extract active evil bidings."
EVIL is non-nil, extract active evil bindings."
(let ((bindings start)
(ignore '(self-insert-command ignore ignore-event company-ignore))
(evil-map

View file

@ -5956,7 +5956,7 @@
Assume C89 or later for math functions (Bug#12381).
This simplifies the code, and makes it a bit smaller and faster,
and (most important) makes it easier to clean up signal handling
since we can stop worring about floating-point exceptions in
since we can stop worrying about floating-point exceptions in
library code. That was a problem before C89, but the problem
went away many years ago on all practical Emacs targets.
* data.c, image.c, lread.c, print.c:

View file

@ -605,7 +605,7 @@ get_encoder_clsid (const char *type, CLSID *clsid)
DEFUN ("w32image-create-thumbnail", Fw32image_create_thumbnail,
Sw32image_create_thumbnail, 5, 5, 0,
doc: /* Create a HEIGHT by WIDTH thumnail file THUMB-FILE for image INPUT-FILE.
doc: /* Create a HEIGHT by WIDTH thumbnail file THUMB-FILE for image INPUT-FILE.
TYPE is the image type to use for the thumbnail file, a string. It is
usually identical to the file-name extension of THUMB-FILE, but without
the leading period, and both "jpeg" and "jpg" can be used for JPEG.

View file

@ -51,7 +51,8 @@ Raise a test failure if the rendered buffer does not match NAME.txt.
Append CONTEXT to the failure data, if non-nil."
(let ((text-file (file-name-concat (ert-resource-directory) (concat name ".txt")))
(html-file (file-name-concat (ert-resource-directory) (concat name ".html")))
(description (if context (format "%s (%s)" name context) name)))
(description (if context (format "%s (%s)" name context) name))
(coding-system-for-read 'utf-8))
(with-temp-buffer
(insert-file-contents html-file)
(let ((dom (libxml-parse-html-region (point-min) (point-max)))
@ -134,6 +135,7 @@ settings, then once more for each (OPTION . VALUE) pair.")
(ert-deftest shr-test/zoom-image ()
"Test that `shr-zoom-image' properly replaces the original image."
(skip-unless (bound-and-true-p image-types))
(let ((image (expand-file-name "data/image/blank-100x200.png"
(getenv "EMACS_TEST_DIRECTORY"))))
(dolist (alt '(nil "" "nothing to see here"))

View file

@ -8,7 +8,7 @@
$printed = 1;
# With cperl-extra-delimiters-mode=on the previous lines are a label
# and a a print statement. This line here is a comment. Without
# and a print statement. This line here is a comment. Without
# cperl-extra-delimiters-mode, all this is part of the variable
# declaration.

View file

@ -201,7 +201,7 @@ to `ses--bar' and inserting a row, makes A2 value empty, and `ses--bar' equal to
(ert-deftest ses-jump-B2-lowcase ()
"Test jumping to cell B2 by use of lowcase cell name string"
"Test jumping to cell B2 by use of lowercase cell name string"
(let ((ses-initial-size '(3 . 3))
ses-after-entry-functions)
(with-temp-buffer
@ -211,7 +211,7 @@ to `ses--bar' and inserting a row, makes A2 value empty, and `ses--bar' equal to
(should (eq (ses--cell-at-pos (point)) 'B2)))))
(ert-deftest ses-jump-B2-lowcase-keys ()
"Test jumping to cell B2 by use of lowcase cell name string with simulating keys"
"Test jumping to cell B2 by use of lowercase cell name string with simulating keys"
(let ((ses-initial-size '(3 . 3))
ses-after-entry-functions)
(with-temp-buffer