[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 49ae6456247: Merge remote-tracking branch 'origin/master
From: |
Po Lu |
Subject: |
feature/android 49ae6456247: Merge remote-tracking branch 'origin/master' into feature/android |
Date: |
Mon, 5 Jun 2023 20:12:41 -0400 (EDT) |
branch: feature/android
commit 49ae645624740936421ec4bb814c4dc65f6a06e7
Merge: c4a89851ed9 7ca1d782f59
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Merge remote-tracking branch 'origin/master' into feature/android
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/nadvice.el | 2 ++
lisp/emacs-lisp/subr-x.el | 7 +++++++
src/keyboard.c | 4 ++++
test/infra/Dockerfile.emba | 14 ++++++++++----
test/infra/Makefile.in | 8 +++++++-
test/infra/gitlab-ci.yml | 13 +++----------
test/infra/test-jobs.yml | 9 +++++++++
8 files changed, 47 insertions(+), 15 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 18e57dd99df..8c56bfc5cc6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -684,6 +684,11 @@ Since circular alias chains now cannot occur,
'function-alias-p',
'indirect-function' and 'indirect-variable' will never signal an error.
Their 'noerror' arguments have no effect and are therefore obsolete.
+---
+** New function 'eval-command-interactive-spec' in the subr-x library.
+This function evaluates a command's interactive form and returns the
+resultant list.
+
* Changes in Emacs 30.1 on Non-Free Operating Systems
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index e457387acc9..e6977f2012a 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -165,6 +165,8 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are
expected.")
(buffer-string))
usage))))
+;; FIXME: How about renaming this to just `eval-interactive-spec'?
+;; It's not specific to the advice system.
(defun advice-eval-interactive-spec (spec)
"Evaluate the interactive spec SPEC."
(cond
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 9e906930b92..a7d8f785508 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -504,6 +504,13 @@ Used by `emacs-authors-mode' and `emacs-news-mode'."
(progn (forward-line -1) (point))
(point-max)))))
+(defun eval-command-interactive-spec (command)
+ "Evaluate COMMAND's interactive form and return resultant list.
+If COMMAND has no interactive form, return nil."
+ (advice-eval-interactive-spec
+ (cadr (or (and (symbolp command) (get command 'interactive-form))
+ (interactive-form command)))))
+
(provide 'subr-x)
;;; subr-x.el ends here
diff --git a/src/keyboard.c b/src/keyboard.c
index 116846611ce..f31f717195b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1449,6 +1449,7 @@ command_loop_1 (void)
prev_buffer = current_buffer;
prev_modiff = MODIFF;
last_point_position = PT;
+ ptrdiff_t last_pt = PT;
/* By default, we adjust point to a boundary of a region that
has such a property that should be treated intangible
@@ -1526,6 +1527,9 @@ command_loop_1 (void)
unbind_to (scount, Qnil);
#endif
}
+ /* Restore last PT position value, possibly clobbered by
+ recursive-edit invoked by the command we just executed. */
+ last_point_position = last_pt;
kset_last_prefix_arg (current_kboard, Vcurrent_prefix_arg);
safe_run_hooks_maybe_narrowed (Qpost_command_hook,
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba
index 21b69dacacc..f5259150518 100644
--- a/test/infra/Dockerfile.emba
+++ b/test/infra/Dockerfile.emba
@@ -107,25 +107,31 @@ RUN ./configure --with-tree-sitter
RUN make bootstrap
# Install language grammars.
-RUN mkdir /usr/local/lib/tree-sitter
+RUN mkdir -p /root/.emacs.d/tree-sitter
RUN git config --global http.sslverify "false"
# See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos
RUN src/emacs -Q --batch \
--eval '(setq \
- treesit-extra-load-path (list "/usr/local/lib/tree-sitter") \
+ treesit-extra-load-path (list "/root/.emacs.d/tree-sitter") \
treesit-language-source-alist \
- (quote ((c "https://github.com/tree-sitter/tree-sitter-c") \
+ (quote ((bash "https://github.com/tree-sitter/tree-sitter-bash") \
+ (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") \
(elixir "https://github.com/elixir-lang/tree-sitter-elixir") \
(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") \
(java "https://github.com/tree-sitter/tree-sitter-java") \
+ (javascript "https://github.com/tree-sitter/tree-sitter-javascript") \
+ (json "https://github.com/tree-sitter/tree-sitter-json") \
+ (python "https://github.com/tree-sitter/tree-sitter-python") \
(ruby "https://github.com/tree-sitter/tree-sitter-ruby") \
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master"
"tsx/src") \
(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"))'
+ (treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))'
FROM emacs-base as emacs-gnustep
diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in
index 1af13a0096a..5f7d6281a7c 100644
--- a/test/infra/Makefile.in
+++ b/test/infra/Makefile.in
@@ -43,6 +43,10 @@ define subdir_template
$(eval
ifeq ($(findstring src, $(1)), src)
define changes
+ @echo ' - $(1)/treesit.{h,c}' >>$(FILE)
+ @echo ' - test/$(1)/treesit-tests.el' >>$(FILE)
+ @echo ' when: never' >>$(FILE)
+ @echo ' - changes:' >>$(FILE)
@echo ' - $(1)/*.{h,c}' >>$(FILE)
endef
else ifeq ($(findstring eieio, $(1)), eieio)
@@ -100,7 +104,9 @@ endef
$(foreach subdir, $(SUBDIRS), $(eval $(call subdir_template,$(subdir))))
-TREE-SITTER-FILES ?= $(shell cd .. ; find lisp -name "*-ts-mode-tests.el" |
sort | sed s/\\.el/.log/)
+TREE-SITTER-FILES ?= $(shell cd .. ; \
+ find lisp src \( -name "*-ts-mode-tests.el" -o -name "treesit-tests.el" \) |
\
+ sort | sed s/\\.el/.log/)
all: generate-test-jobs
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml
index d5b18674c70..6884c32848e 100644
--- a/test/infra/gitlab-ci.yml
+++ b/test/infra/gitlab-ci.yml
@@ -86,7 +86,7 @@ default:
# TODO: with make -j4 several of the tests were failing, for
# example shadowfile-tests, but passed without it.
- 'export PWD=$(pwd)'
- - 'docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} -e
EMACS_TEST_JUNIT_REPORT=${EMACS_TEST_JUNIT_REPORT} -e
EMACS_TEST_TIMEOUT=${EMACS_TEST_TIMEOUT} -e
EMACS_TEST_VERBOSE=${EMACS_TEST_VERBOSE} --volumes-from $(docker ps -q -f
"label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name}
${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -c "git fetch ${PWD} HEAD
&& echo checking out these updated files && git diff --name-only FETCH_HEAD &&
( git diff --name-only FET [...]
+ - 'docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} -e
EMACS_TEST_JUNIT_REPORT=${EMACS_TEST_JUNIT_REPORT} -e
EMACS_TEST_TIMEOUT=${EMACS_TEST_TIMEOUT} -e
EMACS_TEST_VERBOSE=${EMACS_TEST_VERBOSE} --volumes-from $(docker ps -q -f
"label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name}
${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -xvc "git fetch ${PWD}
HEAD && echo checking out these updated files && git diff --name-only
FETCH_HEAD && ( git diff --name-only F [...]
after_script:
# - docker ps -a
# - printenv
@@ -265,14 +265,7 @@ test-eglot:
variables:
target: emacs-eglot
# This is needed in order to get a JUnit test report.
- make_params: >-
- '-k -C test check-expensive
- LOGFILES="lisp/progmodes/eglot-tests.log"
- TEST_HOME="/tmp"
- EMACS_EXTRAOPT="--eval \(package-reinstall\ \(quote\ company\)\)
- --eval \(package-reinstall\ \(quote\ yasnippet\)\)
- --eval \(use-package\ company\)
- --eval \(use-package\ yasnippet\)"'
+ make_params: '-k -C test check-expensive
LOGFILES="lisp/progmodes/eglot-tests.log"'
build-image-tree-sitter:
stage: platform-images
@@ -289,7 +282,7 @@ test-tree-sitter:
variables:
target: emacs-tree-sitter
# This is needed in order to get a JUnit test report.
- make_params: '-k -C test check-expensive
LD_LIBRARY_PATH=/usr/local/lib/tree-sitter LOGFILES="$tree_sitter_files"'
+ make_params: '-k -C test check-expensive TEST_HOME=/root
LOGFILES="$tree_sitter_files"'
build-image-gnustep:
stage: platform-images
diff --git a/test/infra/test-jobs.yml b/test/infra/test-jobs.yml
index 21c19c3043e..b49dd369611 100644
--- a/test/infra/test-jobs.yml
+++ b/test/infra/test-jobs.yml
@@ -9,6 +9,10 @@ test-lib-src-inotify:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
+ - changes:
+ - lib-src/treesit.{h,c}
+ - test/lib-src/treesit-tests.el
+ when: never
- changes:
- lib-src/*.{h,c}
- test/lib-src/*resources/**
@@ -560,6 +564,10 @@ test-src-inotify:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
+ - changes:
+ - src/treesit.{h,c}
+ - test/src/treesit-tests.el
+ when: never
- changes:
- src/*.{h,c}
- test/src/*resources/**
@@ -578,3 +586,4 @@ test-src-inotify:
lisp/progmodes/java-ts-mode-tests.log
lisp/progmodes/ruby-ts-mode-tests.log
lisp/progmodes/typescript-ts-mode-tests.log
+ src/treesit-tests.log