Merge from origin/emacs-29

689f04a2dd Clarify description of format-spec truncation
759dedfab0 More accurate documentation of 'rmail-mail-new-frame'
fa79de7c6b ; * lisp/calendar/calendar.el: Remove extra space.
7f6e335f4b Fix documentation of M-SPC in user manual
5bdc2436c6 ; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray dif...
8014dbb2ad * admin/notes/bugtracker: Minor copyedit.
06a991e7e8 ; * admin/notes/bugtracker: Minor copyedit.
c890622e1a Tweak regexp for object initializers in csharp-mode (bug#...
f48babb112 `term-mode': mention the keymap to add keybindings to
8cf05d9be1 Fix 'shortdoc-copy-function-as-kill'
d5901f3f05 Improve documentation of 'edebug-print-*' variables
This commit is contained in:
Eli Zaretskii 2024-03-23 06:51:39 -04:00
commit e813c0fa3a
12 changed files with 102 additions and 26 deletions

View file

@ -430,8 +430,8 @@ reassign 123 spam
*** To change the title of a bug:
retitle 123 Some New Title
*** To change the submitter address:
submitter 123 none@example.com
*** To change the submitter name and address:
submitter 123 J. Hacker <none@example.com>
Note that it does not seem to work to specify "Submitter:" in the
pseudo-header when first reporting a bug.

View file

@ -91,9 +91,11 @@ Delete the next character (@code{delete-char}).
@item M-\
Delete spaces and tabs around point (@code{delete-horizontal-space}).
@item M-x just-one-space
Delete spaces and tabs around point, leaving one space.
@item M-@key{SPC}
Delete spaces and tabs around point, leaving one space
(@code{just-one-space}).
Delete spaces and tabs around point in flexible ways
(@code{cycle-spacing}).
@item C-x C-o
Delete blank lines around the current line (@code{delete-blank-lines}).
@item M-^
@ -118,12 +120,13 @@ characters before and after point. With a prefix argument, this only
deletes spaces and tab characters before point.
@findex just-one-space
@code{just-one-space} does likewise but leaves a single space before
point, regardless of the number of spaces that existed previously
(even if there were none before). With a numeric argument @var{n}, it
leaves @var{n} spaces before point if @var{n} is positive; if @var{n}
is negative, it deletes newlines in addition to spaces and tabs,
leaving @minus{}@var{n} spaces before point.
@kbd{M-x just-one-space} deletes tabs and spaces around point, but
leaves a single space before point, regardless of the number of spaces
that existed previously (even if there were none before). With a
numeric argument @var{n}, it leaves @var{n} spaces before point if
@var{n} is positive; if @var{n} is negative, it deletes newlines in
addition to spaces and tabs, leaving @minus{}@var{n} spaces before
point.
@kindex M-SPC
@findex cycle-spacing
@ -131,7 +134,14 @@ leaving @minus{}@var{n} spaces before point.
The command @code{cycle-spacing} (@kbd{M-@key{SPC}}) acts like a more
flexible version of @code{just-one-space}. It performs different
space cleanup actions defined by @code{cycle-spacing-actions}, in a
cyclic manner, if you call it repeatedly in succession.
cyclic manner, if you call it repeatedly in succession. By default,
the first invocation does the same as @code{just-one-space}, the
second deletes all whitespace characters around point like
@code{delete-horizontal-space}, and the third restores the original
whitespace characters; then it cycles. If invoked with a prefix
argument, each action is given that value of the argument. The user
option @code{cycle-spacing-actions} can include other members; see the
doc string of that option for the details.
@kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
after the current line. If the current line is blank, it deletes all

View file

@ -875,7 +875,10 @@ already composing, or to alter a message you have sent.
If you set the variable @code{rmail-mail-new-frame} to a
non-@code{nil} value, then all the Rmail commands to start sending a
message create a new frame to edit it in. This frame is deleted when
you send the message.
you send the message (but not if it is the only visible frame on the
current display, or if it's a text-mode frame). If this frame cannot
be deleted when you send the message, Emacs will try to reuse it for
composing subsequent messages.
@ignore
@c FIXME does not work with Message -> Kill Message
, or when you use the @samp{Cancel} item in the @samp{Mail} menu.

View file

@ -1369,7 +1369,7 @@ given width and precision, if specified.
@item >
This flag causes the substitution to be truncated on the right to the
given width, if specified.
given width and precision, if specified.
@item ^
This flag converts the substituted text to upper case (@pxref{Case

View file

@ -1985,7 +1985,7 @@ Gregorian date Sunday, December 31, 1 BC. This function does not
handle dates in years BC."
;; For an explanation, see the footnote on page 384 of "Calendrical
;; Calculations, Part II: Three Historical Calendars" by
;; E. M. Reingold, N. Dershowitz, and S. M. Clamen,
;; E. M. Reingold, N. Dershowitz, and S. M. Clamen,
;; Software--Practice and Experience, Volume 23, Number 4 (April,
;; 1993), pages 383-404 <https://doi.org/10.1002/spe.4380230404>
;; <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.42.6421&rep=rep1&type=pdf>.

View file

@ -2250,7 +2250,7 @@ Like `cl-flet' but the definitions can refer to previous ones.
;;;###autoload
(defmacro cl-labels (bindings &rest body)
"Make local (recursive) function definitions.
+BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where
BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where
FUNC is the function name, ARGLIST its arguments, and BODY the
forms of the function body. FUNC is defined in any BODY, as well
as FORM, so you can write recursive and mutually recursive

View file

@ -193,11 +193,15 @@ Use this with caution since it is not debugged."
(defcustom edebug-print-length 50
"If non-nil, default value of `print-length' for printing results in Edebug."
:type '(choice integer (const nil)))
"Maximum length of list to print before abbreviating, when in Edebug.
If this is nil, use the value of `print-length' instead."
:type '(choice (integer :tag "A number")
(const :tag "Use `print-length'" nil)))
(defcustom edebug-print-level 50
"If non-nil, default value of `print-level' for printing results in Edebug."
:type '(choice integer (const nil)))
"Maximum depth of list nesting to print before abbreviating, when in Edebug.
If nil, use the value of `print-level' instead."
:type '(choice (integer :tag "A number")
(const :tag "Use `print-level'" nil)))
(defcustom edebug-print-circle t
"If non-nil, default value of `print-circle' for printing results in Edebug."
:type 'boolean)

View file

@ -38,7 +38,7 @@ For instance:
(?l . \"ls\")))
Each %-spec may contain optional flag, width, and precision
modifiers, as follows:
specifiers, as follows:
%<flags><width><precision>character
@ -51,7 +51,7 @@ The following flags are allowed:
* ^: Convert to upper case.
* _: Convert to lower case.
The width and truncation modifiers behave like the corresponding
The width and precision specifiers behave like the corresponding
ones in `format' when applied to %s.
For example, \"%<010b\" means \"substitute into the output the
@ -145,7 +145,7 @@ is returned, where each format spec is its own element."
"Return STR formatted according to FLAGS, WIDTH, and TRUNC.
FLAGS is a list of keywords as returned by
`format-spec--parse-flags'. WIDTH and TRUNC are either nil or
string widths corresponding to `format-spec' modifiers."
string widths corresponding to `format-spec' specifiers."
(let (diff str-width)
;; Truncate original string first, like `format' does.
(when trunc

View file

@ -495,9 +495,12 @@ compilation and evaluation time conflicts."
(unless (eq (char-after) ?{)
(ignore-errors (backward-up-list 1 t t)))
(save-excursion
;; 'new' should be part of the line
;; 'new' should be part of the line, but should not trigger if
;; statement has already ended, like for 'var x = new X();'.
;; Also, deal with the possible end of line obscured by a
;; trailing comment.
(goto-char (c-point 'iopl))
(looking-at ".*new.*")))
(looking-at "^[^//]*new[^//]*;$")))
;; Line should not already be terminated
(save-excursion
(goto-char (c-point 'eopl))

View file

@ -658,7 +658,8 @@ executed once, when the buffer is created."
["Forward Output Group" term-next-prompt t]
["Kill Current Output Group" term-kill-output t]))
map)
"Keymap for Term mode.")
"Keymap for \"line mode\" in Term mode. For custom keybindings purposes
please note there is also `term-raw-map'")
(defvar term-escape-char nil
"Escape character for char sub-mode of term mode.
@ -961,7 +962,9 @@ underlying shell."
(dotimes (key 21)
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
map)
"Keyboard map for sending characters directly to the inferior process.")
"Keyboard map for sending characters directly to the inferior process.
For custom keybindings purposes please note there is also
`term-mode-map'")
(easy-menu-define term-terminal-menu
(list term-mode-map term-raw-map term-pager-break-map)
@ -1122,6 +1125,10 @@ particular subprocesses. This can be done by setting the hooks
and the variable `term-prompt-regexp' to the appropriate regular
expression.
If you define custom keybindings, make sure to assign them to the
correct keymap (or to both): use `term-raw-map' in raw mode and
`term-mode-map' in line mode.
Commands in raw mode:
\\{term-raw-map}

View file

@ -0,0 +1,19 @@
Code:
(lambda ()
(csharp-mode)
(indent-region (point-min) (point-max)))
Point-Char: |
Name: Don't consider closed statements as object initializers. (bug#69571)
=-=
public class Foo {
void Bar () {
var x = new X(); // [1]
for (;;) {
x();
} // [2]
}
}
=-=-=

View file

@ -0,0 +1,30 @@
;;; csharp-mode-tests.el --- Tests for CC Mode C# mode -*- lexical-binding: t; -*-
;; Copyright (C) 2024 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Code:
(require 'ert)
(require 'ert-x)
(require 'csharp-mode)
(ert-deftest csharp-mode-test-indentation ()
(ert-test-erts-file (ert-resource-file "indent.erts")))
(provide 'csharp-mode-tests)
;;; csharp-mode-tests.el ends here