diff options
| author | Eli Zaretskii | 2024-10-12 05:53:27 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2024-10-12 05:53:27 -0400 |
| commit | bb5b25181ea7a4393f019dc641a981bdb6687c62 (patch) | |
| tree | 678a5f622075e4cb031764d67af0ec620276fd5d | |
| parent | 16e835171a8ce388e581174925e47263e864727d (diff) | |
| parent | 0f8f0773183a07a229b23d3f970723ceb9585aef (diff) | |
| download | emacs-bb5b25181ea7a4393f019dc641a981bdb6687c62.tar.gz emacs-bb5b25181ea7a4393f019dc641a981bdb6687c62.zip | |
Merge from origin/emacs-30
0f8f0773183 ; * doc/emacs/search.texi (Word Search): Document 'dictio...
fb155bcfb6f ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Doc fix.
6dbe4e99ac4 ; * lisp/emacs-lisp/chart.el (chart-bar-quickie): Improve...
d664227f81a ; More accurate documentation of 'file-newer-than-file-p'
e49b479f869 Fix c-ts-mode indentation for initializer lists (bug#73661)
f520008744b Avoid segfaults in Rmail-MIME
6a5c2edd84f Eglot: use :immediate t when resolving completions (bug#7...
cd36e070c24 Eglot: minor changes to doc and docstrings
1ea0d9b891b Revert "Set treesit-primary-parser for tree-sitter modes"
52746ceb625 Remove duplicate indent rules in elixir-ts-mode
ed57faafc74 Set treesit-primary-parser for tree-sitter modes
37a6c859b04 ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capita...
2d4d6dc43a4 Delete XIE X extension from TODO
| -rw-r--r-- | doc/emacs/search.texi | 40 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 3 | ||||
| -rw-r--r-- | doc/misc/eglot.texi | 28 | ||||
| -rw-r--r-- | etc/TODO | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/chart.el | 17 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 2 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/c-ts-mode.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/eglot.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/elixir-ts-mode.el | 3 | ||||
| -rw-r--r-- | src/coding.c | 4 | ||||
| -rw-r--r-- | src/fileio.c | 3 | ||||
| -rw-r--r-- | test/lisp/progmodes/c-ts-mode-resources/indent.erts | 39 |
13 files changed, 135 insertions, 40 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 3b52385347b..f23dc1fdb51 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -792,6 +792,46 @@ search engine whose @acronym{URL} is specified by the variable | |||
| 792 | Wowser Manual}). If the region is not active, or doesn't contain any | 792 | Wowser Manual}). If the region is not active, or doesn't contain any |
| 793 | words, this command prompts the user for a URL or keywords to search. | 793 | words, this command prompts the user for a URL or keywords to search. |
| 794 | 794 | ||
| 795 | @findex dictionary-search | ||
| 796 | @findex dictionary | ||
| 797 | @findex dictionary-tooltip-mode | ||
| 798 | @cindex dictionary server protocol (DICT) | ||
| 799 | @cindex word definition search | ||
| 800 | @vindex dictionary-server | ||
| 801 | You can also search for definitions of a word by querying dictionary | ||
| 802 | servers via the @sc{dict} protocol defined by @acronym{RFC} 2229. Emacs | ||
| 803 | includes a client for this protocol. Type @w{@kbd{M-x dictionary-search | ||
| 804 | @key{RET}}} to connect to a @sc{dict} server and ask it to provide the | ||
| 805 | available definitions of a word. This command prompts for the word to | ||
| 806 | look up, using the word at point as the default, then asks the @sc{dict} | ||
| 807 | server to provide the definitions of that word in one or more | ||
| 808 | dictionaries. By default, the command first tries to connect to the | ||
| 809 | @sc{dict} server installed on the local host, and if that fails, it | ||
| 810 | tries @file{dict.org} after your confirmation; customize the variable | ||
| 811 | @code{dictionary-server} to specify, as a string, the URL of a single | ||
| 812 | server to use (use @samp{localhost} if you want to query only the local | ||
| 813 | server). Normally, @code{dictionary-search} tells the server to look up | ||
| 814 | the word in all the dictionaries available to the server, but if you | ||
| 815 | invoke the command with a prefix argument, it will prompt for a single | ||
| 816 | dictionary to look. The list of dictionaries available to a server can | ||
| 817 | be displayed by pressing the @samp{Select dictionary} button shown in | ||
| 818 | the @file{*Dictionary*} buffer, described below. | ||
| 819 | |||
| 820 | First time you use @code{dictionary-search}, it creates a new | ||
| 821 | @file{*Dictionary*} buffer and turns on a special mode in it. The | ||
| 822 | buffer shows buttons for selecting a dictionary, searching a definition | ||
| 823 | of another word, etc. Subsequent @code{dictionary-search} commands | ||
| 824 | reuse this buffer. To create another such buffer (e.g., too look up | ||
| 825 | other words, perhaps in another dictionary), type @w{@kbd{M-x dictionary | ||
| 826 | @key{RET}}}. | ||
| 827 | |||
| 828 | If you turn on @code{dictionary-tooltip-mode} in a buffer, Emacs will | ||
| 829 | look up the definitions of the word at mouse pointer and show those | ||
| 830 | definitions in a tool tip. This is handy when you are reading text with | ||
| 831 | many words about whose meaning you are unsure. | ||
| 832 | |||
| 833 | For other options of dictionary-search, see the @code{dictionary} | ||
| 834 | customization group (@pxref{Specific Customization}). | ||
| 795 | 835 | ||
| 796 | @node Symbol Search | 836 | @node Symbol Search |
| 797 | @section Symbol Search | 837 | @section Symbol Search |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 70db8521481..5c63f192447 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1299,7 +1299,8 @@ and modification. | |||
| 1299 | This function returns @code{t} if the file @var{filename1} is | 1299 | This function returns @code{t} if the file @var{filename1} is |
| 1300 | newer than file @var{filename2}. If @var{filename1} does not | 1300 | newer than file @var{filename2}. If @var{filename1} does not |
| 1301 | exist, it returns @code{nil}. If @var{filename1} does exist, but | 1301 | exist, it returns @code{nil}. If @var{filename1} does exist, but |
| 1302 | @var{filename2} does not, it returns @code{t}. | 1302 | @var{filename2} does not, it returns @code{t}. Otherwise, it compares |
| 1303 | the times of last modification of the files. | ||
| 1303 | 1304 | ||
| 1304 | In the following example, assume that the file @file{aug-19} was written | 1305 | In the following example, assume that the file @file{aug-19} was written |
| 1305 | on the 19th, @file{aug-20} was written on the 20th, and the file | 1306 | on the 19th, @file{aug-20} was written on the 20th, and the file |
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index fb5b618bd84..959bbfa6857 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi | |||
| @@ -123,14 +123,16 @@ Here's how to start using Eglot with your programming project: | |||
| 123 | @item | 123 | @item |
| 124 | Select and install a language server. | 124 | Select and install a language server. |
| 125 | 125 | ||
| 126 | Eglot comes pre-configured with many popular language servers, see the | 126 | Eglot comes pre-configured for many popular language servers, see the |
| 127 | value of @code{eglot-server-programs}. If the server(s) mentioned | 127 | value of @code{eglot-server-programs}. If the server(s) mentioned there |
| 128 | there satisfy your needs for the programming language(s) with which | 128 | satisfy your needs for the programming language(s) with which you want |
| 129 | you want to use Eglot, you just need to make sure those servers are | 129 | to use Eglot, you just need to make sure those servers are installed on |
| 130 | installed on your system. Alternatively, install one or more servers | 130 | your system and Eglot can find them. |
| 131 | of your choice and add them to the value of | 131 | |
| 132 | Alternatively, install one or more servers of your choice and tell Eglot | ||
| 133 | where to find them. To do that, you may add to the value of | ||
| 132 | @code{eglot-server-programs}, as described in @ref{Setting Up LSP | 134 | @code{eglot-server-programs}, as described in @ref{Setting Up LSP |
| 133 | Servers}. | 135 | Servers} or have Eglot prompt you about it (@pxref{Eglot Commands}). |
| 134 | 136 | ||
| 135 | @item | 137 | @item |
| 136 | Turn on Eglot for your project. | 138 | Turn on Eglot for your project. |
| @@ -197,7 +199,7 @@ particular server(s) you want to install. | |||
| 197 | 199 | ||
| 198 | To use a language server, Eglot must know how to start it and which | 200 | To use a language server, Eglot must know how to start it and which |
| 199 | programming languages each server supports. This information is | 201 | programming languages each server supports. This information is |
| 200 | provided by the variable @code{eglot-server-programs}. | 202 | commonly provided by the variable @code{eglot-server-programs}. |
| 201 | 203 | ||
| 202 | @defvar eglot-server-programs | 204 | @defvar eglot-server-programs |
| 203 | This variable associates major modes with names and command-line | 205 | This variable associates major modes with names and command-line |
| @@ -939,12 +941,16 @@ to @w{@code{(disallow-non-standard-keys enforce-required-keys)}}. | |||
| 939 | 941 | ||
| 940 | @vindex eglot-server-initialized-hook | 942 | @vindex eglot-server-initialized-hook |
| 941 | @item eglot-server-initialized-hook | 943 | @item eglot-server-initialized-hook |
| 942 | A hook run after the server object is successfully initialized. | 944 | A hook run after the server object is successfully initialized (which |
| 945 | includes launching the process) but before any LSP communication is | ||
| 946 | attempted. Each function receives a @code{eglot-lsp-server} instance as | ||
| 947 | argument. | ||
| 943 | 948 | ||
| 944 | @vindex eglot-connect-hook | 949 | @vindex eglot-connect-hook |
| 945 | @item eglot-connect-hook | 950 | @item eglot-connect-hook |
| 946 | A hook run after connection to the server is successfully | 951 | A hook run after the LSP connection to the server is successfully |
| 947 | established. @xref{Starting Eglot}. | 952 | established. Each function receives a @code{eglot-lsp-server} instance |
| 953 | as argument. @xref{Starting Eglot}. | ||
| 948 | 954 | ||
| 949 | @item eglot-managed-mode-hook | 955 | @item eglot-managed-mode-hook |
| 950 | A hook run after Eglot started or stopped managing a buffer. | 956 | A hook run after Eglot started or stopped managing a buffer. |
| @@ -788,9 +788,6 @@ to ASCII. | |||
| 788 | 788 | ||
| 789 | *** Provide a user friendly interface to specify fonts | 789 | *** Provide a user friendly interface to specify fonts |
| 790 | 790 | ||
| 791 | ** Use the XIE X extension, if available, for image display | ||
| 792 | This is obsolete, as XIE itself is now considered obsolete. | ||
| 793 | |||
| 794 | ** Make monochrome images honor the face | 791 | ** Make monochrome images honor the face |
| 795 | Display those images using the foreground and background colors of the | 792 | Display those images using the foreground and background colors of the |
| 796 | applicable faces. | 793 | applicable faces. |
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el index 3acf2588f24..ac2e0645f96 100644 --- a/lisp/emacs-lisp/chart.el +++ b/lisp/emacs-lisp/chart.el | |||
| @@ -574,13 +574,16 @@ R1 and R2 are dotted pairs. Colorize it with FACE." | |||
| 574 | 574 | ||
| 575 | (defun chart-bar-quickie (dir title namelst nametitle numlst numtitle | 575 | (defun chart-bar-quickie (dir title namelst nametitle numlst numtitle |
| 576 | &optional max sort-pred) | 576 | &optional max sort-pred) |
| 577 | "Wash over the complex EIEIO stuff and create a nice bar chart. | 577 | "Create a bar chart named TITLE in direction DIR [`horizontal' `vertical']. |
| 578 | Create it going in direction DIR [`horizontal' `vertical'] with TITLE | 578 | NAMELST is the list of bar names and NAMETITLE is the name the of axis |
| 579 | using a name sequence NAMELST labeled NAMETITLE with values NUMLST | 579 | containing them. |
| 580 | labeled NUMTITLE. | 580 | NUMLST is the list of values and NUMTITLE is the name of the value |
| 581 | Optional arguments: | 581 | axis. |
| 582 | Set the chart's max element display to MAX, and sort lists with | 582 | Optional argument MAX limits the chart's max element display to MAX by |
| 583 | SORT-PRED if desired." | 583 | passing it as second argument to `chart-trim', otherwise the chart's |
| 584 | display is unlimited. | ||
| 585 | Optional argument SORT-PRED is a predicate function passed as second | ||
| 586 | argument to `chart-sort' to sort the lists if desired." | ||
| 584 | (let ((nc (make-instance 'chart-bar | 587 | (let ((nc (make-instance 'chart-bar |
| 585 | :title title | 588 | :title title |
| 586 | :key-label "8-m" ; This is a text key pic | 589 | :key-label "8-m" ; This is a text key pic |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 2e501005bf7..b37f744b175 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2505,7 +2505,7 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...). | |||
| 2505 | (defmacro cl-once-only (names &rest body) | 2505 | (defmacro cl-once-only (names &rest body) |
| 2506 | "Generate code to evaluate each of NAMES just once in BODY. | 2506 | "Generate code to evaluate each of NAMES just once in BODY. |
| 2507 | 2507 | ||
| 2508 | This macro helps with writing other macros. Each of names is | 2508 | This macro helps with writing other macros. Each of NAMES is |
| 2509 | either (NAME FORM) or NAME, which latter means (NAME NAME). | 2509 | either (NAME FORM) or NAME, which latter means (NAME NAME). |
| 2510 | During macroexpansion, each NAME is bound to an uninterned | 2510 | During macroexpansion, each NAME is bound to an uninterned |
| 2511 | symbol. The expansion evaluates each FORM and binds it to the | 2511 | symbol. The expansion evaluates each FORM and binds it to the |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index a5ce5b65cd7..d86e48e6281 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -579,11 +579,13 @@ HEADER is a header component of a MIME-entity object (see | |||
| 579 | (ignore-errors (base64-decode-region pos (point)))) | 579 | (ignore-errors (base64-decode-region pos (point)))) |
| 580 | ((string= transfer-encoding "quoted-printable") | 580 | ((string= transfer-encoding "quoted-printable") |
| 581 | (quoted-printable-decode-region pos (point)))))) | 581 | (quoted-printable-decode-region pos (point)))))) |
| 582 | (decode-coding-region | 582 | ;; If the text is empty, we don't have anything to decode. |
| 583 | pos (point) | 583 | (and (/= pos (point)) |
| 584 | ;; Use -dos decoding, to remove ^M characters left from base64 or | 584 | (decode-coding-region |
| 585 | ;; rogue qp-encoded text. | 585 | pos (point) |
| 586 | (coding-system-change-eol-conversion coding-system 1)) | 586 | ;; Use -dos decoding, to remove ^M characters left from base64 |
| 587 | ;; or rogue qp-encoded text. | ||
| 588 | (coding-system-change-eol-conversion coding-system 1))) | ||
| 587 | (if (and | 589 | (if (and |
| 588 | (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system)) | 590 | (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system)) |
| 589 | (not (eq (coding-system-base coding-system) 'us-ascii))) | 591 | (not (eq (coding-system-base coding-system) 'us-ascii))) |
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 303c994637c..3f6a7422aa0 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el | |||
| @@ -338,10 +338,13 @@ characters of the current line." | |||
| 338 | ;; If the start of the previous sibling isn't at the | 338 | ;; If the start of the previous sibling isn't at the |
| 339 | ;; beginning of a line, something's probably not quite | 339 | ;; beginning of a line, something's probably not quite |
| 340 | ;; right, go a step further. (E.g., comment after a | 340 | ;; right, go a step further. (E.g., comment after a |
| 341 | ;; statement.) | 341 | ;; statement.) If the previous sibling is the first named |
| 342 | ;; node then anchor to that, e.g. when returning an aggregate | ||
| 343 | ;; and starting the items on the same line as {. | ||
| 342 | (_ (goto-char (treesit-node-start prev-sibling)) | 344 | (_ (goto-char (treesit-node-start prev-sibling)) |
| 343 | (if (looking-back (rx bol (* whitespace)) | 345 | (if (or (looking-back (rx bol (* whitespace)) |
| 344 | (line-beginning-position)) | 346 | (line-beginning-position))) |
| 347 | (null (treesit-node-prev-sibling prev-sibling t)) | ||
| 345 | (setq continue nil) | 348 | (setq continue nil) |
| 346 | (setq prev-sibling | 349 | (setq prev-sibling |
| 347 | (treesit-node-prev-sibling prev-sibling))))))) | 350 | (treesit-node-prev-sibling prev-sibling))))))) |
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 3c0c23f1c45..0a1f9ee4481 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el | |||
| @@ -1480,18 +1480,21 @@ Use current server's or first available Eglot events buffer." | |||
| 1480 | 1480 | ||
| 1481 | (defvar eglot-connect-hook | 1481 | (defvar eglot-connect-hook |
| 1482 | '(eglot-signal-didChangeConfiguration) | 1482 | '(eglot-signal-didChangeConfiguration) |
| 1483 | "Hook run after connecting in `eglot--connect'.") | 1483 | "Hook run after connecting to a server. |
| 1484 | Each function is passed an `eglot-lsp-server' instance | ||
| 1485 | as argument.") | ||
| 1484 | 1486 | ||
| 1485 | (defvar eglot-server-initialized-hook | 1487 | (defvar eglot-server-initialized-hook |
| 1486 | '() | 1488 | '() |
| 1487 | "Hook run after a `eglot-lsp-server' instance is created. | 1489 | "Hook run after a `eglot-lsp-server' instance is created. |
| 1488 | 1490 | ||
| 1489 | That is before a connection was established. Use | 1491 | That is before a connection is established. Use |
| 1490 | `eglot-connect-hook' to hook into when a connection was | 1492 | `eglot-connect-hook' to hook into when a connection was |
| 1491 | successfully established and the server on the other side has | 1493 | successfully established and the server on the other side has |
| 1492 | received the initializing configuration. | 1494 | received the initializing configuration. |
| 1493 | 1495 | ||
| 1494 | Each function is passed the server as an argument") | 1496 | Each function is passed an `eglot-lsp-server' instance |
| 1497 | as argument.") | ||
| 1495 | 1498 | ||
| 1496 | (defun eglot--cmd (contact) | 1499 | (defun eglot--cmd (contact) |
| 1497 | "Helper for `eglot--connect'." | 1500 | "Helper for `eglot--connect'." |
| @@ -3232,7 +3235,8 @@ for which LSP on-type-formatting should be requested." | |||
| 3232 | :resolveProvider) | 3235 | :resolveProvider) |
| 3233 | (plist-get lsp-comp :data)) | 3236 | (plist-get lsp-comp :data)) |
| 3234 | (eglot--request server :completionItem/resolve | 3237 | (eglot--request server :completionItem/resolve |
| 3235 | lsp-comp :cancel-on-input t) | 3238 | lsp-comp :cancel-on-input t |
| 3239 | :immediate t) | ||
| 3236 | lsp-comp)))))) | 3240 | lsp-comp)))))) |
| 3237 | (when (and (consp eglot--capf-session) | 3241 | (when (and (consp eglot--capf-session) |
| 3238 | (= (car bounds) (car (nth 0 eglot--capf-session))) | 3242 | (= (car bounds) (car (nth 0 eglot--capf-session))) |
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index a3e11658468..cacdb266298 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el | |||
| @@ -734,9 +734,6 @@ Return nil if NODE is not a defun node or doesn't have a name." | |||
| 734 | (when (treesit-ready-p 'heex) | 734 | (when (treesit-ready-p 'heex) |
| 735 | (setq-local treesit-range-settings elixir-ts--treesit-range-rules) | 735 | (setq-local treesit-range-settings elixir-ts--treesit-range-rules) |
| 736 | 736 | ||
| 737 | (setq-local treesit-simple-indent-rules | ||
| 738 | (append treesit-simple-indent-rules heex-ts--indent-rules)) | ||
| 739 | |||
| 740 | (setq-local treesit-font-lock-settings | 737 | (setq-local treesit-font-lock-settings |
| 741 | (append treesit-font-lock-settings | 738 | (append treesit-font-lock-settings |
| 742 | heex-ts--font-lock-settings)) | 739 | heex-ts--font-lock-settings)) |
diff --git a/src/coding.c b/src/coding.c index 547fcbb8120..cd5a12972e6 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5270,7 +5270,9 @@ decode_coding_raw_text (struct coding_system *coding) | |||
| 5270 | coding->chars_at_source = 1; | 5270 | coding->chars_at_source = 1; |
| 5271 | coding->consumed_char = coding->src_chars; | 5271 | coding->consumed_char = coding->src_chars; |
| 5272 | coding->consumed = coding->src_bytes; | 5272 | coding->consumed = coding->src_bytes; |
| 5273 | if (eol_dos && coding->source[coding->src_bytes - 1] == '\r') | 5273 | if (eol_dos |
| 5274 | && coding->src_bytes > 0 /* empty source text? */ | ||
| 5275 | && coding->source[coding->src_bytes - 1] == '\r') | ||
| 5274 | { | 5276 | { |
| 5275 | coding->consumed_char--; | 5277 | coding->consumed_char--; |
| 5276 | coding->consumed--; | 5278 | coding->consumed--; |
diff --git a/src/fileio.c b/src/fileio.c index 212d2ce6f98..291c316102f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3788,7 +3788,8 @@ DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", | |||
| 3788 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, | 3788 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, |
| 3789 | doc: /* Return t if file FILE1 is newer than file FILE2. | 3789 | doc: /* Return t if file FILE1 is newer than file FILE2. |
| 3790 | If FILE1 does not exist, the answer is nil; | 3790 | If FILE1 does not exist, the answer is nil; |
| 3791 | otherwise, if FILE2 does not exist, the answer is t. */) | 3791 | otherwise, if FILE2 does not exist, the answer is t. |
| 3792 | For existing files, this compares their last-modified times. */) | ||
| 3792 | (Lisp_Object file1, Lisp_Object file2) | 3793 | (Lisp_Object file1, Lisp_Object file2) |
| 3793 | { | 3794 | { |
| 3794 | struct stat st1, st2; | 3795 | struct stat st1, st2; |
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 599173832b5..a13a74cf8b3 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts | |||
| @@ -208,6 +208,21 @@ int main() | |||
| 208 | } | 208 | } |
| 209 | =-=-= | 209 | =-=-= |
| 210 | 210 | ||
| 211 | Name: Return Compund Literal | ||
| 212 | |||
| 213 | =-= | ||
| 214 | struct pair { int fst, snd; }; | ||
| 215 | struct pair | ||
| 216 | make_pair(int long_identifier_a[], int long_identifier_b[], | ||
| 217 | int offset_a, int offset_b) | ||
| 218 | { | ||
| 219 | int base_offset = 10; | ||
| 220 | return (struct pair) { long_identifier_a[base_offset + offset_b], | ||
| 221 | long_identifier_b[base_offset + offset_b] }; | ||
| 222 | } | ||
| 223 | |||
| 224 | =-=-= | ||
| 225 | |||
| 211 | Name: Switch-Case statement | 226 | Name: Switch-Case statement |
| 212 | 227 | ||
| 213 | =-= | 228 | =-= |
| @@ -486,6 +501,30 @@ namespace A { | |||
| 486 | } | 501 | } |
| 487 | =-=-= | 502 | =-=-= |
| 488 | 503 | ||
| 504 | Name: Return Aggregate Initialized Struct | ||
| 505 | |||
| 506 | =-= | ||
| 507 | struct pair { int x, y; } | ||
| 508 | pair | ||
| 509 | make_pair(int long_identifier_a[], int long_identifier_b[], | ||
| 510 | int offset_a, int offset_b) | ||
| 511 | { | ||
| 512 | int base_offset = 10; | ||
| 513 | return { long_identifier_a[base_offset + offset_b], | ||
| 514 | long_identifier_b[base_offset + offset_b] }; | ||
| 515 | } | ||
| 516 | =-= | ||
| 517 | struct pair { int x, y; } | ||
| 518 | pair | ||
| 519 | make_pair(int long_identifier_a[], int long_identifier_b[], | ||
| 520 | int offset_a, int offset_b) | ||
| 521 | { | ||
| 522 | int base_offset = 10; | ||
| 523 | return { long_identifier_a[base_offset + offset_b], | ||
| 524 | long_identifier_b[base_offset + offset_b] }; | ||
| 525 | } | ||
| 526 | =-=-= | ||
| 527 | |||
| 489 | Code: | 528 | Code: |
| 490 | (lambda () | 529 | (lambda () |
| 491 | (c-ts-mode) | 530 | (c-ts-mode) |