[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 90dca0a5337: Merge from origin/emacs-29
From: |
Stefan Kangas |
Subject: |
master 90dca0a5337: Merge from origin/emacs-29 |
Date: |
Thu, 23 Mar 2023 01:44:58 -0400 (EDT) |
branch: master
commit 90dca0a533707813b925bc6f9987ccf8e5318985
Merge: e11813d574d 6de00e4df99
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Merge from origin/emacs-29
6de00e4df99 ; Fix xref-match's :version since the default value did c...
db355b420b6 Use libgccjit-10-dev on EMBA
84963956535 * lisp/outline.el (outline--fix-buttons-after-change): Ad...
3d3bbaace69 Align concatenated strings to the first sibling in c-ts-mode
f856468e457 Only fill the current paragraph in c-ts-common--fill-bloc...
df669c5a11f Add missing indent rule for c-ts-mode
---
lisp/outline.el | 2 +-
lisp/progmodes/c-ts-common.el | 19 +++++++++++---
lisp/progmodes/c-ts-mode.el | 4 ++-
lisp/progmodes/xref.el | 2 +-
test/infra/Dockerfile.emba | 3 ++-
test/infra/gitlab-ci.yml | 30 ++++++++++------------
.../lisp/progmodes/c-ts-mode-resources/indent.erts | 30 ++++++++++++++++++++++
7 files changed, 66 insertions(+), 24 deletions(-)
diff --git a/lisp/outline.el b/lisp/outline.el
index a89985d1990..0e90c59c285 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1877,7 +1877,7 @@ With a prefix argument, show headings up to that LEVEL."
(save-excursion (goto-char beg) (setq beg (pos-bol)))
(save-excursion (goto-char end) (setq end (pos-eol)))
(remove-overlays beg end 'outline-button t)
- (outline--fix-up-all-buttons beg end))
+ (save-match-data (outline--fix-up-all-buttons beg end)))
(defvar-keymap outline-navigation-repeat-map
diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
index 85db39aaeae..e0a7c46508e 100644
--- a/lisp/progmodes/c-ts-common.el
+++ b/lisp/progmodes/c-ts-common.el
@@ -156,10 +156,12 @@ comment."
(goto-char (match-beginning 1))
(move-marker start-marker (point))
(replace-match " " nil nil nil 1))
+
;; Include whitespaces before /*.
(goto-char start)
(beginning-of-line)
(setq start (point))
+
;; Mask spaces before "*/" if it is attached at the end
;; of a sentence rather than on its own line.
(goto-char end)
@@ -172,6 +174,7 @@ comment."
(setq end-len (- (match-end 1) (match-beginning 1)))
(replace-match (make-string end-len ?x)
nil nil nil 1))
+
;; If "*/" is on its own line, don't included it in the
;; filling region.
(when (not end-marker)
@@ -180,13 +183,21 @@ comment."
(backward-char 2)
(skip-syntax-backward "-")
(setq end (point))))
+
;; Let `fill-paragraph' do its thing.
(goto-char orig-point)
(narrow-to-region start end)
- ;; We don't want to fill the region between START and
- ;; START-MARKER, otherwise the filling function might delete
- ;; some spaces there.
- (fill-region start-marker end arg)
+ (let (para-start para-end)
+ (forward-paragraph 1)
+ (setq para-end (point))
+ (forward-paragraph -1)
+ (setq para-start (point))
+ ;; We don't want to fill the region between START and
+ ;; START-MARKER, otherwise the filling function might delete
+ ;; some spaces there. Also, we only fill the current
+ ;; paragraph.
+ (fill-region (max start-marker para-start) (min end para-end) arg))
+
;; Unmask.
(when start-marker
(goto-char start-marker)
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 1c55c7fbdde..59eb9fc23e6 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -386,7 +386,7 @@ MODE is either `c' or `cpp'."
((parent-is "function_definition") parent-bol 0)
((parent-is "conditional_expression") first-sibling 0)
((parent-is "assignment_expression") parent-bol
c-ts-mode-indent-offset)
- ((parent-is "concatenated_string") parent-bol
c-ts-mode-indent-offset)
+ ((parent-is "concatenated_string") first-sibling 0)
((parent-is "comma_expression") first-sibling 0)
((parent-is "init_declarator") parent-bol c-ts-mode-indent-offset)
((parent-is "parenthesized_expression") first-sibling 1)
@@ -434,6 +434,8 @@ MODE is either `c' or `cpp'."
((parent-is "while_statement") standalone-parent
c-ts-mode-indent-offset)
((parent-is "do_statement") standalone-parent
c-ts-mode-indent-offset)
+ ((parent-is "case_statement") standalone-parent
c-ts-mode-indent-offset)
+
,@(when (eq mode 'cpp)
`(((node-is "field_initializer_list") parent-bol ,(*
c-ts-mode-indent-offset 2)))))))
`((gnu
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index ee4253960c5..1ae60796601 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -636,7 +636,7 @@ If SELECT is non-nil, select the target window."
(defface xref-match '((t :inherit match))
"Face used to highlight matches in the xref buffer."
- :version "27.1")
+ :version "28.1")
(defmacro xref--with-dedicated-window (&rest body)
`(let* ((xref-w (get-buffer-window xref-buffer-name))
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba
index 7451c727624..adca95eb209 100644
--- a/test/infra/Dockerfile.emba
+++ b/test/infra/Dockerfile.emba
@@ -86,9 +86,10 @@ RUN make bootstrap
FROM emacs-base as emacs-native-comp
+# The libgccjit version must correspond to the gcc version.
RUN apt-get update && \
apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
- libgccjit-6-dev \
+ libgccjit-10-dev \
&& rm -rf /var/lib/apt/lists/*
FROM emacs-native-comp as emacs-native-comp-speed0
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml
index b2d52117ba4..b000f128278 100644
--- a/test/infra/gitlab-ci.yml
+++ b/test/infra/gitlab-ci.yml
@@ -290,23 +290,21 @@ test-eglot:
# variables:
# target: emacs-native-comp-speed1
-# The next two jobs are commented out due to bug#62211.
-
-# build-native-comp-speed2:
-# stage: native-comp-images
-# extends: [.job-template, .build-template, .native-comp-template]
-# variables:
-# target: emacs-native-comp-speed2
+build-native-comp-speed2:
+ stage: native-comp-images
+ extends: [.job-template, .build-template, .native-comp-template]
+ variables:
+ target: emacs-native-comp-speed2
-# test-native-comp-speed2:
-# stage: native-comp
-# extends: [.job-template, .test-template, .native-comp-template]
-# needs:
-# - job: build-native-comp-speed2
-# optional: true
-# variables:
-# target: emacs-native-comp-speed2
-# make_params: "-k -C test check SELECTOR='(not (tag :unstable))'"
+test-native-comp-speed2:
+ stage: native-comp
+ extends: [.job-template, .test-template, .native-comp-template]
+ needs:
+ - job: build-native-comp-speed2
+ optional: true
+ variables:
+ target: emacs-native-comp-speed2
+ make_params: "-k -C test check SELECTOR='(not (tag :unstable))'"
# Local Variables:
# add-log-current-defun-header-regexp: "^\\([-_.[:alnum:]]+\\)[ \t]*:"
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
index 9e28ef203fd..5cdefe2122c 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
@@ -188,6 +188,36 @@ int main()
}
=-=-=
+Name: Switch-Case statement
+
+=-=
+int main() {
+switch (a) {
+case 1:
+b = c;
+return 10;
+case 2:
+{
+a = b;
+return 12
+}
+}
+}
+=-=
+int main() {
+ switch (a) {
+ case 1:
+ b = c;
+ return 10;
+ case 2:
+ {
+ a = b;
+ return 12
+ }
+ }
+}
+=-=-=
+
Name: Multiline Block Comments 1 (bug#60270)
=-=