mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Merge from origin/emacs-29
689f04a2ddClarify description of format-spec truncation759dedfab0More accurate documentation of 'rmail-mail-new-frame'fa79de7c6b; * lisp/calendar/calendar.el: Remove extra space.7f6e335f4bFix documentation of M-SPC in user manual5bdc2436c6; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray dif...8014dbb2ad* admin/notes/bugtracker: Minor copyedit.06a991e7e8; * admin/notes/bugtracker: Minor copyedit.c890622e1aTweak regexp for object initializers in csharp-mode (bug#...f48babb112`term-mode': mention the keymap to add keybindings to8cf05d9be1Fix 'shortdoc-copy-function-as-kill'd5901f3f05Improve documentation of 'edebug-print-*' variables
This commit is contained in:
commit
e813c0fa3a
12 changed files with 102 additions and 26 deletions
|
|
@ -430,8 +430,8 @@ reassign 123 spam
|
||||||
*** To change the title of a bug:
|
*** To change the title of a bug:
|
||||||
retitle 123 Some New Title
|
retitle 123 Some New Title
|
||||||
|
|
||||||
*** To change the submitter address:
|
*** To change the submitter name and address:
|
||||||
submitter 123 none@example.com
|
submitter 123 J. Hacker <none@example.com>
|
||||||
|
|
||||||
Note that it does not seem to work to specify "Submitter:" in the
|
Note that it does not seem to work to specify "Submitter:" in the
|
||||||
pseudo-header when first reporting a bug.
|
pseudo-header when first reporting a bug.
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,11 @@ Delete the next character (@code{delete-char}).
|
||||||
|
|
||||||
@item M-\
|
@item M-\
|
||||||
Delete spaces and tabs around point (@code{delete-horizontal-space}).
|
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}
|
@item M-@key{SPC}
|
||||||
Delete spaces and tabs around point, leaving one space
|
Delete spaces and tabs around point in flexible ways
|
||||||
(@code{just-one-space}).
|
(@code{cycle-spacing}).
|
||||||
@item C-x C-o
|
@item C-x C-o
|
||||||
Delete blank lines around the current line (@code{delete-blank-lines}).
|
Delete blank lines around the current line (@code{delete-blank-lines}).
|
||||||
@item M-^
|
@item M-^
|
||||||
|
|
@ -118,12 +120,13 @@ characters before and after point. With a prefix argument, this only
|
||||||
deletes spaces and tab characters before point.
|
deletes spaces and tab characters before point.
|
||||||
|
|
||||||
@findex just-one-space
|
@findex just-one-space
|
||||||
@code{just-one-space} does likewise but leaves a single space before
|
@kbd{M-x just-one-space} deletes tabs and spaces around point, but
|
||||||
point, regardless of the number of spaces that existed previously
|
leaves a single space before point, regardless of the number of spaces
|
||||||
(even if there were none before). With a numeric argument @var{n}, it
|
that existed previously (even if there were none before). With a
|
||||||
leaves @var{n} spaces before point if @var{n} is positive; if @var{n}
|
numeric argument @var{n}, it leaves @var{n} spaces before point if
|
||||||
is negative, it deletes newlines in addition to spaces and tabs,
|
@var{n} is positive; if @var{n} is negative, it deletes newlines in
|
||||||
leaving @minus{}@var{n} spaces before point.
|
addition to spaces and tabs, leaving @minus{}@var{n} spaces before
|
||||||
|
point.
|
||||||
|
|
||||||
@kindex M-SPC
|
@kindex M-SPC
|
||||||
@findex cycle-spacing
|
@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
|
The command @code{cycle-spacing} (@kbd{M-@key{SPC}}) acts like a more
|
||||||
flexible version of @code{just-one-space}. It performs different
|
flexible version of @code{just-one-space}. It performs different
|
||||||
space cleanup actions defined by @code{cycle-spacing-actions}, in a
|
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
|
@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
|
after the current line. If the current line is blank, it deletes all
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
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
|
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
|
@ignore
|
||||||
@c FIXME does not work with Message -> Kill Message
|
@c FIXME does not work with Message -> Kill Message
|
||||||
, or when you use the @samp{Cancel} item in the @samp{Mail} menu.
|
, or when you use the @samp{Cancel} item in the @samp{Mail} menu.
|
||||||
|
|
|
||||||
|
|
@ -1369,7 +1369,7 @@ given width and precision, if specified.
|
||||||
|
|
||||||
@item >
|
@item >
|
||||||
This flag causes the substitution to be truncated on the right to the
|
This flag causes the substitution to be truncated on the right to the
|
||||||
given width, if specified.
|
given width and precision, if specified.
|
||||||
|
|
||||||
@item ^
|
@item ^
|
||||||
This flag converts the substituted text to upper case (@pxref{Case
|
This flag converts the substituted text to upper case (@pxref{Case
|
||||||
|
|
|
||||||
|
|
@ -1985,7 +1985,7 @@ Gregorian date Sunday, December 31, 1 BC. This function does not
|
||||||
handle dates in years BC."
|
handle dates in years BC."
|
||||||
;; For an explanation, see the footnote on page 384 of "Calendrical
|
;; For an explanation, see the footnote on page 384 of "Calendrical
|
||||||
;; Calculations, Part II: Three Historical Calendars" by
|
;; 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,
|
;; Software--Practice and Experience, Volume 23, Number 4 (April,
|
||||||
;; 1993), pages 383-404 <https://doi.org/10.1002/spe.4380230404>
|
;; 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>.
|
;; <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.42.6421&rep=rep1&type=pdf>.
|
||||||
|
|
|
||||||
|
|
@ -2250,7 +2250,7 @@ Like `cl-flet' but the definitions can refer to previous ones.
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro cl-labels (bindings &rest body)
|
(defmacro cl-labels (bindings &rest body)
|
||||||
"Make local (recursive) function definitions.
|
"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
|
FUNC is the function name, ARGLIST its arguments, and BODY the
|
||||||
forms of the function body. FUNC is defined in any BODY, as well
|
forms of the function body. FUNC is defined in any BODY, as well
|
||||||
as FORM, so you can write recursive and mutually recursive
|
as FORM, so you can write recursive and mutually recursive
|
||||||
|
|
|
||||||
|
|
@ -193,11 +193,15 @@ Use this with caution since it is not debugged."
|
||||||
|
|
||||||
|
|
||||||
(defcustom edebug-print-length 50
|
(defcustom edebug-print-length 50
|
||||||
"If non-nil, default value of `print-length' for printing results in Edebug."
|
"Maximum length of list to print before abbreviating, when in Edebug.
|
||||||
:type '(choice integer (const nil)))
|
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
|
(defcustom edebug-print-level 50
|
||||||
"If non-nil, default value of `print-level' for printing results in Edebug."
|
"Maximum depth of list nesting to print before abbreviating, when in Edebug.
|
||||||
:type '(choice integer (const nil)))
|
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
|
(defcustom edebug-print-circle t
|
||||||
"If non-nil, default value of `print-circle' for printing results in Edebug."
|
"If non-nil, default value of `print-circle' for printing results in Edebug."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ For instance:
|
||||||
(?l . \"ls\")))
|
(?l . \"ls\")))
|
||||||
|
|
||||||
Each %-spec may contain optional flag, width, and precision
|
Each %-spec may contain optional flag, width, and precision
|
||||||
modifiers, as follows:
|
specifiers, as follows:
|
||||||
|
|
||||||
%<flags><width><precision>character
|
%<flags><width><precision>character
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ The following flags are allowed:
|
||||||
* ^: Convert to upper case.
|
* ^: Convert to upper case.
|
||||||
* _: Convert to lower 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.
|
ones in `format' when applied to %s.
|
||||||
|
|
||||||
For example, \"%<010b\" means \"substitute into the output the
|
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.
|
"Return STR formatted according to FLAGS, WIDTH, and TRUNC.
|
||||||
FLAGS is a list of keywords as returned by
|
FLAGS is a list of keywords as returned by
|
||||||
`format-spec--parse-flags'. WIDTH and TRUNC are either nil or
|
`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)
|
(let (diff str-width)
|
||||||
;; Truncate original string first, like `format' does.
|
;; Truncate original string first, like `format' does.
|
||||||
(when trunc
|
(when trunc
|
||||||
|
|
|
||||||
|
|
@ -495,9 +495,12 @@ compilation and evaluation time conflicts."
|
||||||
(unless (eq (char-after) ?{)
|
(unless (eq (char-after) ?{)
|
||||||
(ignore-errors (backward-up-list 1 t t)))
|
(ignore-errors (backward-up-list 1 t t)))
|
||||||
(save-excursion
|
(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))
|
(goto-char (c-point 'iopl))
|
||||||
(looking-at ".*new.*")))
|
(looking-at "^[^//]*new[^//]*;$")))
|
||||||
;; Line should not already be terminated
|
;; Line should not already be terminated
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (c-point 'eopl))
|
(goto-char (c-point 'eopl))
|
||||||
|
|
|
||||||
11
lisp/term.el
11
lisp/term.el
|
|
@ -658,7 +658,8 @@ executed once, when the buffer is created."
|
||||||
["Forward Output Group" term-next-prompt t]
|
["Forward Output Group" term-next-prompt t]
|
||||||
["Kill Current Output Group" term-kill-output t]))
|
["Kill Current Output Group" term-kill-output t]))
|
||||||
map)
|
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
|
(defvar term-escape-char nil
|
||||||
"Escape character for char sub-mode of term mode.
|
"Escape character for char sub-mode of term mode.
|
||||||
|
|
@ -961,7 +962,9 @@ underlying shell."
|
||||||
(dotimes (key 21)
|
(dotimes (key 21)
|
||||||
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
|
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
|
||||||
map)
|
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
|
(easy-menu-define term-terminal-menu
|
||||||
(list term-mode-map term-raw-map term-pager-break-map)
|
(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
|
and the variable `term-prompt-regexp' to the appropriate regular
|
||||||
expression.
|
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:
|
Commands in raw mode:
|
||||||
|
|
||||||
\\{term-raw-map}
|
\\{term-raw-map}
|
||||||
|
|
|
||||||
19
test/lisp/progmodes/csharp-mode-resources/indent.erts
Normal file
19
test/lisp/progmodes/csharp-mode-resources/indent.erts
Normal 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]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
=-=-=
|
||||||
30
test/lisp/progmodes/csharp-mode-tests.el
Normal file
30
test/lisp/progmodes/csharp-mode-tests.el
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue