Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-06-01 07:40:25 +08:00
commit a964116008
10 changed files with 120 additions and 100 deletions

View file

@ -37,7 +37,8 @@ See the file 'java/INSTALL' for more details.
* Changes in Emacs 30.1
** Help
** 'describe-function' shows function inferred type when available.
*** 'describe-function' shows function inferred type when available.
For native compiled Lisp functions 'describe-function' prints (after
the signature) the automatically inferred function type as well.
@ -320,7 +321,7 @@ project, that you can quickly select using 'project-switch-project'
---
*** New user option 'package-vc-allow-side-effects'.
When non-nil, package specifications with side-effects for building
software will used when building a package.
software will be used when building a package.
** Flymake
@ -362,7 +363,7 @@ This keyword enables the user to install packages using 'package-vc'.
*** New commands for reading mailing lists.
The new Rmail commands 'rmail-mailing-list-post',
'rmail-mailing-list-unsubscribe', 'rmail-mailing-list-help', and
'rmail-mailing-list-archive allow to, respectively, post to,
'rmail-mailing-list-archive' allow to, respectively, post to,
unsubscribe from, request help about, and browse the archives, of the
mailing list from which the current email message was delivered.
@ -372,8 +373,8 @@ mailing list from which the current email message was delivered.
*** New user option 'dictionary-search-interface'.
Controls how the 'dictionary-search' command prompts for and displays
dictionary definitions. Customize this user option to 'help' to have
'dictionary-search' display definitions in a *Help* buffer and provide
dictionary-based minibuffer completion for word selection.
'dictionary-search' display definitions in a "*Help*" buffer and
provide dictionary-based minibuffer completion for word selection.
---
*** New user option 'dictionary-read-word-prompt'.
@ -388,8 +389,8 @@ displays word definitions. If non-nil, this user option should be set
to a function that displays a word definition obtained from a
dictionary server. The new function
'dictionary-display-definition-in-help-buffer' can be used to display
the definition in a *Help* buffer, instead of the default *Dictionary*
buffer.
the definition in a "*Help*" buffer, instead of the default
"*Dictionary*" buffer.
---
*** New user option 'dictionary-read-word-function'.
@ -409,7 +410,6 @@ name as a string. The new function
'dictionary-completing-read-dictionary' can be used to prompt with
completion based on dictionaries that the server supports.
* New Modes and Packages in Emacs 30.1
@ -491,8 +491,8 @@ The new functions 'touch-screen-track-tap' and
'touch-screen-track-drag' handle tracking common touch screen gestures
from within a command.
** New variable 'safe-local-variable-directories'.
This variable names directories in which Emacs will treat all
** New user option 'safe-local-variable-directories'.
This user option names directories in which Emacs will treat all
directory-local variables as safe.
** New variable 'inhibit-auto-fill' to temporarily prevent auto-fill.
@ -628,7 +628,7 @@ some obvious cases. Examples:
(aset [3 4] 0 8)
(aset "abc" 1 ?d)
Such code may have unpredictable behaviour because the constants are
Such code may have unpredictable behavior because the constants are
part of the program, not data structures generated afresh during
execution, and the compiler does not expect them to change.

View file

