Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

This commit is contained in:
Michael Albinus 2021-09-27 14:28:50 +02:00
commit 2c2688ffbf
23 changed files with 164 additions and 83 deletions

View file

@ -1,4 +1,4 @@
# Created manually from <http://en.wikipedia.org/wiki/Code_page_720>.
# Created manually from <https://en.wikipedia.org/wiki/Code_page_720>.
# The text in that page is available under the terms of the GNU Free
# Documentation License.
0x00-0x7F 0x0000

View file

@ -1,4 +1,4 @@
# Created manually from <http://en.wikipedia.org/wiki/Code_page_858>.
# Created manually from <https://en.wikipedia.org/wiki/Code_page_858>.
# The text in that page is available under the terms of the GNU Free
# Documentation License.
0x00-0x7F 0x0000

View file

@ -243,6 +243,12 @@ END {
override_start[idx] = "1F590"
override_end[idx] = "1F590"
## These are here so that font_range can choose Emoji presentation
## for the preceding codepoint when it encounters a VS
idx++
override_start[idx] = "FE00"
override_end[idx] = "FE0F"
for (k in override_start)
{
i++

View file

@ -694,7 +694,7 @@ As can be seen, it's quite tedious to read or develop this code since
the symbol names to type are so long. We can use shorthands to
alleviate that.
@lisp1
@lisp
(defun snu-split (separator s &optional omit-nulls)
"A match-data saving variation on `split-string'."
(save-match-data (split-string s separator omit-nulls)))

View file

@ -816,7 +816,7 @@ Emacs news, a history of recent user-visible changes
More GNU and FSF information is available at
@uref{https://www.gnu.org} and @uref{http://www.fsf.org}
@uref{https://www.gnu.org} and @uref{https://www.fsf.org}
@node Help installing Emacs
@section Where can I get help in installing Emacs?

View file

@ -156,6 +156,18 @@ sequences (if a suitable font is installed) so that they are displayed
as single glyphs instead of multiple ones. 'Noto Color Emoji' is one
such suitable font.
+++
** Composition of emoji has been improved.
If autocomposition is triggered by an emoji character, then the emoji
font is now used to check if composition can be performed, rather than
the font of the first character of the string being composed. This
allows e.g.
'Emoji codepoint' + VS-16
to be displayed using the emoji font even if 'Emoji codepoint' does
not have emoji presentation by default.
+++
** New command 'execute-extended-command-for-buffer'.
This new command, bound to 'M-S-x', works like
@ -3909,13 +3921,13 @@ It can be used to create Lisp strings with arbitrary byte sequences
+++
** Shorthands for Lisp symbols.
Shorthands are a general purpose namespacing system to make Emacs
Lisp's symbol-naming etiquette easier to use. Also known as a
"renamed symbol", a shorthand is any symbolic form found in Lisp
source that "abbreviates" a symbol's print name with. Usually, the
abbreviated name will be shorter, but that is not necessarily so; this
feature could also be used for providing namespace prefixes to
symbols, in order to avoid name clashes and namespace pollution. For
details, see the manual section "(elisp) Shorthands".
Lisp's symbol-naming etiquette easier to use. A shorthand is any
symbolic form found in Lisp source that "abbreviates" a symbol's print
name. Among other applications, this feature can be used to avoid
name clashes and namespace pollution by renaming an entire file's
worth of symbols with proper and longer prefixes, without actually
touching the Lisp source. For details, see the manual section
"(elisp) Shorthands".
+++
** New function 'string-search'.

View file

@ -2247,7 +2247,7 @@ implementation is only available in UNICOWS.DLL, which implements the
Microsoft Layer for Unicode on Windows 9X, or "MSLU". This article on
MSDN:
http://msdn.microsoft.com/en-us/goglobal/bb688166.aspx
https://web.archive.org/web/20151224032644/https://msdn.microsoft.com/en-us/goglobal/bb688166.aspx
includes a short description of MSLU and a link where it can be
downloaded.
@ -2314,7 +2314,7 @@ dialogs introduced in Windows 7. It is explicitly described in the
MSDN documentation of the GetOpenFileName API used by Emacs to pop up
the file selection dialog. For the details, see
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx
The dialog shows the last directory in which the user selected a file
in a previous invocation of the dialog with the same initial

View file

@ -17307,7 +17307,7 @@
* simple.el (normal-erase-is-backspace-mode): Use input-decode-map
rather than fiddling with global-map bindings, since it should only
affect per-terminal settings.
See http://bugs.gentoo.org/show_bug.cgi?id=289709.
See https://bugs.gentoo.org/show_bug.cgi?id=289709.
* minibuffer.el (completion-table-with-terminator): Allow to specify
the terminator-regexp.

View file

@ -3080,12 +3080,12 @@ Supported keywords for slots are:
`(nth ,pos cl-x))))))
(push slot slots)
(push default-value defaults)
;; The arg "cl-x" is referenced by name in eg pred-form
;; The arg "cl-x" is referenced by name in e.g. pred-form
;; and pred-check, so changing it is not straightforward.
(push `(,defsym ,accessor (cl-x)
,(internal--format-docstring-line
"Access slot \"%s\" of `%s' struct CL-X.%s"
slot name
,(concat
(internal--format-docstring-line
"Access slot \"%s\" of `%s' struct CL-X." slot name)
(if doc (concat "\n" doc) ""))
(declare (side-effect-free t))
,access-body)

View file

@ -627,8 +627,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
py-converter
"\
;; \"pinyin.map\" is included in a free package called CCE. It is
;; available at:
;; http://ftp.debian.org/debian/dists/potato/main
;; available at: [link needs updating -- SK 2021-09-27]
;; https://ftp.debian.org/debian/dists/potato/main
;; /source/utils/cce_0.36.orig.tar.gz
;; This package contains the following copyright notice.
;;
@ -655,8 +655,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
ziranma-converter
"\
;; \"ziranma.cin\" is included in a free package called CCE. It is
;; available at:
;; http://ftp.debian.org/debian/dists/potato/main
;; available at: [link needs updating -- SK 2021-09-27]
;; https://ftp.debian.org/debian/dists/potato/main
;; /source/utils/cce_0.36.orig.tar.gz
;; This package contains the following copyright notice.
;;

View file

@ -532,7 +532,7 @@ characters from these blocks.")
(let (val)
(dolist (elt script-representative-chars)
(let ((subranges w32-no-usb-subranges)
(chars (cdr elt))
(chars (append (cdr elt) nil)) ; handle vectors as well
ch found subrange)
(while (and (consp chars) (not found))
(setq ch (car chars)
@ -595,7 +595,11 @@ default font on FRAME, or its best approximation."
0 nchars script-chars)
'[nil]))
;; Does this font support ALL of the script's
;; representative characters?
;; representative characters? Note that, when the
;; representative characters are specified as a
;; vector, this is a more stringent test than font
;; selection does, because supporting _any_
;; character from the vector is enough.
(setq idx 0)
(while (and (< idx nchars) (not (null (aref glyphs idx))))
(setq idx (1+ idx)))

View file

@ -1712,7 +1712,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
/* Suppress GCC's bogus "no previous prototype for 'FOO'"
and "no previous declaration for 'FOO'" diagnostics,
when FOO is an inline function in the header; see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \

View file

@ -222,7 +222,7 @@
as earlier versions. This is so GetVersion and GetVersionEx APIs
used for bug reporting and other purposes return accurate version
number on Windows 8.1. See the discussion on MSDN
http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
for more details.
2013-12-12 Eli Zaretskii <eliz@gnu.org>

View file

@ -882,14 +882,15 @@ fill_gstring_body (Lisp_Object gstring)
/* Try to compose the characters at CHARPOS according to composition
rule RULE ([PATTERN PREV-CHARS FUNC]). LIMIT limits the characters
to compose. STRING, if not nil, is a target string. WIN is a
window where the characters are being displayed. If characters are
window where the characters are being displayed. CH is the
character that triggered the composition check. If characters are
successfully composed, return the composition as a glyph-string
object. Otherwise return nil. */
static Lisp_Object
autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
ptrdiff_t limit, struct window *win, struct face *face,
Lisp_Object string, Lisp_Object direction)
Lisp_Object string, Lisp_Object direction, int ch)
{
ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object pos = make_fixnum (charpos);
@ -920,7 +921,7 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
struct frame *f = XFRAME (font_object);
if (FRAME_WINDOW_P (f))
{
font_object = font_range (charpos, bytepos, &to, win, face, string);
font_object = font_range (charpos, bytepos, &to, win, face, string, ch);
if (! FONT_OBJECT_P (font_object)
|| (! NILP (re)
&& to < limit
@ -1272,7 +1273,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
if (XFIXNAT (AREF (elt, 1)) != cmp_it->lookback)
goto no_composition;
lgstring = autocmp_chars (elt, charpos, bytepos, endpos,
w, face, string, direction);
w, face, string, direction, cmp_it->ch);
if (composition_gstring_p (lgstring))
break;
lgstring = Qnil;
@ -1310,7 +1311,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
else
direction = QR2L;
lgstring = autocmp_chars (elt, cpos, bpos, charpos + 1, w, face,
string, direction);
string, direction, cmp_it->ch);
if (! composition_gstring_p (lgstring)
|| cpos + LGSTRING_CHAR_LEN (lgstring) - 1 != charpos)
/* Composition failed or didn't cover the current
@ -1679,7 +1680,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit, ptrdiff_t backlim,
for (check = cur; check_pos < check.pos; )
BACKWARD_CHAR (check, stop);
*gstring = autocmp_chars (elt, check.pos, check.pos_byte,
tail, w, NULL, string, Qnil);
tail, w, NULL, string, Qnil, c);
need_adjustment = 1;
if (NILP (*gstring))
{

View file

@ -3866,6 +3866,9 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w,
If STRING is not nil, it is the string to check instead of the current
buffer. In that case, FACE must be not NULL.
CH is the character that actually caused the composition
process to start, it may be different from the character at POS.
The return value is the font-object for the character at POS.
*LIMIT is set to the position where that font can't be used.
@ -3873,15 +3876,16 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w,
Lisp_Object
font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
struct window *w, struct face *face, Lisp_Object string)
struct window *w, struct face *face, Lisp_Object string,
int ch)
{
ptrdiff_t ignore;
int c;
Lisp_Object font_object = Qnil;
struct frame *f = XFRAME (w->frame);
if (!face)
{
struct frame *f = XFRAME (w->frame);
int face_id;
if (NILP (string))
@ -3900,6 +3904,24 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
face = FACE_FROM_ID (f, face_id);
}
/* If the composition was triggered by an emoji, use a character
from 'script-representative-chars', rather than the first
character in the string, to determine the font to use. */
if (EQ (CHAR_TABLE_REF (Vchar_script_table, ch),
Qemoji))
{
Lisp_Object val = assq_no_quit (Qemoji, Vscript_representative_chars);
if (CONSP (val))
{
val = XCDR (val);
if (CONSP (val))
val = XCAR (val);
else if (VECTORP (val))
val = AREF (val, 0);
font_object = font_for_char (face, XFIXNAT (val), pos - 1, string);
}
}
while (pos < *limit)
{
c = (NILP (string)
@ -5423,6 +5445,7 @@ syms_of_font (void)
DEFSYM (Qiso8859_1, "iso8859-1");
DEFSYM (Qiso10646_1, "iso10646-1");
DEFSYM (Qunicode_bmp, "unicode-bmp");
DEFSYM (Qemoji, "emoji");
/* Symbols representing keys of font extra info. */
DEFSYM (QCotf, ":otf");

View file

@ -885,7 +885,7 @@ valid_font_driver (struct font_driver const *d)
extern Lisp_Object font_update_drivers (struct frame *f, Lisp_Object list);
extern Lisp_Object font_range (ptrdiff_t, ptrdiff_t, ptrdiff_t *,
struct window *, struct face *,
Lisp_Object);
Lisp_Object, int);
extern void font_fill_lglyph_metrics (Lisp_Object, struct font *, unsigned int);
extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop,

View file

@ -995,25 +995,24 @@ - (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
/* Note: This triggers an animation, which calls windowDidResize
repeatedly. */
f->output_data.ns->in_animation = 1;
[[[view window] toolbar] setVisible: NO];
[[[view window] toolbar] setVisible:NO];
f->output_data.ns->in_animation = 0;
[[view window] setToolbar:nil];
unblock_input ();
}
void
update_frame_tool_bar (struct frame *f)
update_frame_tool_bar_1 (struct frame *f, EmacsToolbar *toolbar)
/* --------------------------------------------------------------------------
Update toolbar contents.
-------------------------------------------------------------------------- */
{
int i, k = 0;
NSWindow *window = [FRAME_NS_VIEW (f) window];
EmacsToolbar *toolbar = (EmacsToolbar *)[window toolbar];
NSTRACE ("update_frame_tool_bar");
if (window == nil || toolbar == nil) return;
block_input ();
#ifdef NS_IMPL_COCOA
@ -1094,13 +1093,6 @@ - (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
#undef TOOLPROP
}
if (![toolbar isVisible] != !FRAME_EXTERNAL_TOOL_BAR (f))
{
f->output_data.ns->in_animation = 1;
[toolbar setVisible: FRAME_EXTERNAL_TOOL_BAR (f)];
f->output_data.ns->in_animation = 0;
}
#ifdef NS_IMPL_COCOA
if ([toolbar changed])
{
@ -1124,9 +1116,28 @@ - (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item
[newDict release];
}
#endif
[toolbar setVisible:YES];
unblock_input ();
}
void
update_frame_tool_bar (struct frame *f)
{
EmacsWindow *window = (EmacsWindow *)[FRAME_NS_VIEW (f) window];
EmacsToolbar *toolbar = (EmacsToolbar *)[window toolbar];
if (!toolbar)
{
[window createToolbar:f];
return;
}
if (window == nil || toolbar == nil) return;
update_frame_tool_bar_1 (f, toolbar);
}
/* ==========================================================================

View file

@ -418,6 +418,7 @@ typedef id instancetype;
- (instancetype)initWithEmacsFrame:(struct frame *)f;
- (instancetype)initWithEmacsFrame:(struct frame *)f fullscreen:(BOOL)fullscreen screen:(NSScreen *)screen;
- (void)createToolbar:(struct frame *)f;
- (void)setParentChildRelationships;
- (NSInteger)borderWidth;
- (BOOL)restackWindow:(NSWindow *)win above:(BOOL)above;
@ -488,7 +489,7 @@ typedef id instancetype;
- (void)lockFocus;
- (void)unlockFocus;
#endif
- (void)copyRect:(NSRect)srcRect to:(NSRect)dstRect;
- (void)copyRect:(NSRect)srcRect to:(NSPoint)dest;
/* Non-notification versions of NSView methods. Used for direct calls. */
- (void)windowWillEnterFullScreen;
@ -1148,6 +1149,10 @@ extern void ns_init_locale (void);
/* in nsmenu */
extern void update_frame_tool_bar (struct frame *f);
#ifdef __OBJC__
extern void update_frame_tool_bar_1 (struct frame *f, EmacsToolbar *toolbar);
#endif
extern void free_frame_tool_bar (struct frame *f);
extern Lisp_Object find_and_return_menu_selection (struct frame *f,
bool keymaps,

View file

@ -1021,15 +1021,6 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
ns_update_auto_hide_menu_bar ();
NSToolbar *toolbar = [[FRAME_NS_VIEW (f) window] toolbar];
if (toolbar)
{
/* Ensure the toolbars visibility is set correctly. */
BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
if (! tbar_visible != ! [toolbar isVisible])
[toolbar setVisible: tbar_visible];
}
ns_updating_frame = f;
[view lockFocus];
}
@ -2710,10 +2701,10 @@ Hide the window (X11 semantics)
{
NSRect srcRect = NSMakeRect (x, from_y, width, height);
NSRect dstRect = NSMakeRect (x, to_y, width, height);
NSPoint dest = NSMakePoint (x, to_y);
EmacsView *view = FRAME_NS_VIEW (f);
[view copyRect:srcRect to:dstRect];
[view copyRect:srcRect to:dest];
#ifdef NS_IMPL_COCOA
[view setNeedsDisplayInRect:srcRect];
#endif
@ -2835,11 +2826,11 @@ Hide the window (X11 semantics)
-------------------------------------------------------------------------- */
{
NSRect srcRect = NSMakeRect (x, y, width, height);
NSRect dstRect = NSMakeRect (x+shift_by, y, width, height);
NSPoint dest = NSMakePoint (x+shift_by, y);
NSTRACE ("ns_shift_glyphs_for_insert");
[FRAME_NS_VIEW (f) copyRect:srcRect to:dstRect];
[FRAME_NS_VIEW (f) copyRect:srcRect to:dest];
}
@ -7401,7 +7392,6 @@ - (void)windowDidEnterFullScreen /* provided for direct calls */
}
else
{
BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO;
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 \
&& MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
unsigned val = (unsigned)[NSApp presentationOptions];
@ -7419,7 +7409,6 @@ - (void)windowDidEnterFullScreen /* provided for direct calls */
[NSApp setPresentationOptions: options];
}
#endif
[[[self window]toolbar] setVisible:tbar_visible];
}
}
@ -7460,14 +7449,6 @@ - (void)windowDidExitFullScreen /* provided for direct calls */
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
[self updateCollectionBehavior];
#endif
if (FRAME_EXTERNAL_TOOL_BAR (emacsframe))
{
[[[self window] toolbar] setVisible:YES];
update_frame_tool_bar (emacsframe);
[[self window] display];
}
else
[[[self window] toolbar] setVisible:NO];
if (next_maximized != -1)
[[self window] performZoom:self];
@ -7873,17 +7854,39 @@ - (void)windowDidChangeBackingProperties:(NSNotification *)notification
#endif /* NS_IMPL_COCOA */
- (void)copyRect:(NSRect)srcRect to:(NSRect)dstRect
- (void)copyRect:(NSRect)srcRect to:(NSPoint)dest
{
NSTRACE ("[EmacsView copyRect:To:]");
NSTRACE_RECT ("Source", srcRect);
NSTRACE_RECT ("Destination", dstRect);
NSTRACE_POINT ("Destination", dest);
NSRect dstRect = NSMakeRect (dest.x, dest.y, NSWidth (srcRect),
NSHeight (srcRect));
NSRect frame = [self frame];
/* TODO: This check is an attempt to debug a rare graphical glitch
on macOS and should be removed before the Emacs 28 release. */
if (!NSContainsRect (frame, srcRect)
|| !NSContainsRect (frame, dstRect))
{
NSLog (@"[EmacsView copyRect:to:] Attempting to copy to or "
"from an area outside the graphics buffer.");
NSLog (@" Frame: (%f, %f) %f×%f",
NSMinX (frame), NSMinY (frame),
NSWidth (frame), NSHeight (frame));
NSLog (@" Source: (%f, %f) %f×%f",
NSMinX (srcRect), NSMinY (srcRect),
NSWidth (srcRect), NSHeight (srcRect));
NSLog (@" Destination: (%f, %f) %f×%f",
NSMinX (dstRect), NSMinY (dstRect),
NSWidth (dstRect), NSHeight (dstRect));
}
#ifdef NS_IMPL_COCOA
if ([self wantsLayer])
{
double scale = [[self window] backingScaleFactor];
CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
CGContextRef context = [(EmacsLayer *)[self layer] getContext];
int bpp = CGBitmapContextGetBitsPerPixel (context) / 8;
void *pixels = CGBitmapContextGetData (context);
int rowSize = CGBitmapContextGetBytesPerRow (context);
@ -7892,8 +7895,8 @@ - (void)copyRect:(NSRect)srcRect to:(NSRect)dstRect
+ (int) (NSMinY (srcRect) * scale * rowSize
+ NSMinX (srcRect) * scale * bpp);
void *dstPixels = (char *) pixels
+ (int) (NSMinY (dstRect) * scale * rowSize
+ NSMinX (dstRect) * scale * bpp);
+ (int) (dest.y * scale * rowSize
+ dest.x * scale * bpp);
if (NSIntersectsRect (srcRect, dstRect)
&& NSMinY (srcRect) < NSMinY (dstRect))
@ -8298,8 +8301,7 @@ - (instancetype) initWithEmacsFrame:(struct frame *)f
[self setOpaque:NO];
/* toolbar support */
if (! FRAME_UNDECORATED (f))
[self createToolbar:f];
[self createToolbar:f];
/* macOS Sierra automatically enables tabbed windows. We can't
allow this to be enabled until it's available on a Free system.
@ -8316,13 +8318,17 @@ - (instancetype) initWithEmacsFrame:(struct frame *)f
- (void)createToolbar: (struct frame *)f
{
if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f))
return;
EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
EmacsToolbar *toolbar = [[EmacsToolbar alloc]
initForView:view
withIdentifier:[NSString stringWithLispString:f->name]];
[toolbar setVisible:NO];
[self setToolbar:toolbar];
update_frame_tool_bar_1 (f, toolbar);
#ifdef NS_IMPL_COCOA
{

View file

@ -87,7 +87,7 @@ static size_t clipboard_storage_size;
/* C functions to access the Windows 3.1x clipboard from DOS apps.
The information was obtained from the Microsoft Knowledge Base,
article Q67675 and can be found at:
article Q67675 and can be found at: [broken link -- SK 2021-09-27]
http://www.microsoft.com/kb/developr/win_dk/q67675.htm */
/* See also Ralf Brown's Interrupt List.

View file

@ -767,6 +767,18 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350."
(should-not (equal dir default-directory))
(should (file-exists-p default-directory)))))
(ert-deftest subr-test-internal--format-docstring-line ()
(should
(string= (let ((fill-column 60))
(internal--format-docstring-line
"Emacs is the advanced, extensible, customizable, \
self-documenting editor. This manual describes how to edit with Emacs and \
some of the ways to customize it; it corresponds to GNU Emacs version 28.1."))
"Emacs is the advanced, extensible, customizable,
self-documenting editor. This manual describes how to edit
with Emacs and some of the ways to customize it; it
corresponds to GNU Emacs version 28.1.")))
(ert-deftest test-ensure-list ()
(should (equal (ensure-list nil) nil))
(should (equal (ensure-list :foo) '(:foo)))

View file

@ -478,8 +478,9 @@
(eq family 'unspecified))
family)))
;; This function doesn't have a doc string on purpose.
(defun comp-test-46670-1-f (_)
"Foo.")
"foo")
(defun comp-test-46670-2-f (s)
(and (equal (comp-test-46670-1-f (length s)) s)

View file

@ -285,7 +285,7 @@ Check that the resulting binaries do not differ."
(should (string= (comp-tests-condition-case-0-f)
"arith-error Arithmetic error catched"))
(should (string= (comp-tests-condition-case-1-f)
"error foo catched"))
"error Foo catched"))
(should (= (comp-tests-catch-f
(lambda () (throw 'foo 3)))
3))
@ -333,7 +333,7 @@ Check that the resulting binaries do not differ."
(comp-deftest doc ()
(should (string= (documentation #'comp-tests-doc-f)
"A nice docstring"))
"A nice docstring."))
;; Check a preloaded function, we can't use `comp-tests-doc-f' now
;; as this is loaded manually with no .elc.
(should (string-match "\\.*.elc\\'" (symbol-file #'error))))