Merge from origin/emacs-29

6de00e4df9 ; Fix xref-match's :version since the default value did c...
db355b420b Use libgccjit-10-dev on EMBA
8496395653 * lisp/outline.el (outline--fix-buttons-after-change): Ad...
3d3bbaace6 Align concatenated strings to the first sibling in c-ts-mode
f856468e45 Only fill the current paragraph in c-ts-common--fill-bloc...
df669c5a11 Add missing indent rule for c-ts-mode
This commit is contained in:
Stefan Kangas 2023-03-23 06:30:13 +01:00
commit 90dca0a533
7 changed files with 66 additions and 24 deletions

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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))

View file

@ -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

View file

@ -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]*:"

View file

@ -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)
=-=