@ -818,7 +818,7 @@ prepending a space before it."
(setq glyph (lgstring-glyph gstring i))
(lglyph-set-char glyph 32)
(lglyph-set-width glyph 1)
(setq i (+ 2)))
(setq i (+ i 2)))
(let ((from (lglyph-from glyph))
(to (lglyph-to glyph))
(j (1+ i)))

View file

@ -3568,9 +3568,9 @@ lambda-expression."
match-data
;; Adding these functions causes many warnings;
;; evaluate how many of them are false first.
delq delete
;; Warning about these functions causes some false positives that are
;; laborious to eliminate; see bug#61730.
;;delq delete
;;nconc plist-put
)))
(dolist (fn important-return-value-fns)

View file

@ -166,18 +166,22 @@ is an upper-case character."
(upcase-region (point) (progn (forward-char arg) (point)))))
;;;###autoload
(defun forward-to-word (arg)
"Move forward until encountering the beginning of a word.
With argument, do this that many times."
(defun forward-to-word (&optional arg)
"Move forward until encountering the beginning of the ARGth word.
ARG defaults to 1. When called interactively, ARG is the prefix
numeric argument."
(interactive "^p")
(unless arg (setq arg 1))
(or (re-search-forward (if (> arg 0) "\\W\\b" "\\b\\W") nil t arg)
(goto-char (if (> arg 0) (point-max) (point-min)))))
;;;###autoload
(defun backward-to-word (arg)
"Move backward until encountering the end of a word.
With argument, do this that many times."
(defun backward-to-word (&optional arg)
"Move backward until encountering the end of the ARGth word.
ARG defaults to 1. When called interactively, ARG is the prefix
numeric argument."
(interactive "^p")
(unless arg (setq arg 1))
(forward-to-word (- arg)))
;;;###autoload

View file

@ -2530,7 +2530,7 @@ flags that control whether to collect or render objects."
(setq natural-width
(or (dom-attr dom 'shr-td-cache-natural)
(let ((natural (max (shr-pixel-buffer-width)
(shr-dom-max-natural-width dom 0))))
(shr-dom-max-natural-width dom))))
(dom-set-attribute dom 'shr-td-cache-natural natural)
natural))))
(if (and natural-width
@ -2559,22 +2559,18 @@ flags that control whether to collect or render objects."
(cdr (assq 'color shr-stylesheet))
(cdr (assq 'background-color shr-stylesheet))))))
(defun shr-dom-max-natural-width (dom max)
(if (eq (dom-tag dom) 'table)
(max max (or
(cl-loop
for line in (dom-attr dom 'shr-suggested-widths)
maximize (+
shr-table-separator-length
(cl-loop for elem in line
summing
(+ (cdr elem)
(* 2 shr-table-separator-length)))))
0))
(dolist (child (dom-children dom))
(unless (stringp child)
(setq max (max (shr-dom-max-natural-width child max)))))
max))
(defun shr-dom-max-natural-width (dom)
(or (if (eq (dom-tag dom) 'table)
(cl-loop for line in (dom-attr dom 'shr-suggested-widths)
maximize (+ shr-table-separator-length
(cl-loop for elem in line
summing
(+ (cdr elem)
(* 2 shr-table-separator-length)))))
(cl-loop for child in (dom-children dom)
unless (stringp child)
maximize (shr-dom-max-natural-width child)))
0))
(defun shr-buffer-width ()
(goto-char (point-min))

View file

@ -114,28 +114,16 @@ RUN src/emacs -Q --batch \
--eval '(setq \
treesit-extra-load-path (list "/usr/local/lib/tree-sitter") \
treesit-language-source-alist \
(quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
(c "https://github.com/tree-sitter/tree-sitter-c") \
(cmake "https://github.com/uyha/tree-sitter-cmake") \
(quote ((c "https://github.com/tree-sitter/tree-sitter-c") \
(cpp "https://github.com/tree-sitter/tree-sitter-cpp") \
(css "https://github.com/tree-sitter/tree-sitter-css") \
(elisp "https://github.com/Wilfred/tree-sitter-elisp") \
(elixir "https://github.com/elixir-lang/tree-sitter-elixir") \
(java "https://github.com/tree-sitter/tree-sitter-java") \
(go "https://github.com/tree-sitter/tree-sitter-go") \
(gomod "https://github.com/camdencheek/tree-sitter-go-mod") \
(heex "https://github.com/phoenixframework/tree-sitter-heex") \
(html "https://github.com/tree-sitter/tree-sitter-html") \
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src") \
(json "https://github.com/tree-sitter/tree-sitter-json") \
(make "https://github.com/alemuller/tree-sitter-make") \
(markdown "https://github.com/ikatyang/tree-sitter-markdown") \
(python "https://github.com/tree-sitter/tree-sitter-python") \
(java "https://github.com/tree-sitter/tree-sitter-java") \
(ruby "https://github.com/tree-sitter/tree-sitter-ruby") \
(toml "https://github.com/tree-sitter/tree-sitter-toml") \
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") \
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") \
(yaml "https://github.com/ikatyang/tree-sitter-yaml"))))' \
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))))' \
--eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \
(treesit-install-language-grammar lang "/usr/local/lib/tree-sitter"))'

View file

@ -53,6 +53,17 @@ define subdir_template
define changes
@echo ' - lisp/emacs-lisp/faceup*.el' >>$(FILE)
endef
else ifeq ($(findstring progmodes, $(1)), progmodes)
define changes
@echo ' - $(1)/eglot.el' >>$(FILE)
@echo ' - $(1)/*-ts-mode.el' >>$(FILE)
@echo ' - test/$(1)/eglot-tests.el' >>$(FILE)
@echo ' - test/$(1)/*-ts-mode-resources/**' >>$(FILE)
@echo ' - test/$(1)/*-ts-mode-tests.el' >>$(FILE)
@echo ' when: never' >>$(FILE)
@echo ' - changes:' >>$(FILE)
@echo ' - $(1)/*.el' >>$(FILE)
endef
else ifeq ($(findstring so-long, $(1)), so-long)
define changes
@echo ' - lisp/so-long*.el' >>$(FILE)
@ -80,8 +91,8 @@ define subdir_template
@echo ' when: never' >>$(FILE)
@echo ' - changes:' >>$(FILE)
$(changes)
@echo ' - test/$(1)/*.el' >>$(FILE)
@echo ' - test/$(1)/*resources/**' >>$(FILE)
@echo ' - test/$(1)/*.el' >>$(FILE)
@echo ' variables:' >>$(FILE)
@echo ' target: emacs-inotify' >>$(FILE)
@echo ' make_params: "-k -C test $(target)"' >>$(FILE)
@ -89,11 +100,20 @@ endef
$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
TREE-SITTER-FILES ?= $(shell cd .. ; find lisp -name "*-ts-*.el" | sort | sed s/\\.el/.log/)
all: generate-test-jobs
.PHONY: generate-test-jobs $(FILE) $(SUBDIR_TARGETS)
.PHONY: generate-test-jobs $(FILE) $(SUBDIR_TARGETS) tree-sitter-files-template
generate-test-jobs: $(FILE) $(SUBDIR_TARGETS)
generate-test-jobs: $(FILE) $(SUBDIR_TARGETS) tree-sitter-files-template
tree-sitter-files-template:
@echo >>$(FILE)
@echo '.tree-sitter-files-template:' >>$(FILE)
@echo ' variables:' >>$(FILE)
@echo ' tree-sitter-files: >-' >>$(FILE)
@for name in $(TREE-SITTER-FILES) ; do echo " $${name}" >>$(FILE) ; done
$(FILE):
$(AM_V_GEN)

View file

@ -184,6 +184,7 @@ default:
- "**.in"
- lisp/progmodes/*-ts-mode.el
- test/infra/*
- test/lisp/progmodes/*-ts-mode-resources/**
- test/lisp/progmodes/*-ts-mode-tests.el
.native-comp-template:
@ -274,22 +275,14 @@ build-image-tree-sitter:
test-tree-sitter:
stage: platforms
extends: [.job-template, .test-template, .tree-sitter-template]
extends: [.job-template, .test-template, .tree-sitter-template, .tree-sitter-files-template]
needs:
- job: build-image-tree-sitter
optional: true
variables:
target: emacs-tree-sitter
# This is needed in order to get a JUnit test report.
files: >-
lisp/progmodes/c-ts-mode-tests.log
lisp/progmodes/elixir-ts-mode-tests.log
lisp/progmodes/go-ts-mode-tests.log
lisp/progmodes/heex-ts-mode-tests.log
lisp/progmodes/java-ts-mode-tests.log
lisp/progmodes/ruby-ts-mode-tests.log
lisp/progmodes/typescript-ts-mode-tests.log
make_params: '-k -C test check-expensive LD_LIBRARY_PATH=/usr/local/lib/tree-sitter LOGFILES="$files"'
make_params: '-k -C test check-expensive LD_LIBRARY_PATH=/usr/local/lib/tree-sitter LOGFILES="$tree-sitter-files"'
build-image-gnustep:
stage: platform-images

View file

@ -11,8 +11,8 @@ test-lib-src-inotify:
when: never
- changes:
- lib-src/*.{h,c}
- test/lib-src/*.el
- test/lib-src/*resources/**
- test/lib-src/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lib-src"
@ -28,8 +28,8 @@ test-lisp-inotify:
when: never
- changes:
- lisp/*.el
- test/lisp/*.el
- test/lisp/*resources/**
- test/lisp/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp"
@ -45,8 +45,8 @@ test-lisp-calc-inotify:
when: never
- changes:
- lisp/calc/*.el
- test/lisp/calc/*.el
- test/lisp/calc/*resources/**
- test/lisp/calc/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-calc"
@ -62,8 +62,8 @@ test-lisp-calendar-inotify:
when: never
- changes:
- lisp/calendar/*.el
- test/lisp/calendar/*.el
- test/lisp/calendar/*resources/**
- test/lisp/calendar/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-calendar"
@ -79,8 +79,8 @@ test-lisp-cedet-inotify:
when: never
- changes:
- lisp/cedet/*.el
- test/lisp/cedet/*.el
- test/lisp/cedet/*resources/**
- test/lisp/cedet/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-cedet"
@ -96,8 +96,8 @@ test-lisp-cedet-semantic-inotify:
when: never
- changes:
- lisp/cedet/semantic/*.el
- test/lisp/cedet/semantic/*.el
- test/lisp/cedet/semantic/*resources/**
- test/lisp/cedet/semantic/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-cedet-semantic"
@ -113,8 +113,8 @@ test-lisp-cedet-semantic-bovine-inotify:
when: never
- changes:
- lisp/cedet/semantic/bovine/*.el
- test/lisp/cedet/semantic/bovine/*.el
- test/lisp/cedet/semantic/bovine/*resources/**
- test/lisp/cedet/semantic/bovine/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-cedet-semantic-bovine"
@ -130,8 +130,8 @@ test-lisp-cedet-srecode-inotify:
when: never
- changes:
- lisp/cedet/srecode/*.el
- test/lisp/cedet/srecode/*.el
- test/lisp/cedet/srecode/*resources/**
- test/lisp/cedet/srecode/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-cedet-srecode"
@ -147,8 +147,8 @@ test-lisp-emacs-lisp-inotify:
when: never
- changes:
- lisp/emacs-lisp/*.el
- test/lisp/emacs-lisp/*.el
- test/lisp/emacs-lisp/*resources/**
- test/lisp/emacs-lisp/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-emacs-lisp"
@ -164,8 +164,8 @@ test-lisp-emacs-lisp-eieio-tests-inotify:
when: never
- changes:
- lisp/emacs-lisp/eieio*.el
- test/lisp/emacs-lisp/eieio-tests/*.el
- test/lisp/emacs-lisp/eieio-tests/*resources/**
- test/lisp/emacs-lisp/eieio-tests/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-emacs-lisp-eieio-tests"
@ -181,8 +181,8 @@ test-lisp-emacs-lisp-faceup-tests-inotify:
when: never
- changes:
- lisp/emacs-lisp/faceup*.el
- test/lisp/emacs-lisp/faceup-tests/*.el
- test/lisp/emacs-lisp/faceup-tests/*resources/**
- test/lisp/emacs-lisp/faceup-tests/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-emacs-lisp-faceup-tests"
@ -198,8 +198,8 @@ test-lisp-emulation-inotify:
when: never
- changes:
- lisp/emulation/*.el
- test/lisp/emulation/*.el
- test/lisp/emulation/*resources/**
- test/lisp/emulation/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-emulation"
@ -215,8 +215,8 @@ test-lisp-erc-inotify:
when: never
- changes:
- lisp/erc/*.el
- test/lisp/erc/*.el
- test/lisp/erc/*resources/**
- test/lisp/erc/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-erc"
@ -232,8 +232,8 @@ test-lisp-eshell-inotify:
when: never
- changes:
- lisp/eshell/*.el
- test/lisp/eshell/*.el
- test/lisp/eshell/*resources/**
- test/lisp/eshell/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-eshell"
@ -249,8 +249,8 @@ test-lisp-gnus-inotify:
when: never
- changes:
- lisp/gnus/*.el
- test/lisp/gnus/*.el
- test/lisp/gnus/*resources/**
- test/lisp/gnus/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-gnus"
@ -266,8 +266,8 @@ test-lisp-image-inotify:
when: never
- changes:
- lisp/image/*.el
- test/lisp/image/*.el
- test/lisp/image/*resources/**
- test/lisp/image/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-image"
@ -283,8 +283,8 @@ test-lisp-international-inotify:
when: never
- changes:
- lisp/international/*.el
- test/lisp/international/*.el
- test/lisp/international/*resources/**
- test/lisp/international/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-international"
@ -300,8 +300,8 @@ test-lisp-mail-inotify:
when: never
- changes:
- lisp/mail/*.el
- test/lisp/mail/*.el
- test/lisp/mail/*resources/**
- test/lisp/mail/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-mail"
@ -317,8 +317,8 @@ test-lisp-mh-e-inotify:
when: never
- changes:
- lisp/mh-e/*.el
- test/lisp/mh-e/*.el
- test/lisp/mh-e/*resources/**
- test/lisp/mh-e/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-mh-e"
@ -334,8 +334,8 @@ test-lisp-net-inotify:
when: never
- changes:
- lisp/net/*.el
- test/lisp/net/*.el
- test/lisp/net/*resources/**
- test/lisp/net/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-net"
@ -351,8 +351,8 @@ test-lisp-nxml-inotify:
when: never
- changes:
- lisp/nxml/*.el
- test/lisp/nxml/*.el
- test/lisp/nxml/*resources/**
- test/lisp/nxml/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-nxml"
@ -368,8 +368,8 @@ test-lisp-obsolete-inotify:
when: never
- changes:
- lisp/obsolete/*.el
- test/lisp/obsolete/*.el
- test/lisp/obsolete/*resources/**
- test/lisp/obsolete/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-obsolete"
@ -385,8 +385,8 @@ test-lisp-org-inotify:
when: never
- changes:
- lisp/org/*.el
- test/lisp/org/*.el
- test/lisp/org/*resources/**
- test/lisp/org/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-org"
@ -402,8 +402,8 @@ test-lisp-play-inotify:
when: never
- changes:
- lisp/play/*.el
- test/lisp/play/*.el
- test/lisp/play/*resources/**
- test/lisp/play/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-play"
@ -417,10 +417,17 @@ test-lisp-progmodes-inotify:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- changes:
- lisp/progmodes/eglot.el
- lisp/progmodes/*-ts-mode.el
- test/lisp/progmodes/eglot-tests.el
- test/lisp/progmodes/*-ts-mode-resources/**
- test/lisp/progmodes/*-ts-mode-tests.el
when: never
- changes:
- lisp/progmodes/*.el
- test/lisp/progmodes/*.el
- test/lisp/progmodes/*resources/**
- test/lisp/progmodes/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-progmodes"
@ -436,8 +443,8 @@ test-lisp-so-long-tests-inotify:
when: never
- changes:
- lisp/so-long*.el
- test/lisp/so-long-tests/*.el
- test/lisp/so-long-tests/*resources/**
- test/lisp/so-long-tests/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-so-long-tests"
@ -453,8 +460,8 @@ test-lisp-term-inotify:
when: never
- changes:
- lisp/term/*.el
- test/lisp/term/*.el
- test/lisp/term/*resources/**
- test/lisp/term/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-term"
@ -470,8 +477,8 @@ test-lisp-textmodes-inotify:
when: never
- changes:
- lisp/textmodes/*.el
- test/lisp/textmodes/*.el
- test/lisp/textmodes/*resources/**
- test/lisp/textmodes/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-textmodes"
@ -487,8 +494,8 @@ test-lisp-url-inotify:
when: never
- changes:
- lisp/url/*.el
- test/lisp/url/*.el
- test/lisp/url/*resources/**
- test/lisp/url/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-url"
@ -504,8 +511,8 @@ test-lisp-use-package-inotify:
when: never
- changes:
- lisp/use-package/*.el
- test/lisp/use-package/*.el
- test/lisp/use-package/*resources/**
- test/lisp/use-package/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-use-package"
@ -521,8 +528,8 @@ test-lisp-vc-inotify:
when: never
- changes:
- lisp/vc/*.el
- test/lisp/vc/*.el
- test/lisp/vc/*resources/**
- test/lisp/vc/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-lisp-vc"
@ -538,8 +545,8 @@ test-misc-inotify:
when: never
- changes:
- admin/*.el
- test/misc/*.el
- test/misc/*resources/**
- test/misc/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-misc"
@ -555,8 +562,19 @@ test-src-inotify:
when: never
- changes:
- src/*.{h,c}
- test/src/*.el
- test/src/*resources/**
- test/src/*.el
variables:
target: emacs-inotify
make_params: "-k -C test check-src"
.tree-sitter-files-template:
variables:
tree-sitter-files: >-
lisp/progmodes/c-ts-mode-tests.log
lisp/progmodes/elixir-ts-mode-tests.log
lisp/progmodes/go-ts-mode-tests.log
lisp/progmodes/heex-ts-mode-tests.log
lisp/progmodes/java-ts-mode-tests.log
lisp/progmodes/ruby-ts-mode-tests.log
lisp/progmodes/typescript-ts-mode-tests.log

View file

@ -305,7 +305,8 @@ Check that the resulting binaries do not differ."
(lambda () (throw 'foo 3)))
3))
(should (= (catch 'foo
(comp-tests-throw-f 3)))))
(comp-tests-throw-f 3))
3)))
(comp-deftest gc ()
"Try to do some longer computation to let the GC kick in."