commit dd937784a3e3c79c5270cbfdb15a9f8df1600cde (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Mon Aug 1 06:24:15 2022 +0000 Improve frame synchronization support on Haiku * src/ftcrfont.c (ftcrfont_draw): * src/haikufns.c (haiku_set_background_color): * src/haikuterm.c (haiku_clip_to_string): (haiku_clip_to_string_exactly): (haiku_clear_frame_area): (haiku_clear_frame): (haiku_draw_box_rect): (haiku_draw_relief_rect): (haiku_draw_underwave): (haiku_draw_text_decoration): (haiku_draw_plain_background): (haiku_draw_stipple_background): (haiku_draw_glyph_string_foreground): (haiku_draw_glyphless_glyph_string_foreground): (haiku_draw_stretch_glyph_string): (haiku_start_clip): (haiku_end_clip): (haiku_clip_to_row): (haiku_draw_composite_glyph_string_foreground): (haiku_draw_image_glyph_string): (haiku_draw_glyph_string): (haiku_after_update_window_line): (haiku_draw_hollow_cursor): (haiku_draw_bar_cursor): (haiku_draw_vertical_window_border): (haiku_draw_window_divider): (haiku_scroll_bar_create): (haiku_set_horizontal_scroll_bar): (haiku_set_vertical_scroll_bar): (haiku_draw_fringe_bitmap): (haiku_scroll_run): (haiku_read_socket): (haiku_flash): (haiku_clear_under_internal_border): (haiku_scroll_bar_remove): * src/haikuterm.h (MAKE_FRAME_DIRTY): (FRAME_CR_CONTEXT): Don't dirty frames if not necessary. diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 6bb41110d5..119ec28409 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -567,7 +567,7 @@ ftcrfont_draw (struct glyph_string *s, unblock_input (); return 0; } - BView_cr_dump_clipping (FRAME_HAIKU_VIEW (f), cr); + BView_cr_dump_clipping (FRAME_HAIKU_DRAWABLE (f), cr); #endif if (with_background) diff --git a/src/haikufns.c b/src/haikufns.c index 64aa2fde4a..aaa4e86622 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -1505,9 +1505,9 @@ haiku_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval if (FRAME_HAIKU_VIEW (f)) { - BView_draw_lock (FRAME_HAIKU_VIEW (f), false, 0, 0, 0, 0); - BView_SetViewColor (FRAME_HAIKU_VIEW (f), background); - BView_draw_unlock (FRAME_HAIKU_VIEW (f)); + BView_draw_lock (FRAME_HAIKU_DRAWABLE (f), false, 0, 0, 0, 0); + BView_SetViewColor (FRAME_HAIKU_DRAWABLE (f), background); + BView_draw_unlock (FRAME_HAIKU_DRAWABLE (f)); FRAME_OUTPUT_DATA (f)->cursor_fg = background; update_face_from_frame_parameter (f, Qbackground_color, arg); diff --git a/src/haikuterm.c b/src/haikuterm.c index f2bee1263d..c2d4e34ba2 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -163,15 +163,15 @@ haiku_clip_to_string (struct glyph_string *s) /* If n[FOO].width is 0, it means to not draw at all, so set the clipping to some impossible value. */ if (r[0].width <= 0) - BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), FRAME_PIXEL_WIDTH (s->f), FRAME_PIXEL_HEIGHT (s->f), 10, 10); else { - BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), r[0].x, + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), r[0].x, r[0].y, r[0].width, r[0].height); - BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), r[0].x, + BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), r[0].x, r[0].y, r[0].width, r[0].height); } } @@ -181,15 +181,15 @@ haiku_clip_to_string (struct glyph_string *s) /* If n[FOO].width is 0, it means to not draw at all, so set the clipping to some impossible value. */ if (r[1].width <= 0) - BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), FRAME_PIXEL_WIDTH (s->f), FRAME_PIXEL_HEIGHT (s->f), 10, 10); else { - BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), r[1].x, r[1].y, + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), r[1].x, r[1].y, r[1].width, r[1].height); - BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), r[1].x, + BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), r[1].x, r[1].y, r[1].width, r[1].height); } } @@ -198,9 +198,9 @@ haiku_clip_to_string (struct glyph_string *s) static void haiku_clip_to_string_exactly (struct glyph_string *s, struct glyph_string *dst) { - BView_ClipToRect (FRAME_HAIKU_VIEW (s->f), s->x, s->y, + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (s->f), s->x, s->y, s->width, s->height); - BView_invalidate_region (FRAME_HAIKU_VIEW (s->f), s->x, + BView_invalidate_region (FRAME_HAIKU_DRAWABLE (s->f), s->x, s->y, s->width, s->height); } @@ -246,7 +246,7 @@ static void haiku_clear_frame_area (struct frame *f, int x, int y, int width, int height) { - void *vw = FRAME_HAIKU_VIEW (f); + void *vw = FRAME_HAIKU_DRAWABLE (f); block_input (); BView_draw_lock (vw, true, x, y, width, height); BView_StartClip (vw); @@ -261,7 +261,7 @@ haiku_clear_frame_area (struct frame *f, int x, int y, static void haiku_clear_frame (struct frame *f) { - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); @@ -596,7 +596,7 @@ haiku_draw_box_rect (struct glyph_string *s, int left_x, int top_y, int right_x, int bottom_y, int hwidth, int vwidth, bool left_p, bool right_p, struct haiku_rect *clip_rect) { - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); struct face *face = s->face; BView_SetHighColor (view, face->box_color); @@ -660,7 +660,7 @@ haiku_draw_relief_rect (struct glyph_string *s, int left_x, int top_y, uint32_t color_white, color_black; void *view; - view = FRAME_HAIKU_VIEW (s->f); + view = FRAME_HAIKU_DRAWABLE (s->f); haiku_calculate_relief_colors (s, &color_white, &color_black); BView_SetHighColor (view, raised_p ? color_white : color_black); @@ -769,7 +769,7 @@ haiku_draw_underwave (struct glyph_string *s, int width, int x) dy = wave_height - 1; y = s->ybase - wave_height + 3; xmax = x + width; - view = FRAME_HAIKU_VIEW (s->f); + view = FRAME_HAIKU_DRAWABLE (s->f); BView_StartClip (view); haiku_clip_to_string (s); @@ -811,7 +811,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, if (s->hl == DRAW_CURSOR) haiku_merge_cursor_foreground (s, &cursor_color, NULL); - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); if (face->underline) { @@ -1013,7 +1013,7 @@ static void haiku_draw_plain_background (struct glyph_string *s, struct face *face, int x, int y, int width, int height) { - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); unsigned long cursor_color; if (s->hl == DRAW_CURSOR) @@ -1075,7 +1075,7 @@ haiku_draw_stipple_background (struct glyph_string *s, struct face *face, unsigned long foreground, background; void *view; - view = FRAME_HAIKU_VIEW (s->f); + view = FRAME_HAIKU_DRAWABLE (s->f); rec = haiku_get_bitmap_rec (s->f, s->face->stipple); if (explicit_colors_p) @@ -1173,7 +1173,7 @@ haiku_draw_glyph_string_foreground (struct glyph_string *s) else x = s->x; - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); if (s->font_not_found_p) { @@ -1289,9 +1289,9 @@ haiku_draw_glyphless_glyph_string_foreground (struct glyph_string *s) else color = s->face->foreground; - BView_SetHighColor (FRAME_HAIKU_VIEW (s->f), color); - BView_SetPenSize (FRAME_HAIKU_VIEW (s->f), 1); - BView_StrokeRectangle (FRAME_HAIKU_VIEW (s->f), + BView_SetHighColor (FRAME_HAIKU_DRAWABLE (s->f), color); + BView_SetPenSize (FRAME_HAIKU_DRAWABLE (s->f), 1); + BView_StrokeRectangle (FRAME_HAIKU_DRAWABLE (s->f), x, s->ybase - glyph->ascent, glyph->pixel_width, glyph->ascent + glyph->descent); @@ -1335,7 +1335,7 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) if (s->row->reversed_p) x -= width; - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); unsigned long cursor_color; haiku_merge_cursor_foreground (s, NULL, &cursor_color); @@ -1401,14 +1401,14 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) static void haiku_start_clip (struct glyph_string *s) { - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); BView_StartClip (view); } static void haiku_end_clip (struct glyph_string *s) { - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); BView_EndClip (view); } @@ -1428,7 +1428,7 @@ haiku_clip_to_row (struct window *w, struct glyph_row *row, width = window_width; height = row->visible_height; - BView_ClipToRect (FRAME_HAIKU_VIEW (f), x, y, width, height); + BView_ClipToRect (FRAME_HAIKU_DRAWABLE (f), x, y, width, height); } static void @@ -1448,7 +1448,7 @@ haiku_draw_composite_glyph_string_foreground (struct glyph_string *s) { int i, j, x; struct font *font = s->font; - void *view = FRAME_HAIKU_VIEW (s->f); + void *view = FRAME_HAIKU_DRAWABLE (s->f); struct face *face = s->face; /* If first glyph of S has a left box line, start drawing the text @@ -1670,7 +1670,7 @@ haiku_draw_image_glyph_string (struct glyph_string *s) if (s->slice.y == 0) y += box_line_vwidth; - view = FRAME_HAIKU_VIEW (s->f); + view = FRAME_HAIKU_DRAWABLE (s->f); bitmap = s->img->pixmap; s->stippled_p = face->stipple != 0; @@ -1803,7 +1803,7 @@ haiku_draw_image_glyph_string (struct glyph_string *s) static void haiku_draw_glyph_string (struct glyph_string *s) { - void *view = FRAME_HAIKU_VIEW (s->f);; + void *view = FRAME_HAIKU_DRAWABLE (s->f);; struct face *face = s->face; block_input (); @@ -2001,7 +2001,7 @@ haiku_after_update_window_line (struct window *w, block_input (); if (face) { - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); BView_draw_lock (view, false, 0, 0, 0, 0); BView_StartClip (view); BView_SetHighColor (view, (face->background_defaulted_p @@ -2010,7 +2010,7 @@ haiku_after_update_window_line (struct window *w, BView_FillRectangle (view, 0, y, width, height); BView_FillRectangle (view, FRAME_PIXEL_WIDTH (f) - width, y, width, height); - BView_invalidate_region (FRAME_HAIKU_VIEW (f), + BView_invalidate_region (FRAME_HAIKU_DRAWABLE (f), 0, y, width, height); BView_invalidate_region (view, FRAME_PIXEL_WIDTH (f) - width, y, width, height); @@ -2075,7 +2075,7 @@ haiku_draw_hollow_cursor (struct window *w, struct glyph_row *row) void *view; f = XFRAME (WINDOW_FRAME (w)); - view = FRAME_HAIKU_VIEW (f); + view = FRAME_HAIKU_DRAWABLE (f); /* Get the glyph the cursor is on. If we can't tell because the current matrix is invalid or such, give up. */ @@ -2148,7 +2148,7 @@ haiku_draw_bar_cursor (struct window *w, struct glyph_row *row, } else { - view = FRAME_HAIKU_VIEW (f); + view = FRAME_HAIKU_DRAWABLE (f); face = FACE_FROM_ID (f, cursor_glyph->face_id); /* If the glyph's background equals the color we normally draw @@ -2334,7 +2334,7 @@ haiku_draw_vertical_window_border (struct window *w, struct face *face; face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID); - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); BView_draw_lock (view, true, x, y_0, 1, y_1); BView_StartClip (view); if (face) @@ -2384,7 +2384,7 @@ haiku_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) unsigned long color_last = (face_last ? face_last->foreground : FRAME_FOREGROUND_PIXEL (f)); - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); BView_draw_lock (view, true, x0, y0, x1 - x0 + 1, y1 - y0 + 1); BView_StartClip (view); @@ -2554,7 +2554,7 @@ haiku_scroll_bar_create (struct window *w, int left, int top, void *view; f = XFRAME (WINDOW_FRAME (w)); - view = FRAME_HAIKU_VIEW (f); + view = FRAME_HAIKU_DRAWABLE (f); block_input (); bar = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, prev, PVEC_OTHER); @@ -2604,7 +2604,7 @@ haiku_set_horizontal_scroll_bar (struct window *w, int portion, int whole, int p width = window_width; top = WINDOW_SCROLL_BAR_AREA_Y (w); height = WINDOW_CONFIG_SCROLL_BAR_HEIGHT (w); - view = FRAME_HAIKU_VIEW (WINDOW_XFRAME (w)); + view = FRAME_HAIKU_DRAWABLE (WINDOW_XFRAME (w)); block_input (); @@ -2663,7 +2663,7 @@ haiku_set_vertical_scroll_bar (struct window *w, int portion, int whole, int pos left = WINDOW_SCROLL_BAR_AREA_X (w); width = WINDOW_SCROLL_BAR_AREA_WIDTH (w); - view = FRAME_HAIKU_VIEW (WINDOW_XFRAME (w)); + view = FRAME_HAIKU_DRAWABLE (WINDOW_XFRAME (w)); block_input (); if (NILP (w->vertical_scroll_bar)) @@ -2712,7 +2712,7 @@ haiku_draw_fringe_bitmap (struct window *w, struct glyph_row *row, uint32 col; f = XFRAME (WINDOW_FRAME (w)); - view = FRAME_HAIKU_VIEW (f); + view = FRAME_HAIKU_DRAWABLE (f); face = p->face; block_input (); @@ -2828,7 +2828,7 @@ static void haiku_scroll_run (struct window *w, struct run *run) { struct frame *f = XFRAME (w->frame); - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); int x, y, width, height, from_y, to_y, bottom_y; window_box (w, ANY_AREA, &x, &y, &width, &height); @@ -3211,9 +3211,9 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) continue; } - BView_draw_lock (FRAME_HAIKU_VIEW (f), false, 0, 0, 0, 0); - BView_resize_to (FRAME_HAIKU_VIEW (f), width, height); - BView_draw_unlock (FRAME_HAIKU_VIEW (f)); + BView_draw_lock (FRAME_HAIKU_DRAWABLE (f), false, 0, 0, 0, 0); + BView_resize_to (FRAME_HAIKU_DRAWABLE (f), width, height); + BView_draw_unlock (FRAME_HAIKU_DRAWABLE (f)); if (width != FRAME_PIXEL_WIDTH (f) || height != FRAME_PIXEL_HEIGHT (f) @@ -4126,7 +4126,7 @@ haiku_flash (struct frame *f) int flash_left = FRAME_INTERNAL_BORDER_WIDTH (f); int flash_right = FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f); int width = flash_right - flash_left; - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); object_wait_info info; bigtime_t wakeup; @@ -4454,7 +4454,7 @@ haiku_clear_under_internal_border (struct frame *f) ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) : INTERNAL_BORDER_FACE_ID)); struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); - void *view = FRAME_HAIKU_VIEW (f); + void *view = FRAME_HAIKU_DRAWABLE (f); block_input (); BView_draw_lock (view, true, 0, 0, FRAME_PIXEL_WIDTH (f), @@ -4496,7 +4496,7 @@ haiku_scroll_bar_remove (struct scroll_bar *bar) struct frame *f; f = WINDOW_XFRAME (XWINDOW (bar->window)); - view = FRAME_HAIKU_VIEW (f); + view = FRAME_HAIKU_DRAWABLE (f); block_input (); BView_forget_scroll_bar (view, bar->left, bar->top, diff --git a/src/haikuterm.h b/src/haikuterm.h index 02a364f671..b603c0a482 100644 --- a/src/haikuterm.h +++ b/src/haikuterm.h @@ -275,7 +275,8 @@ struct scroll_bar #define MAKE_FRAME_DIRTY(f) (FRAME_DIRTY_P (f) = 1) #define FRAME_OUTPUT_DATA(f) ((f)->output_data.haiku) #define FRAME_HAIKU_WINDOW(f) (FRAME_OUTPUT_DATA (f)->window) -#define FRAME_HAIKU_VIEW(f) ((MAKE_FRAME_DIRTY (f)), FRAME_OUTPUT_DATA (f)->view) +#define FRAME_HAIKU_VIEW(f) (FRAME_OUTPUT_DATA (f)->view) +#define FRAME_HAIKU_DRAWABLE(f) ((MAKE_FRAME_DIRTY (f)), FRAME_HAIKU_VIEW (f)) #define FRAME_HAIKU_MENU_BAR(f) (FRAME_OUTPUT_DATA (f)->menubar) #define FRAME_DISPLAY_INFO(f) (FRAME_OUTPUT_DATA (f)->display_info) #define FRAME_FONT(f) (FRAME_OUTPUT_DATA (f)->font) @@ -287,7 +288,7 @@ struct scroll_bar #ifdef USE_BE_CAIRO #define FRAME_CR_CONTEXT(f) \ (FRAME_HAIKU_VIEW (f) \ - ? EmacsView_cairo_context (FRAME_HAIKU_VIEW (f)) \ + ? EmacsView_cairo_context (FRAME_HAIKU_DRAWABLE (f)) \ : NULL) #endif commit 99754dad3c612703e06439cdb324033a25e24464 Author: Po Lu Date: Mon Aug 1 05:51:59 2022 +0000 Implement primitive frame synchronization on Haiku Instead of relying on a compositor to do the work, we simply wait for VBLANK and hope that the update finishes soon enough. * doc/lispref/frames.texi (Management Parameters): Document that frame synchronization is now supported on Haiku. * src/haiku_support.cc (class EmacsView): New field `use_frame_synchronization'. (FlipBuffers): Wait for vertical blanking period. (be_set_use_frame_synchronization): New function. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_create_frame): Set `use-frame-synchronization'. (haiku_set_use_frame_synchronization) (haiku_frame_parm_handlers): New param handler. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index e5dec4f807..262b86672d 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2188,11 +2188,11 @@ way that its contents are hidden, leaving only the title bar. @item use-frame-synchronization If non-@code{nil}, synchronize the frame redisplay with the refresh rate of the monitor to avoid graphics tearing. At present, this is -only implemented on the X window system inside no-toolkit and X -toolkit builds, does not work correctly with toolkit scroll bars, and -requires a compositing manager supporting the relevant display -synchronization protocols. The @code{synchronizeResize} X resource -must also be set to the string @code{"extended"}. +only implemented on Haiku and the X window system inside no-toolkit +and X toolkit builds, does not work correctly with toolkit scroll +bars, and requires a compositing manager supporting the relevant +display synchronization protocols. The @code{synchronizeResize} X +resource must also be set to the string @code{"extended"}. @vindex inhibit-double-buffering@r{, a frame parameter} @item inhibit-double-buffering diff --git a/src/haiku_support.cc b/src/haiku_support.cc index b7590f68a4..983928442a 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -1512,6 +1512,8 @@ class EmacsView : public BView BMessage *wait_for_release_message; int64 grabbed_buttons; + BScreen screen; + bool use_frame_synchronization; EmacsView () : BView (BRect (0, 0, 0, 0), "Emacs", B_FOLLOW_NONE, B_WILL_DRAW), @@ -1524,7 +1526,8 @@ class EmacsView : public BView cr_context (NULL), #endif wait_for_release_message (NULL), - grabbed_buttons (0) + grabbed_buttons (0), + use_frame_synchronization (false) { } @@ -1546,6 +1549,16 @@ class EmacsView : public BView grab_view_locker.Unlock (); } + void + SetFrameSynchronization (bool sync) + { + if (LockLooper ()) + { + use_frame_synchronization = sync; + UnlockLooper (); + } + } + void MessageReceived (BMessage *msg) { @@ -1722,14 +1735,14 @@ class EmacsView : public BView void FlipBuffers (void) { + EmacsWindow *w; if (!LockLooper ()) gui_abort ("Failed to lock looper during buffer flip"); if (!offscreen_draw_view) gui_abort ("Failed to lock offscreen view during buffer flip"); offscreen_draw_view->Sync (); - - EmacsWindow *w = (EmacsWindow *) Window (); + w = (EmacsWindow *) Window (); w->shown_flag = 0; if (copy_bitmap && @@ -1750,6 +1763,11 @@ class EmacsView : public BView if (copy_bitmap->InitCheck () != B_OK) gui_abort ("Failed to init copy bitmap during buffer flip"); + /* Wait for VBLANK. If responding to the invalidation or buffer + flipping takes longer than the blanking period, we lose. */ + if (use_frame_synchronization) + screen.WaitForRetrace (); + Invalidate (&invalid_region); invalid_region.MakeEmpty (); UnlockLooper (); @@ -5474,3 +5492,12 @@ be_clear_grab_view (void) grab_view_locker.Unlock (); } } + +void +be_set_use_frame_synchronization (void *view, bool sync) +{ + EmacsView *vw; + + vw = (EmacsView *) view; + vw->SetFrameSynchronization (sync); +} diff --git a/src/haiku_support.h b/src/haiku_support.h index 76fe071f2c..ca1808556a 100644 --- a/src/haiku_support.h +++ b/src/haiku_support.h @@ -728,6 +728,7 @@ extern void be_lock_window (void *); extern void be_unlock_window (void *); extern bool be_get_explicit_workarea (int *, int *, int *, int *); extern void be_clear_grab_view (void); +extern void be_set_use_frame_synchronization (void *, bool); #ifdef __cplusplus } diff --git a/src/haikufns.c b/src/haikufns.c index 055a33e2c1..64aa2fde4a 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -949,6 +949,10 @@ haiku_create_frame (Lisp_Object parms) || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame))))) kset_default_minibuffer_frame (kb, frame); + /* Set whether or not frame synchronization is enabled. */ + gui_default_parameter (f, parms, Quse_frame_synchronization, Qt, + NULL, NULL, RES_TYPE_BOOLEAN); + gui_default_parameter (f, parms, Qz_group, Qnil, NULL, NULL, RES_TYPE_SYMBOL); @@ -2115,6 +2119,13 @@ haiku_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) update_face_from_frame_parameter (f, Qmouse_color, arg); } +static void +haiku_set_use_frame_synchronization (struct frame *f, Lisp_Object arg, + Lisp_Object oldval) +{ + be_set_use_frame_synchronization (FRAME_HAIKU_VIEW (f), !NILP (arg)); +} + DEFUN ("haiku-set-mouse-absolute-pixel-position", @@ -3128,7 +3139,7 @@ frame_parm_handler haiku_frame_parm_handlers[] = haiku_set_override_redirect, gui_set_no_special_glyphs, gui_set_alpha_background, - NULL, + haiku_set_use_frame_synchronization, }; void commit bc03a5b2c4a40e520888169091fe9ea552233f5f Author: Po Lu Date: Mon Aug 1 13:34:02 2022 +0800 * lisp/cedet/ede/base.el (ede-project): Fix warning when loading EDE. diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index 27016f0f5c..8f5db8db18 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -171,7 +171,7 @@ For Automake based projects, each directory is treated as a project.") :label "Local Targets" :group (targets) :documentation "List of top level targets in this project.") - (locate-obj :type (or null ede-locate-base-child) + (locate-obj :type (or null ede-locate-base) :documentation "A locate object to use as a backup to `ede-expand-filename'.") (tool-cache :initarg :tool-cache commit cf33f09ee2e147ccc987a644fc47953b30babb0a Merge: f647d60cb7 78759ddcb0 Author: Stefan Kangas Date: Mon Aug 1 06:30:26 2022 +0200 ; Merge from origin/emacs-28 The following commit was skipped: 78759ddcb0 * src/lisp.h (CHECK_INTEGER): Fix the predicate. (Bug#56856) commit f647d60cb79746c156efb6466ecc09c5aa6d2ad4 Author: Stefan Kangas Date: Mon Aug 1 06:01:07 2022 +0200 Update publicsuffix.txt from upstream * etc/publicsuffix.txt: Update from https://publicsuffix.org/list/public_suffix_list.dat dated 2022-07-28 15:23:34 UTC. diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt index 18cb313a32..b5a89c65cc 100644 --- a/etc/publicsuffix.txt +++ b/etc/publicsuffix.txt @@ -7130,7 +7130,7 @@ org.zw // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-06-14T15:15:19Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-07-28T15:14:54Z // This list is auto-generated, don't edit it manually. // aaa : 2015-02-26 American Automobile Association, Inc. aaa @@ -8020,7 +8020,7 @@ dvag // dvr : 2016-05-26 DISH Technologies L.L.C. dvr -// earth : 2014-12-04 Interlink Co., Ltd. +// earth : 2014-12-04 Interlink Systems Innovation Institute K.K. earth // eat : 2014-01-23 Charleston Road Registry Inc. @@ -8779,7 +8779,7 @@ lanxess // lasalle : 2015-04-02 Jones Lang LaSalle Incorporated lasalle -// lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico +// lat : 2014-10-16 XYZ.COM LLC lat // latino : 2015-07-30 Dish DBS Corporation @@ -9034,7 +9034,7 @@ mobile // moda : 2013-11-07 Dog Beach, LLC moda -// moe : 2013-11-13 Interlink Co., Ltd. +// moe : 2013-11-13 Interlink Systems Innovation Institute K.K. moe // moi : 2014-12-18 Amazon Registry Services, Inc. commit f5e5e964744cf180e54c903730abc7fab5213b5e Author: Stefan Kangas Date: Mon Aug 1 05:07:18 2022 +0200 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 6574badf2d..f7275ef3c6 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -5064,6 +5064,8 @@ evaluate `compilation-shell-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{compilation-shell-minor-mode-map} + (fn &optional ARG)" t nil) (autoload 'compilation-minor-mode "compile" "\ Toggle Compilation minor mode. @@ -5087,6 +5089,8 @@ evaluate `compilation-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{compilation-minor-mode-map} + (fn &optional ARG)" t nil) (autoload 'compilation-next-error-function "compile" "\ Advance to the next error message and visit the file where the error was. @@ -8438,7 +8442,7 @@ A second call of this function without changing point inserts the next match. A call with prefix PREFIX reads the symbol to insert from the minibuffer with completion. -(fn PREFIX)" '("P") nil) +(fn PREFIX)" t nil) (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ Repeat last operation on files in tree. FIRST-TIME non-nil means this is not a repetition, but the first time. @@ -9975,7 +9979,7 @@ When present, ID should be an opaque object used to identify the connection unequivocally. This is rarely needed and not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" '((erc-select-read-args)) nil) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" t nil) (defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ ERC is a powerful, modular, and extensible IRC client. @@ -10022,7 +10026,7 @@ symbol composed of letters from the Latin alphabet.) This option is generally unneeded, however. See info node `(erc) Connecting' for use cases. Not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls)) (erc-select-read-args))) nil) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" t nil) (autoload 'erc-handle-irc-url "erc" "\ Use ERC to IRC on HOST:PORT in CHANNEL as USER with PASSWORD. If ERC is already connected to HOST:PORT, simply /join CHANNEL. @@ -10238,7 +10242,9 @@ it has to be wrapped in `(eval (quote ...))'. If NAME is already defined as a test and Emacs is running in batch mode, an error is signalled. -(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) +(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) +(function-put 'ert-deftest 'doc-string-elt 3) +(function-put 'ert-deftest 'lisp-indent-function 2) (autoload 'ert-run-tests-batch "ert" "\ Run the tests specified by SELECTOR, printing results to the terminal. @@ -12319,6 +12325,8 @@ evaluate `flymake-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{flymake-mode-map} + (fn &optional ARG)" t nil) (autoload 'flymake-mode-on "flymake" "\ Turn Flymake mode on." nil nil) @@ -15922,7 +15930,8 @@ inlined into the compiled format versions. This means that if you change its definition, you should explicitly call `ibuffer-recompile-formats'. -(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro) +(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t) +(function-put 'define-ibuffer-column 'lisp-indent-function 'defun) (autoload 'define-ibuffer-sorter "ibuf-macs" "\ Define a method of sorting named NAME. DOCUMENTATION is the documentation of the function, which will be called @@ -15933,7 +15942,9 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one buffer object, and `b' bound to another. BODY should return a non-nil value if and only if `a' is \"less than\" `b'. -(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro) +(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t) +(function-put 'define-ibuffer-sorter 'lisp-indent-function 1) +(function-put 'define-ibuffer-sorter 'doc-string-elt 2) (autoload 'define-ibuffer-op "ibuf-macs" "\ Generate a function which operates on a buffer. OP becomes the name of the function; if it doesn't begin with @@ -15972,7 +15983,9 @@ BODY define the operation; they are forms to evaluate per each marked buffer. BODY is evaluated with `buf' bound to the buffer object. -(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro) +(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t) +(function-put 'define-ibuffer-op 'lisp-indent-function 2) +(function-put 'define-ibuffer-op 'doc-string-elt 3) (autoload 'define-ibuffer-filter "ibuf-macs" "\ Define a filter named NAME. DOCUMENTATION is the documentation of the function. @@ -15987,7 +16000,9 @@ not a particular buffer should be displayed or not. The forms in BODY will be evaluated with BUF bound to the buffer object, and QUALIFIER bound to the current value of the filter. -(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro) +(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t) +(function-put 'define-ibuffer-filter 'lisp-indent-function 2) +(function-put 'define-ibuffer-filter 'doc-string-elt 2) (register-definition-prefixes "ibuf-macs" '("ibuffer-")) @@ -25386,6 +25401,8 @@ evaluate `rectangle-mark-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{rectangle-mark-mode-map} + (fn &optional ARG)" t nil) (register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-")) commit 3b5c03eeb2bc559767555fbb5b9916721ce9f853 Author: Po Lu Date: Mon Aug 1 09:56:12 2022 +0800 Make frame synchronization a frame parameter * doc/lispref/frames.texi (Management Parameters): Document `use-frame-synchronization'. * etc/NEWS: Update entry. * src/frame.c (frame_parms): New frame parameter `use-frame-synchronization'. (syms_of_frame): New defsym. * src/haikufns.c (haiku_frame_parm_handlers): * src/nsfns.m (ns_frame_parm_handlers): * src/pgtkfns.c (pgtk_frame_parm_handlers): * src/w32fns.c (w32_frame_parm_handlers): Update frame param handlers correctly. * src/xfns.c (x_set_use_frame_synchronization): New function. (Fx_create_frame): Set default value of said parameter. (x_frame_parm_handlers): Add handler. * src/xterm.c (x_sync_wait_for_frame_drawn_event): Clear parameter if sync fails. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ed56fa777d..e5dec4f807 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2180,10 +2180,20 @@ If non-@code{nil}, the frame is visible on all virtual desktops on systems with virtual desktops. @vindex shaded@r{, a frame parameter} -@item sticky +@item shaded If non-@code{nil}, tell the window manager to display the frame in a way that its contents are hidden, leaving only the title bar. +@vindex use-frame-synchronization@r{, a frame parameter} +@item use-frame-synchronization +If non-@code{nil}, synchronize the frame redisplay with the refresh +rate of the monitor to avoid graphics tearing. At present, this is +only implemented on the X window system inside no-toolkit and X +toolkit builds, does not work correctly with toolkit scroll bars, and +requires a compositing manager supporting the relevant display +synchronization protocols. The @code{synchronizeResize} X resource +must also be set to the string @code{"extended"}. + @vindex inhibit-double-buffering@r{, a frame parameter} @item inhibit-double-buffering If non-@code{nil}, the frame is drawn to the screen without double diff --git a/etc/NEWS b/etc/NEWS index ba05b49176..963aa22c68 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -620,6 +620,9 @@ requires an X compositing manager supporting the extended frame synchronization protocol (see https://fishsoup.net/misc/wm-spec-synchronization.html). +This behavior can be toggled on and off via the frame parameter +'use-frame-synchronization'. + +++ ** New frame parameter 'alpha-background' and X resource "alphaBackground". This controls the opacity of the text background when running on a diff --git a/src/frame.c b/src/frame.c index a39e1c4944..25d71e0769 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3916,9 +3916,10 @@ static const struct frame_parm_table frame_parms[] = {"z-group", SYMBOL_INDEX (Qz_group)}, {"override-redirect", SYMBOL_INDEX (Qoverride_redirect)}, {"no-special-glyphs", SYMBOL_INDEX (Qno_special_glyphs)}, - {"alpha-background", SYMBOL_INDEX (Qalpha_background)}, + {"alpha-background", SYMBOL_INDEX (Qalpha_background)}, + {"use-frame-synchronization", SYMBOL_INDEX (Quse_frame_synchronization)}, #ifdef HAVE_X_WINDOWS - {"shaded", SYMBOL_INDEX (Qshaded)}, + {"shaded", SYMBOL_INDEX (Qshaded)}, #endif #ifdef NS_IMPL_COCOA {"ns-appearance", SYMBOL_INDEX (Qns_appearance)}, @@ -6195,6 +6196,7 @@ syms_of_frame (void) DEFSYM (Qtop_only, "top-only"); DEFSYM (Qiconify_top_level, "iconify-top-level"); DEFSYM (Qmake_invisible, "make-invisible"); + DEFSYM (Quse_frame_synchronization, "use-frame-synchronization"); { int i; diff --git a/src/haikufns.c b/src/haikufns.c index f3667ac2f9..055a33e2c1 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -3128,6 +3128,7 @@ frame_parm_handler haiku_frame_parm_handlers[] = haiku_set_override_redirect, gui_set_no_special_glyphs, gui_set_alpha_background, + NULL, }; void diff --git a/src/nsfns.m b/src/nsfns.m index 433df05961..1d3dcd3124 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1057,6 +1057,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side. 0, /* x_set_override_redirect */ gui_set_no_special_glyphs, gui_set_alpha_background, + NULL, #ifdef NS_IMPL_COCOA ns_set_appearance, ns_set_transparent_titlebar, diff --git a/src/pgtkfns.c b/src/pgtkfns.c index d998c3d938..beaf28f69d 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -991,6 +991,7 @@ frame_parm_handler pgtk_frame_parm_handlers[] = pgtk_set_override_redirect, gui_set_no_special_glyphs, pgtk_set_alpha_background, + NULL, }; diff --git a/src/w32fns.c b/src/w32fns.c index 5e42a1df6f..28d13a68d4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10508,6 +10508,7 @@ frame_parm_handler w32_frame_parm_handlers[] = 0, /* x_set_override_redirect */ gui_set_no_special_glyphs, gui_set_alpha_background, + 0, /* x_set_use_frame_synchronization */ }; void diff --git a/src/xfns.c b/src/xfns.c index 1ae615fad4..c149eaeca3 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2431,6 +2431,28 @@ x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval) } } +static void +x_set_use_frame_synchronization (struct frame *f, Lisp_Object arg, + Lisp_Object oldval) +{ +#if !defined USE_GTK && defined HAVE_XSYNC + struct x_display_info *dpyinfo; + + dpyinfo = FRAME_DISPLAY_INFO (f); + + if (!NILP (arg) && FRAME_X_EXTENDED_COUNTER (f)) + FRAME_X_OUTPUT (f)->use_vsync_p + = x_wm_supports (f, dpyinfo->Xatom_net_wm_frame_drawn); + else + FRAME_X_OUTPUT (f)->use_vsync_p = false; + + store_frame_param (f, Quse_frame_synchronization, + FRAME_X_OUTPUT (f)->use_vsync_p ? Qt : Qnil); +#else + store_frame_param (f, Quse_frame_synchronization, Qnil); +#endif +} + /* Record in frame F the specified or default value according to ALIST of the parameter named PROP (a Lisp symbol). If no value is @@ -5150,17 +5172,15 @@ This function is an internal primitive--use `make-frame' instead. */) ((STRINGP (value) && !strcmp (SSDATA (value), "extended")) ? 2 : 1)); #endif - -#ifndef USE_GTK - if (FRAME_X_EXTENDED_COUNTER (f)) - FRAME_X_OUTPUT (f)->use_vsync_p - = x_wm_supports (f, dpyinfo->Xatom_net_wm_frame_drawn); -#endif } #endif unblock_input (); + /* Set whether or not frame synchronization is enabled. */ + gui_default_parameter (f, parms, Quse_frame_synchronization, Qt, + NULL, NULL, RES_TYPE_BOOLEAN); + /* Works iff frame has been already mapped. */ gui_default_parameter (f, parms, Qskip_taskbar, Qnil, NULL, NULL, RES_TYPE_BOOLEAN); @@ -9775,6 +9795,7 @@ frame_parm_handler x_frame_parm_handlers[] = x_set_override_redirect, gui_set_no_special_glyphs, x_set_alpha_background, + x_set_use_frame_synchronization, x_set_shaded, }; diff --git a/src/xterm.c b/src/xterm.c index d7d4cb418f..986973eb78 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6689,6 +6689,9 @@ x_sync_wait_for_frame_drawn_event (struct frame *f) fprintf (stderr, "Warning: compositing manager spent more than 1 second " "drawing a frame. Frame synchronization has been disabled\n"); FRAME_X_OUTPUT (f)->use_vsync_p = false; + + /* Also change the frame parameter to reflect the new state. */ + store_frame_param (f, Quse_frame_synchronization, Qnil); } FRAME_X_WAITING_FOR_DRAW (f) = false; commit eef591072ab1cbcf2168d7b30b3e1ca1f50717ad Author: Lars Ingebrigtsen Date: Sun Jul 31 20:00:25 2022 +0200 Regenerate ldefs-boot.el diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index dfbdf401dc..6574badf2d 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1463,6 +1463,15 @@ key2: value2 ;;; Generated autoloads from cedet/ede/auto.el +(autoload 'ede-add-project-autoload "ede/auto" "\ +Add PROJAUTO, an EDE autoload definition to `ede-project-class-files'. +Optional argument FLAG indicates how this autoload should be +added. Possible values are: + `generic' - A generic project type. Keep this at the very end. + `unique' - A unique project type for a specific project. Keep at the very + front of the list so more generic projects don't get priority. + +(fn PROJAUTO &optional FLAG)" nil nil) (register-definition-prefixes "ede/auto" '("ede-")) @@ -1874,7 +1883,7 @@ The return value is the value of the final form in BODY. ;;; Generated autoloads from textmodes/bib-mode.el -(register-definition-prefixes "bib-mode" '("addbib" "bib-" "mark-bib" "return-key-bib" "unread-bib")) +(register-definition-prefixes "bib-mode" '("bib-")) ;;; Generated autoloads from textmodes/bibtex.el @@ -2652,7 +2661,7 @@ User can move with [up] or [down], select a buffer by \\[bs-select] or [SPC] Type \\[bs-kill] to leave Buffer Selection Menu without a selection. -Type \\[bs-help] after invocation to get help on commands available. +Type \\[describe-mode] after invocation to get help on commands available. With prefix argument ARG show a different buffer list. Function `bs--configuration-name-for-prefix-arg' determine accordingly name of buffer configuration. @@ -4954,7 +4963,7 @@ You might also use mode hooks to specify it in certain modes, like this: It's often useful to leave a space at the end of the value.") (custom-autoload 'compile-command "compile" t) -(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) +(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (if (boundp 'compilation-read-command) compilation-read-command t)))) (defvar compilation-disable-input nil "\ If non-nil, send end-of-file as compilation process input. This only affects platforms that support asynchronous processes (see @@ -4990,6 +4999,10 @@ the function in `compilation-buffer-name-function', so you can set that to a function that generates a unique name. (fn COMMAND &optional COMINT)" t nil) +(autoload 'compilation--default-buffer-name "compile" "\ + + +(fn NAME-OF-MODE)" nil nil) (autoload 'compilation-start "compile" "\ Run compilation command COMMAND (low level interface). If COMMAND starts with a cd command, that becomes the `default-directory'. @@ -5051,8 +5064,6 @@ evaluate `compilation-shell-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{compilation-shell-minor-mode-map} - (fn &optional ARG)" t nil) (autoload 'compilation-minor-mode "compile" "\ Toggle Compilation minor mode. @@ -5076,8 +5087,6 @@ evaluate `compilation-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{compilation-minor-mode-map} - (fn &optional ARG)" t nil) (autoload 'compilation-next-error-function "compile" "\ Advance to the next error message and visit the file where the error was. @@ -6072,6 +6081,22 @@ Otherwise the menu will be named `Customize'. The format is suitable for use with `easy-menu-define'. (fn SYMBOL &optional NAME)" nil nil) +(autoload 'customize-icon "cus-edit" "\ +Customize ICON. + +(fn ICON)" t nil) +(autoload 'custom-set-icons "cus-edit" "\ +Install user customizations of icon specs specified in ARGS. +These settings are registered as theme `user'. +The arguments should each be a list of the form: + + (SYMBOL EXP) + +This stores EXP (without evaluating it) as the saved spec for SYMBOL. + +(fn &rest ARGS)" nil nil) +(autoload 'custom-save-icons "cus-edit" "\ +Save all customized icons in `custom-file'." nil nil) (register-definition-prefixes "cus-edit" '("Custom-" "cus" "widget-")) @@ -7090,7 +7115,7 @@ protocol defined in RFC 2229. This is a quick reference to this mode describing the default key bindings: \\ * \\[dictionary-close] close the dictionary buffer -* \\[dictionary-help] display this help information +* \\[describe-mode] display this help information * \\[dictionary-search] ask for a new word to search * \\[dictionary-lookup-definition] search the word at point * \\[forward-button] or TAB place point to the next link @@ -7100,7 +7125,7 @@ This is a quick reference to this mode describing the default key bindings: * \\[dictionary-select-dictionary] select the default dictionary * \\[dictionary-select-strategy] select the default search strategy -* RET or visit that link" nil nil) +* \\`RET' or \\`' visit that link" nil nil) (autoload 'dictionary "dictionary" "\ Create a new dictionary buffer and install `dictionary-mode'." t nil) (autoload 'dictionary-search "dictionary" "\ @@ -8413,7 +8438,7 @@ A second call of this function without changing point inserts the next match. A call with prefix PREFIX reads the symbol to insert from the minibuffer with completion. -(fn PREFIX)" t nil) +(fn PREFIX)" '("P") nil) (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ Repeat last operation on files in tree. FIRST-TIME non-nil means this is not a repetition, but the first time. @@ -9060,6 +9085,18 @@ BUFFER is put back into its original major mode. ;;; Generated autoloads from emacs-lisp/eieio.el (push (purecopy '(eieio 1 4)) package--builtin-versions) +(autoload 'make-instance "eieio" "\ +Make a new instance of CLASS based on INITARGS. +For example: + + (make-instance \\='foo) + +INITARGS is a property list with keywords based on the `:initarg' +for each slot. For example: + + (make-instance \\='foo :slot1 value1 :slotN valueN) + +(fn CLASS &rest INITARGS)" nil nil) (register-definition-prefixes "eieio" '("child-of-class-p" "defclass" "eieio-" "find-class" "obj" "oref" "oset" "same-class-p" "set-slot-value" "slot-" "with-slots")) @@ -9132,7 +9169,7 @@ Describe CTR if it is a class constructor. ;;; Generated autoloads from emacs-lisp/eldoc.el -(push (purecopy '(eldoc 1 12 0)) package--builtin-versions) +(push (purecopy '(eldoc 1 13 0)) package--builtin-versions) ;;; Generated autoloads from elec-pair.el @@ -9938,7 +9975,7 @@ When present, ID should be an opaque object used to identify the connection unequivocally. This is rarely needed and not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" t nil) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" '((erc-select-read-args)) nil) (defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ ERC is a powerful, modular, and extensible IRC client. @@ -9985,7 +10022,7 @@ symbol composed of letters from the Latin alphabet.) This option is generally unneeded, however. See info node `(erc) Connecting' for use cases. Not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" t nil) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls)) (erc-select-read-args))) nil) (autoload 'erc-handle-irc-url "erc" "\ Use ERC to IRC on HOST:PORT in CHANNEL as USER with PASSWORD. If ERC is already connected to HOST:PORT, simply /join CHANNEL. @@ -10201,9 +10238,7 @@ it has to be wrapped in `(eval (quote ...))'. If NAME is already defined as a test and Emacs is running in batch mode, an error is signalled. -(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) -(function-put 'ert-deftest 'doc-string-elt 3) -(function-put 'ert-deftest 'lisp-indent-function 2) +(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) (autoload 'ert-run-tests-batch "ert" "\ Run the tests specified by SELECTOR, printing results to the terminal. @@ -11328,7 +11363,7 @@ used to invoke the command, with all modifiers removed: After adjusting, further adjust the font size as long as the key, with all modifiers removed, is one of the above characters. -Buffer-local face adjustements have higher priority than global +Buffer-local face adjustments have higher priority than global face adjustments. The variable `global-text-scale-adjust-resizes-frames' controls @@ -11505,7 +11540,7 @@ reminders, you can set `feedmail-queue-reminder-alist' to nil. ;;; Generated autoloads from ffap.el -(defvar ffap-file-finder 'find-file "\ +(defvar ffap-file-finder #'find-file "\ The command called by `find-file-at-point' to find a file.") (custom-autoload 'ffap-file-finder "ffap" t) (autoload 'ffap-next "ffap" "\ @@ -11528,7 +11563,7 @@ Find FILENAME, guessing a default from text around point. If `ffap-url-regexp' is not nil, the FILENAME may also be an URL. With a prefix, this command behaves exactly like `ffap-file-finder'. If `ffap-require-prefix' is set, the prefix meaning is reversed. -See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt', +See also the variables `ffap-dired-wildcards', `ffap-url-unwrap-local', `ffap-url-unwrap-remote', `ffap-file-name-with-spaces', and the functions `ffap-file-at-point' and `ffap-url-at-point'. @@ -12284,8 +12319,6 @@ evaluate `flymake-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{flymake-mode-map} - (fn &optional ARG)" t nil) (autoload 'flymake-mode-on "flymake" "\ Turn Flymake mode on." nil nil) @@ -14166,6 +14199,33 @@ retrieval failed. (defvar grep-window-height nil "\ Number of lines in a grep window. If nil, use `compilation-window-height'.") (custom-autoload 'grep-window-height "grep" t) +(defvar grep-highlight-matches 'auto-detect "\ +Use special markers to highlight grep matches. + +Some grep programs are able to surround matches with special +markers in grep output. Such markers can be used to highlight +matches in grep mode. This requires `font-lock-mode' to be active +in grep buffers, so if you have globally disabled `font-lock-mode', +you will not get highlighting. + +This option sets the environment variable GREP_COLORS to specify +markers for highlighting and adds the --color option in front of +any explicit grep options before starting the grep. + +When this option is `auto', grep uses `--color=auto' to highlight +matches only when it outputs to a terminal (when `grep' is the last +command in the pipe), thus avoiding the use of any potentially-harmful +escape sequences when standard output goes to a file or pipe. + +To make grep highlight matches even into a pipe, you need the option +`always' that forces grep to use `--color=always' to unconditionally +output escape sequences. + +If the value is `auto-detect' (the default), `grep' will call +`grep-compute-defaults' to compute the value. To change the +default value, use \\[customize] or call the function +`grep-apply-setting'.") +(custom-autoload 'grep-highlight-matches "grep" nil) (defvar grep-command nil "\ The default grep command for \\[grep]. If the grep program used supports an option to always include file names @@ -14190,6 +14250,8 @@ for easier editing.") (defvar grep-setup-hook nil "\ List of hook functions run by `grep-process-setup' (see `run-hooks').") (custom-autoload 'grep-setup-hook "grep" t) +(defvar grep-match-face 'match "\ +Face name to use for grep matches.") (defconst grep-regexp-alist `((,(concat "^\\(?:" "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):" "\\|" "\\(?1:" "\\(?:[a-zA-Z]:\\)?" "[^\n:]+?[^\n/:]\\):[\11 ]*\\(?2:[1-9][0-9]*\\)[\11 ]*:" "\\)") 1 2 (,(lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) \, (lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg 1)))))) nil nil (3 '(face nil display ":"))) ("^Binary file \\(.+\\) matches" 1 nil nil 0 1)) "\ Regexp used to match grep hits. See `compilation-error-regexp-alist' for format details.") @@ -14981,7 +15043,7 @@ See `help-make-xrefs'. Add xrefs for symbols in `pp's output between FROM and TO. (fn FROM TO)" nil nil) -(define-obsolete-function-alias 'help-xref-interned 'describe-symbol "25.1") +(define-obsolete-function-alias 'help-xref-interned #'describe-symbol "25.1") (autoload 'help-bookmark-jump "help-mode" "\ Jump to `help-mode' bookmark BOOKMARK. Handler function for record returned by `help-bookmark-make-record'. @@ -15860,8 +15922,7 @@ inlined into the compiled format versions. This means that if you change its definition, you should explicitly call `ibuffer-recompile-formats'. -(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil t) -(function-put 'define-ibuffer-column 'lisp-indent-function 'defun) +(fn SYMBOL (&key NAME INLINE PROPS SUMMARIZER) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-sorter "ibuf-macs" "\ Define a method of sorting named NAME. DOCUMENTATION is the documentation of the function, which will be called @@ -15872,9 +15933,7 @@ For sorting, the forms in BODY will be evaluated with `a' bound to one buffer object, and `b' bound to another. BODY should return a non-nil value if and only if `a' is \"less than\" `b'. -(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil t) -(function-put 'define-ibuffer-sorter 'lisp-indent-function 1) -(function-put 'define-ibuffer-sorter 'doc-string-elt 2) +(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-op "ibuf-macs" "\ Generate a function which operates on a buffer. OP becomes the name of the function; if it doesn't begin with @@ -15913,9 +15972,7 @@ BODY define the operation; they are forms to evaluate per each marked buffer. BODY is evaluated with `buf' bound to the buffer object. -(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil t) -(function-put 'define-ibuffer-op 'lisp-indent-function 2) -(function-put 'define-ibuffer-op 'doc-string-elt 3) +(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING BEFORE AFTER COMPLEX) &rest BODY)" nil 'macro) (autoload 'define-ibuffer-filter "ibuf-macs" "\ Define a filter named NAME. DOCUMENTATION is the documentation of the function. @@ -15930,9 +15987,7 @@ not a particular buffer should be displayed or not. The forms in BODY will be evaluated with BUF bound to the buffer object, and QUALIFIER bound to the current value of the filter. -(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil t) -(function-put 'define-ibuffer-filter 'lisp-indent-function 2) -(function-put 'define-ibuffer-filter 'doc-string-elt 2) +(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil 'macro) (register-definition-prefixes "ibuf-macs" '("ibuffer-")) @@ -16202,6 +16257,15 @@ with no args, if that value is non-nil. (fn)" t nil) (register-definition-prefixes "icon" '("beginning-of-icon-defun" "calculate-icon-indent" "electric-icon-brace" "end-of-icon-defun" "icon-" "indent-icon-exp" "mark-icon-function")) + +;;; Generated autoloads from emacs-lisp/icons.el + +(autoload 'describe-icon "icons" "\ +Pop to a buffer to describe ICON. + +(fn ICON)" t nil) +(register-definition-prefixes "icons" '("button" "define-icon" "icon")) + ;;; Generated autoloads from cedet/semantic/idle.el @@ -17271,7 +17335,7 @@ Convert old Emacs Devanagari characters to UCS. ;;; Generated autoloads from leim/quail/indian.el -(register-definition-prefixes "quail/indian" '("indian-mlm-mozhi-u" "inscript-" "quail-")) +(register-definition-prefixes "quail/indian" '("indian-mlm-mozhi-u" "inscript-" "quail-" "tamil-")) ;;; Generated autoloads from progmodes/inf-lisp.el @@ -18337,6 +18401,13 @@ KEYS should be a vector or a string that obeys `key-valid-p'. (fn MAC &optional COUNTER FORMAT)" nil nil) (make-obsolete 'kmacro-lambda-form 'kmacro "29.1") +(autoload 'kmacro-name-last-macro "kmacro" "\ +Assign a name to the last keyboard macro defined. +Argument SYMBOL is the name to define. +The symbol's function definition becomes the keyboard macro string. +Such a \"function\" cannot be called from Lisp, but it is a valid editor command. + +(fn SYMBOL)" t nil) (register-definition-prefixes "kmacro" '("kmacro-")) @@ -18767,41 +18838,6 @@ Major mode for browsing CVS log output. (fn)" t nil) (register-definition-prefixes "log-view" '("log-view-")) - -;;; Generated autoloads from longlines.el - -(autoload 'longlines-mode "longlines" "\ -Toggle Long Lines mode in this buffer. - -When Long Lines mode is enabled, long lines are wrapped if they -extend beyond `fill-column'. The soft newlines used for line -wrapping will not show up when the text is yanked or saved to -disk. - -If the variable `longlines-auto-wrap' is non-nil, lines are -automatically wrapped whenever the buffer is changed. You can -always call `fill-paragraph' to fill individual paragraphs. - -If the variable `longlines-show-hard-newlines' is non-nil, hard -newlines are indicated with a symbol. - -This is a minor mode. If called interactively, toggle the -`Longlines mode' mode. If the prefix argument is positive, -enable the mode, and if it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `longlines-mode'. - -The mode's hook is called both when the mode is enabled and when -it is disabled. - -(fn &optional ARG)" t nil) -(register-definition-prefixes "longlines" '("longlines-")) - ;;; Generated autoloads from lpr.el @@ -20095,6 +20131,14 @@ Duplicate the current line N times. Interactively, N is the prefix numeric argument, and defaults to 1. Also see the `copy-from-above-command' command. +(fn &optional N)" t nil) +(autoload 'duplicate-dwim "misc" "\ +Duplicate the current line or region N times. +If the region is inactive, duplicate the current line (like `duplicate-line'). +Otherwise, duplicate the region, which remains active afterwards. +If the region is rectangular, duplicate on its right-hand side. +Interactively, N is the prefix numeric argument, and defaults to 1. + (fn &optional N)" t nil) (autoload 'zap-up-to-char "misc" "\ Kill up to, but not including ARGth occurrence of CHAR. @@ -22790,15 +22834,17 @@ call (package-activate-all) in your init-file.") Directory containing the user's Emacs Lisp packages. The directory name should be absolute. Apart from this directory, Emacs also looks for system-wide -packages in `package-directory-list'." :type 'directory :initialize #'custom-initialize-delay :risky t :version "24.1") +packages in `package-directory-list'." :type 'directory :initialize #'custom-initialize-delay :risky t :group 'applications :version "24.1") (custom-autoload 'package-user-dir "package" t) (defcustom package-directory-list (let (result) (dolist (f load-path) (and (stringp f) (equal (file-name-nondirectory f) "site-lisp") (push (expand-file-name "elpa" f) result))) (nreverse result)) "\ List of additional directories containing Emacs Lisp packages. Each directory name should be absolute. These directories contain packages intended for system-wide; in -contrast, `package-user-dir' contains packages for personal use." :type '(repeat directory) :initialize #'custom-initialize-delay :risky t :version "24.1") +contrast, `package-user-dir' contains packages for personal use." :type '(repeat directory) :initialize #'custom-initialize-delay :group 'applications :risky t :version "24.1") (custom-autoload 'package-directory-list "package" t) +(defvar package-activated-list nil "\ +List of the names of currently activated packages.") (defvar package--activated nil "\ Non-nil if `package-activate-all' has been run.") (autoload 'package-initialize "package" "\ @@ -22821,6 +22867,7 @@ that code in the early init-file. (defun package-activate-all nil "\ Activate all installed packages. The variable `package-load-list' controls which packages to load." (setq package--activated t) (let* ((elc (concat package-quickstart-file "c")) (qs (if (file-readable-p elc) elc (if (file-readable-p package-quickstart-file) package-quickstart-file)))) (if (and qs (not (bound-and-true-p package-activated-list))) (let ((load-source-file-function nil)) (unless (boundp 'package-activated-list) (setq package-activated-list nil)) (load qs nil 'nomessage)) (require 'package) (package--activate-all)))) +(autoload 'package--activate-all "package" nil nil nil) (autoload 'package-import-keyring "package" "\ Import keys from FILE. @@ -22938,7 +22985,7 @@ It works in more cases if the call is in the file which contains the `Version:' header." nil nil) (function-put 'package-get-version 'pure 't) (defcustom package-quickstart-file (locate-user-emacs-file "package-quickstart.el") "\ -Location of the file used to speed up activation of packages at startup." :type 'file :initialize #'custom-initialize-delay :version "27.1") +Location of the file used to speed up activation of packages at startup." :type 'file :group 'applications :initialize #'custom-initialize-delay :version "27.1") (custom-autoload 'package-quickstart-file "package" t) (register-definition-prefixes "package" '("bad-signature" "define-package" "describe-package-1" "package-")) @@ -24551,11 +24598,6 @@ The default value is (\"/usr/local/share/emacs/fonts/bdf\").") (custom-autoload 'bdf-directory-list "ps-bdf" t) (register-definition-prefixes "ps-bdf" '("bdf-")) - -;;; Generated autoloads from ps-def.el - -(register-definition-prefixes "ps-def" '("ps-")) - ;;; Generated autoloads from progmodes/ps-mode.el @@ -25072,64 +25114,6 @@ of each directory. (fn DIRNAME &rest DIRNAMES)" t nil) (register-definition-prefixes "quail" '("quail-")) - -;;; Generated autoloads from net/quickurl.el - -(defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'write-file-functions (lambda () (quickurl-read) nil) nil t))\n;; End:\n" "\ -Example `quickurl-postfix' text that adds a local variable to the -`quickurl-url-file' so that if you edit it by hand it will ensure that -`quickurl-urls' is updated with the new URL list. - -To make use of this do something like: - - (setq quickurl-postfix quickurl-reread-hook-postfix) - -in your init file (after loading/requiring quickurl).") -(autoload 'quickurl "quickurl" "\ -Insert a URL based on LOOKUP. - -If not supplied LOOKUP is taken to be the word at point in the current -buffer, this default action can be modified via -`quickurl-grab-lookup-function'. - -(fn &optional LOOKUP)" t nil) -(autoload 'quickurl-ask "quickurl" "\ -Insert a URL, with `completing-read' prompt, based on LOOKUP. - -(fn LOOKUP)" t nil) -(autoload 'quickurl-add-url "quickurl" "\ -Allow the user to interactively add a new URL associated with WORD. - -See `quickurl-grab-url' for details on how the default word/URL combination -is decided. - -(fn WORD URL COMMENT)" t nil) -(autoload 'quickurl-browse-url "quickurl" "\ -Browse the URL associated with LOOKUP. - -If not supplied LOOKUP is taken to be the word at point in the -current buffer, this default action can be modified via -`quickurl-grab-lookup-function'. - -(fn &optional LOOKUP)" t nil) -(autoload 'quickurl-browse-url-ask "quickurl" "\ -Browse the URL, with `completing-read' prompt, associated with LOOKUP. - -(fn LOOKUP)" t nil) -(autoload 'quickurl-edit-urls "quickurl" "\ -Pull `quickurl-url-file' into a buffer for hand editing." t nil) -(autoload 'quickurl-list-mode "quickurl" "\ -A mode for browsing the quickurl URL list. - -The key bindings for `quickurl-list-mode' are: - -\\{quickurl-list-mode-map} - -(fn)" t nil) -(autoload 'quickurl-list "quickurl" "\ -Display `quickurl-list' as a formatted list using `quickurl-list-mode'." t nil) -(register-definition-prefixes "quickurl" '("quickurl-")) - ;;; Generated autoloads from emacs-lisp/radix-tree.el @@ -25402,8 +25386,6 @@ evaluate `rectangle-mark-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. -\\{rectangle-mark-mode-map} - (fn &optional ARG)" t nil) (register-definition-prefixes "rect" '("apply-on-rectangle" "clear-rectangle-line" "delete-" "extract-rectangle-" "killed-rectangle" "ope" "rectangle-" "spaces-string" "string-rectangle-")) @@ -26759,9 +26741,13 @@ following constructs: (backref REF) matches whatever the submatch REF matched. REF can be a number, as usual, or a name introduced by a previous (let REF ...) - construct." (let* ((rx--pcase-vars nil) (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps))))) `(and (pred stringp) ,(pcase (length rx--pcase-vars) (0 `(pred (string-match ,regexp))) (1 `(app (lambda (s) (if (string-match ,regexp s) (match-string 1 s) 0)) (and ,(car rx--pcase-vars) (pred (not numberp))))) (nvars `(app (lambda (s) (and (string-match ,regexp s) ,(rx--reduce-right (lambda (a b) `(cons ,a ,b)) (mapcar (lambda (i) `(match-string ,i s)) (number-sequence 1 nvars))))) ,(list '\` (rx--reduce-right #'cons (mapcar (lambda (name) (list '\, name)) (reverse rx--pcase-vars))))))))))) + construct." (rx--pcase-expand regexps))) (define-symbol-prop 'rx--pcase-macroexpander 'edebug-form-spec 'nil) (define-symbol-prop 'rx 'pcase-macroexpander #'rx--pcase-macroexpander) +(autoload 'rx--pcase-expand "rx" "\ + + +(fn REGEXPS)" nil nil) (register-definition-prefixes "rx" '("rx-")) @@ -27288,6 +27274,11 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and `mail-mode-hook' (in that order). (fn)" t nil) +(autoload 'mail-send-and-exit "sendmail" "\ +Send message like `mail-send', then, if no errors, exit from mail buffer. +Prefix arg means don't delete this window. + +(fn &optional ARG)" t nil) (defvar mail-mailing-lists nil "\ List of mailing list addresses the user is subscribed to. The variable is used to trigger insertion of the \"Mail-Followup-To\" @@ -29368,7 +29359,10 @@ Studlify-case the current buffer." t nil) ;;; Generated autoloads from emacs-lisp/subr-x.el (autoload 'string-truncate-left "subr-x" "\ -Truncate STRING to LENGTH, replacing initial surplus with \"...\". +If STRING is longer than LENGTH, return a truncated version. +When truncating, \"...\" is always prepended to the string, so +the resulting string may be longer than the original if LENGTH is +3 or smaller. (fn STRING LENGTH)" nil nil) (autoload 'string-clean-whitespace "subr-x" "\ @@ -31741,6 +31735,15 @@ Regular expression matching file names handled by Tramp autoload. It must match the initial `tramp-syntax' settings. It should not match file names at root of the underlying local file system, like \"/sys\" or \"/C:\".") +(defvar tramp-foreign-file-name-handler-alist nil "\ +Alist of elements (FUNCTION . HANDLER) for foreign methods handled specially. +If (FUNCTION FILENAME) returns non-nil, then all I/O on that file is done by +calling HANDLER.") +(autoload 'tramp-file-name-handler "tramp" "\ +Invoke Tramp file name handler for OPERATION and ARGS. +Fall back to normal file name handler if no Tramp file name handler exists. + +(fn OPERATION &rest ARGS)" nil nil) (defun tramp-autoload-file-name-handler (operation &rest args) "\ Load Tramp file name handler, and perform OPERATION." (tramp-unload-file-name-handlers) (when tramp-mode (let ((default-directory temporary-file-directory)) (when (bound-and-true-p tramp-archive-autoload) (load "tramp-archive" 'noerror 'nomessage)) (load "tramp" 'noerror 'nomessage))) (apply operation args)) (defun tramp-register-autoload-file-name-handlers nil "\ @@ -31770,6 +31773,12 @@ List of suffixes which indicate a compressed file. It must be supported by libarchive(3).") (defmacro tramp-archive-autoload-file-name-regexp nil "\ Regular expression matching archive file names." '(concat "\\`" "\\(" ".+" "\\." (regexp-opt tramp-archive-suffixes) "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*" "\\)" "\\(" "/" ".*" "\\)" "\\'")) +(autoload 'tramp-archive-file-name-handler "tramp-archive" "\ +Invoke the file archive related OPERATION. +First arg specifies the OPERATION, second arg ARGS is a list of +arguments to pass to the OPERATION. + +(fn OPERATION &rest ARGS)" nil nil) (defun tramp-archive-autoload-file-name-handler (operation &rest args) "\ Load Tramp archive file name handler, and perform OPERATION." (defvar tramp-archive-autoload) (let ((default-directory temporary-file-directory) (tramp-archive-autoload tramp-archive-enabled)) (apply #'tramp-autoload-file-name-handler operation args))) (defun tramp-register-archive-file-name-handler nil "\ @@ -31857,6 +31866,48 @@ Add archive file name handler to `file-name-handler-alist'." (when (and tramp-ar ;;; Generated autoloads from transient.el +(autoload 'transient-define-prefix "transient" "\ +Define NAME as a transient prefix command. + +ARGLIST are the arguments that command takes. +DOCSTRING is the documentation string and is optional. + +These arguments can optionally be followed by key-value pairs. +Each key has to be a keyword symbol, either `:class' or a keyword +argument supported by the constructor of that class. The +`transient-prefix' class is used if the class is not specified +explicitly. + +GROUPs add key bindings for infix and suffix commands and specify +how these bindings are presented in the popup buffer. At least +one GROUP has to be specified. See info node `(transient)Binding +Suffix and Infix Commands'. + +The BODY is optional. If it is omitted, then ARGLIST is also +ignored and the function definition becomes: + + (lambda () + (interactive) + (transient-setup \\='NAME)) + +If BODY is specified, then it must begin with an `interactive' +form that matches ARGLIST, and it must call `transient-setup'. +It may however call that function only when some condition is +satisfied; that is one of the reason why you might want to use +an explicit BODY. + +All transients have a (possibly nil) value, which is exported +when suffix commands are called, so that they can consume that +value. For some transients it might be necessary to have a sort +of secondary value, called a scope. Such a scope would usually +be set in the commands `interactive' form and has to be passed +to the setup function: + + (transient-setup \\='NAME nil nil :scope SCOPE) + +(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]... GROUP... [BODY...])" nil t) +(function-put 'transient-define-prefix 'lisp-indent-function 'defun) +(function-put 'transient-define-prefix 'doc-string-elt 3) (autoload 'transient-insert-suffix "transient" "\ Insert a SUFFIX into PREFIX before LOC. PREFIX is a prefix command, a symbol. @@ -34544,7 +34595,7 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'." t nil) ;;; Generated autoloads from emulation/viper-keym.el -(register-definition-prefixes "viper-keym" '("ex-read-filename-map" "viper-")) +(register-definition-prefixes "viper-keym" '("viper-")) ;;; Generated autoloads from emulation/viper-macs.el @@ -34668,7 +34719,7 @@ this is equivalent to `display-warning', using `emacs' as the type and `:warning' as the level. (fn MESSAGE &rest ARGS)" nil nil) -(register-definition-prefixes "warnings" '("warning-")) +(register-definition-prefixes "warnings" '("warning")) ;;; Generated autoloads from wdired.el @@ -35613,7 +35664,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT. ;;; Generated autoloads from progmodes/xref.el -(push (purecopy '(xref 1 4 1)) package--builtin-versions) +(push (purecopy '(xref 1 5 0)) package--builtin-versions) (autoload 'xref-find-backend "xref" nil nil nil) (define-obsolete-function-alias 'xref-pop-marker-stack #'xref-go-back "29.1") (autoload 'xref-go-back "xref" "\ commit 6ef058cec2331e5135ce8e4c73983dec695afa15 Author: Lars Ingebrigtsen Date: Sun Jul 31 19:57:55 2022 +0200 Allow specifying that loaddefs files shouldn't not be compiled * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Allow specifying that we shouldn't include a no-compile cookie (bug#53024). diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 261e44aece..36b0b1e9cd 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -459,7 +459,7 @@ don't include." (push name prefs))))) (loaddefs-generate--make-prefixes prefs load-name))) -(defun loaddefs-generate--rubric (file &optional type feature) +(defun loaddefs-generate--rubric (file &optional type feature compile) "Return a string giving the appropriate autoload rubric for FILE. TYPE (default \"autoloads\") is a string stating the type of information contained in FILE. TYPE \"package\" acts like the default, @@ -467,7 +467,9 @@ but adds an extra line to the output to modify `load-path'. If FEATURE is non-nil, FILE will provide a feature. FEATURE may be a string naming the feature, otherwise it will be based on -FILE's name." +FILE's name. + +If COMPILE, don't include a \"don't compile\" cookie." (let ((lp (and (equal type "package") (setq type "autoloads")))) (with-temp-buffer (generate-lisp-file-heading @@ -481,6 +483,7 @@ FILE's name." (insert " \n;;; End of scraped data\n\n") (generate-lisp-file-trailer file :provide (and (stringp feature) feature) + :compile compile :inhibit-provide (not feature)) (buffer-string)))) commit f5cd6b730dd04390fcbcfe45f7462026f16ae78e Author: Mattias Engdegård Date: Sun Jul 31 15:45:16 2022 +0200 Declare `key-valid-p` and `readablep` as error-free * lisp/keymap.el (key-valid-p): * lisp/subr.el (readablep): These functions are effect-free; declare them correspondingly. Note that readablep is not pure since its return value depends on ambient state. diff --git a/lisp/keymap.el b/lisp/keymap.el index ad7d4fbbba..376a30f106 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -313,7 +313,7 @@ Modifiers have to be specified in this order: which is Alt-Control-Hyper-Meta-Shift-super" - (declare (pure t) (side-effect-free t)) + (declare (pure t) (side-effect-free error-free)) (let ((case-fold-search nil)) (and (stringp keys) diff --git a/lisp/subr.el b/lisp/subr.el index 1a16d78117..ff82d0d1d8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6820,7 +6820,7 @@ This means that OBJECT can be printed out and then read back again by the Lisp reader. This function returns nil if OBJECT is unreadable, and the printed representation (from `prin1') of OBJECT if it is readable." - (declare (side-effect-free t)) + (declare (side-effect-free error-free)) (catch 'unreadable (let ((print-unreadable-function (lambda (_object _escape) commit b2fb73db2fec999c7b6aaf6d287674dc71b05e5e Author: Stefan Kangas Date: Sun Jul 31 18:19:06 2022 +0200 Make ps-def.el obsolete (part 2/2) * lisp/obsolete/ps-def.el: Add "Obsolete-since". * lisp/ps-print.el (ps-def): Don't require. diff --git a/lisp/obsolete/ps-def.el b/lisp/obsolete/ps-def.el index ed4cd7b248..0f7f7609ca 100644 --- a/lisp/obsolete/ps-def.el +++ b/lisp/obsolete/ps-def.el @@ -7,6 +7,7 @@ ;; Keywords: wp, print, PostScript ;; URL: https://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre ;; Package: ps-print +;; Obsolete-since: 29.1 ;; This file is part of GNU Emacs. diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 4a7e5bbd3d..2d6c4542cc 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1450,12 +1450,8 @@ Please send all bug fixes and enhancements to ;;; Code: - (require 'lpr) -;; Load Emacs definitions -(require 'ps-def) - ;; autoloads for secondary file (require 'ps-print-loaddefs) commit 2276f51ff5d44df1a89c3ba401f2d09005374fa3 Author: Stefan Kangas Date: Sun Jul 31 18:16:45 2022 +0200 Make ps-def.el obsolete (part 1/2) This file was created to maintain Emacs/XEmacs compat code more easily, and no longer serves any purpose. It currently contains only obsolete function and variable aliases. * lisp/ps-def.el: Move from here... * lisp/obsolete/ps-def.el: ...to here. diff --git a/lisp/ps-def.el b/lisp/obsolete/ps-def.el similarity index 100% rename from lisp/ps-def.el rename to lisp/obsolete/ps-def.el commit 95f987cbd5eb54e9a497fefe1fe34f6c06801e2f Author: Lars Ingebrigtsen Date: Sun Jul 31 18:16:54 2022 +0200 Don't make a custom-save-icons section if there's nothing to save * lisp/cus-edit.el (custom-save-icons): Only make an entry when there's something to save (bug#56860). Also autoload. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 1012d08ab5..edc09f3199 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -5543,6 +5543,7 @@ See `define-icon' for details." (pcase-dolist (`(,icon ,spec) specs) (custom-push-theme 'theme-icon icon theme 'set spec))) +;;;###autoload (defun custom-set-icons (&rest args) "Install user customizations of icon specs specified in ARGS. These settings are registered as theme `user'. @@ -5556,27 +5557,28 @@ This stores EXP (without evaluating it) as the saved spec for SYMBOL." ;;;###autoload (defun custom-save-icons () "Save all customized icons in `custom-file'." - (save-excursion - (custom-save-delete 'custom-set-icons) - (let ((values nil)) - (mapatoms - (lambda (symbol) - (let ((value (car-safe (get symbol 'theme-icon)))) - (when (eq (car value) 'user) - (push (list symbol (cadr value)) values))))) - (ensure-empty-lines) - (insert "(custom-set-icons + (let ((values nil)) + (mapatoms + (lambda (symbol) + (let ((value (car-safe (get symbol 'theme-icon)))) + (when (eq (car value) 'user) + (push (list symbol (cadr value)) values))))) + (save-excursion + (custom-save-delete 'custom-set-icons) + (when values + (ensure-empty-lines) + (insert "(custom-set-icons ;; custom-set-icons was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right.\n") - (dolist (value (sort values (lambda (s1 s2) - (string< (car s1) (car s2))))) - (unless (bolp) - (insert "\n")) - (insert " '") - (prin1 value (current-buffer))) - (insert ")\n")))) + (dolist (value (sort values (lambda (s1 s2) + (string< (car s1) (car s2))))) + (unless (bolp) + (insert "\n")) + (insert " '") + (prin1 value (current-buffer))) + (insert ")\n"))))) (provide 'cus-edit) commit 97b80912e9fb74d8a7881b74f1cd556a03f5fae8 Author: Stefan Kangas Date: Sun Jul 31 18:15:55 2022 +0200 Move some definitions from ps-def.el to ps-print.el * lisp/ps-def.el (ps-face-bold-p, ps-face-italic-p) (ps-face-strikeout-p, ps-face-overline-p, ps-face-box-p) (ps-color-format, ps-float-format) (ps-generate-postscript-with-faces1): Move from here... * lisp/ps-print.el (ps-face-bold-p, ps-face-italic-p) (ps-face-strikeout-p, ps-face-overline-p, ps-face-box-p) (ps-color-format, ps-float-format) (ps-generate-postscript-with-faces1): ...to here. diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 8235d6c7f3..ed4cd7b248 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -29,12 +29,6 @@ ;;; Code: -(declare-function ps-plot-with-face "ps-print" (from to face)) -(declare-function ps-plot-string "ps-print" (string)) - -(defvar ps-bold-faces) ; in ps-print.el -(defvar ps-italic-faces) - ;; Emacs Definitions @@ -54,67 +48,6 @@ (define-obsolete-function-alias 'ps-color-device #'display-color-p "29.1") (define-obsolete-function-alias 'ps-color-values #'color-values "28.1") -(defun ps-face-bold-p (face) - (or (face-bold-p face) - (memq face ps-bold-faces))) - - -(defun ps-face-italic-p (face) - (or (face-italic-p face) - (memq face ps-italic-faces))) - - -(defun ps-face-strikeout-p (face) - (eq (face-attribute face :strike-through) t)) - - -(defun ps-face-overline-p (face) - (eq (face-attribute face :overline) t)) - - -(defun ps-face-box-p (face) - (not (memq (face-attribute face :box) '(nil unspecified)))) - - -;; Emacs understands the %f format; we'll use it to limit color RGB values -;; to three decimals to cut down some on the size of the PostScript output. -(defvar ps-color-format "%0.3f %0.3f %0.3f") -(defvar ps-float-format "%0.3f ") - - -(defun ps-generate-postscript-with-faces1 (from to) - ;; Generate some PostScript. - (let ((face 'default) - (position to) - ;; Emacs - (property-change from) - (overlay-change from) - before-string after-string) - (while (< from to) - (and (< property-change to) ; Don't search for property change - ; unless previous search succeeded. - (setq property-change (next-property-change from nil to))) - (and (< overlay-change to) ; Don't search for overlay change - ; unless previous search succeeded. - (setq overlay-change (min (next-overlay-change from) - to))) - (setq position (min property-change overlay-change) - before-string nil - after-string nil) - (setq face - (cond ((invisible-p from) - 'emacs--invisible--face) - ((get-char-property from 'face)) - (t 'default))) - ;; Plot up to this record. - (and before-string - (ps-plot-string before-string)) - (ps-plot-with-face from position face) - (and after-string - (ps-plot-string after-string)) - (setq from position)) - (ps-plot-with-face from to face))) - (provide 'ps-def) ;;; ps-def.el ends here diff --git a/lisp/ps-print.el b/lisp/ps-print.el index fe60fcc288..4a7e5bbd3d 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4733,6 +4733,10 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th (defun ps-output-boolean (name bool) (ps-output (format "/%s %s def\n" name (if bool "true" "false")))) +;; Limit color RGB values to three decimals to cut down some on the +;; size of the PostScript output. +(defvar ps-color-format "%0.3f %0.3f %0.3f") +(defvar ps-float-format "%0.3f ") (defun ps-output-frame-properties (name alist) (ps-output "/" name " [" @@ -6312,6 +6316,22 @@ If FACE is not a valid face name, use default face." (setq ps-print-face-alist (cons face-map ps-print-face-alist))) face-map)) +(defun ps-face-bold-p (face) + (or (face-bold-p face) + (memq face ps-bold-faces))) + +(defun ps-face-italic-p (face) + (or (face-italic-p face) + (memq face ps-italic-faces))) + +(defun ps-face-strikeout-p (face) + (eq (face-attribute face :strike-through) t)) + +(defun ps-face-overline-p (face) + (eq (face-attribute face :overline) t)) + +(defun ps-face-box-p (face) + (not (memq (face-attribute face :box) '(nil unspecified)))) (defun ps-screen-to-bit-face (face) (cons face @@ -6325,6 +6345,38 @@ If FACE is not a valid face name, use default face." (face-background face nil t)))) +(defun ps-generate-postscript-with-faces1 (from to) + ;; Generate some PostScript. + (let ((face 'default) + (position to) + (property-change from) + (overlay-change from) + before-string after-string) + (while (< from to) + (and (< property-change to) ; Don't search for property change + ; unless previous search succeeded. + (setq property-change (next-property-change from nil to))) + (and (< overlay-change to) ; Don't search for overlay change + ; unless previous search succeeded. + (setq overlay-change (min (next-overlay-change from) + to))) + (setq position (min property-change overlay-change) + before-string nil + after-string nil) + (setq face + (cond ((invisible-p from) + 'emacs--invisible--face) + ((get-char-property from 'face)) + (t 'default))) + ;; Plot up to this record. + (and before-string + (ps-plot-string before-string)) + (ps-plot-with-face from position face) + (and after-string + (ps-plot-string after-string)) + (setq from position)) + (ps-plot-with-face from to face))) + (defun ps-generate-postscript-with-faces (from to) ;; Some initialization... (setq ps-current-effect 0) commit 54fed8e1f9bb7536e2c7a098525b9147bb7318a3 Author: Stefan Kangas Date: Sun Jul 31 13:15:22 2022 +0200 Remove some leftover compat code from ps-print * lisp/ps-def.el (ps-mark-active-p): Make obsolete in favor of 'mark-active'. Update callers. (ps-face-foreground-name): Make obsolete in favor of 'face-foreground'. Update callers. (ps-face-background-name): Make obsolete in favor of 'face-background'. Update callers. (ps-color-device): Make into obsolete function alias for 'display-color-p'. Update callers. diff --git a/lisp/printing.el b/lisp/printing.el index b9bc3581c4..83c9ffc9cb 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -2782,7 +2782,7 @@ See `pr-ps-printer-alist'.") ["4-up" (pr-ps-buffer-preview 4 t) t] ["Other..." (pr-ps-buffer-preview nil t) :keys "\\[pr-ps-buffer-preview]"]) - ("Region" :active (and (not pr-spool-p) (ps-mark-active-p)) + ("Region" :active (and (not pr-spool-p) mark-active) ["1-up" (pr-ps-region-preview 1 t) t] ["2-up" (pr-ps-region-preview 2 t) t] ["4-up" (pr-ps-region-preview 4 t) t] @@ -2837,7 +2837,7 @@ See `pr-ps-printer-alist'.") ["4-up" (pr-ps-buffer-ps-print 4 t) t] ["Other..." (pr-ps-buffer-ps-print nil t) :keys "\\[pr-ps-buffer-ps-print]"]) - ("Region" :active (ps-mark-active-p) + ("Region" :active mark-active ["1-up" (pr-ps-region-ps-print 1 t) t] ["2-up" (pr-ps-region-ps-print 2 t) t] ["4-up" (pr-ps-region-ps-print 4 t) t] @@ -2887,12 +2887,12 @@ See `pr-ps-printer-alist'.") "Replace non-printing chars with printable representations." ["Directory" pr-printify-directory t] ["Buffer" pr-printify-buffer t] - ["Region" pr-printify-region (ps-mark-active-p)]) + ["Region" pr-printify-region mark-active]) ("Print" :included (pr-visible-p 'text) :help "Send text to printer" ["Directory" pr-txt-directory t] ["Buffer" pr-txt-buffer t] - ["Region" pr-txt-region (ps-mark-active-p)] + ["Region" pr-txt-region mark-active] ["Mode" pr-txt-mode (pr-mode-alist-p)]) ["Text Printers" pr-update-menus :active pr-txt-printer-alist :included (pr-visible-p 'text) @@ -5585,7 +5585,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (defun pr-create-interface () "Create the front end for printing package." (setq pr-i-buffer (buffer-name (current-buffer)) - pr-i-region (ps-mark-active-p) + pr-i-region mark-active pr-i-mode (pr-mode-alist-p) pr-i-window-configuration (current-window-configuration)) @@ -5651,11 +5651,11 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (nreverse choices)) " Buffer : " nil (lambda () - (pr-interface-save - (setq pr-i-region (ps-mark-active-p) - pr-i-mode (pr-mode-alist-p))) - (pr-update-checkbox 'pr-i-region) - (pr-update-checkbox 'pr-i-mode))) + (pr-interface-save + (setq pr-i-region mark-active + pr-i-mode (pr-mode-alist-p))) + (pr-update-checkbox 'pr-i-region) + (pr-update-checkbox 'pr-i-mode))) ;; 1a. Buffer: Region (put 'pr-i-region 'pr-widget (pr-insert-checkbox @@ -5663,7 +5663,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." 'pr-i-region (lambda (widget &rest _ignore) (let ((region-p (pr-interface-save - (ps-mark-active-p)))) + mark-active))) (cond ((null (widget-value widget)) ; widget is nil (setq pr-i-region nil)) (region-p ; widget is true and there is a region diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index 96cbcba9be..48664608ad 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -4524,7 +4524,7 @@ end (defun ebnf-generate-eps (tree) (let* ((ebnf-tree tree) - (ps-color-p (and ebnf-color-p (ps-color-device))) + (ps-color-p (and ebnf-color-p (display-color-p))) (ps-print-color-scale (if ps-color-p (float (car (color-values "white"))) 1.0)) @@ -4626,7 +4626,7 @@ end (defun ebnf-generate (tree) (let* ((ebnf-tree tree) - (ps-color-p (and ebnf-color-p (ps-color-device))) + (ps-color-p (and ebnf-color-p (display-color-p))) (ps-print-color-scale (if ps-color-p (float (car (color-values "white"))) 1.0)) diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 8c5187ca8b..8235d6c7f3 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -35,36 +35,25 @@ (defvar ps-bold-faces) ; in ps-print.el (defvar ps-italic-faces) - - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Emacs Definitions - (defun ps-mark-active-p () + (declare (obsolete mark-active "29.1")) mark-active) - (defun ps-face-foreground-name (face) + (declare (obsolete face-foreground "29.1")) (face-foreground face nil t)) - (defun ps-face-background-name (face) + (declare (obsolete face-background "29.1")) (face-background face nil t)) - (define-obsolete-function-alias 'ps-frame-parameter #'frame-parameter "28.1") - -;; Return t if the device (which can be changed during an emacs session) can -;; handle colors. -(defun ps-color-device () - (color-values "Green")) - +(define-obsolete-function-alias 'ps-color-device #'display-color-p "29.1") (define-obsolete-function-alias 'ps-color-values #'color-values "28.1") - (defun ps-face-bold-p (face) (or (face-bold-p face) (memq face ps-bold-faces))) @@ -126,9 +115,6 @@ (setq from position)) (ps-plot-with-face from to face))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (provide 'ps-def) ;;; ps-def.el ends here diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 885aa3cc7c..fe60fcc288 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -4510,7 +4510,7 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th (defun ps-print-preprint-region (prefix) - (or (ps-mark-active-p) + (or mark-active (error "The mark is not set now")) (list (point) (mark) (ps-print-preprint prefix))) @@ -5749,7 +5749,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") ;; Set the color scale. We do it here instead of in the defvar so ;; that ps-print can be dumped into emacs. This expression can't be ;; evaluated at dump-time because X isn't initialized. - ps-color-p (and ps-print-color-p (ps-color-device)) + ps-color-p (and ps-print-color-p (display-color-p)) ps-print-color-scale (if ps-color-p (float (car (color-values "white"))) 1.0) @@ -5762,7 +5762,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") ((eq ps-default-bg 'frame-parameter) (frame-parameter nil 'background-color)) ((eq ps-default-bg t) - (ps-face-background-name 'default)) + (face-background 'default nil t)) (t ps-default-bg)) "unspecified-bg" @@ -5776,7 +5776,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") ((eq ps-default-fg 'frame-parameter) (frame-parameter nil 'foreground-color)) ((eq ps-default-fg t) - (ps-face-foreground-name 'default)) + (face-foreground 'default nil t)) (t ps-default-fg)) "unspecified-fg" @@ -6321,8 +6321,8 @@ If FACE is not a valid face name, use default face." (if (ps-face-strikeout-p face) 8 0) ; strikeout (if (ps-face-overline-p face) 16 0) ; overline (if (ps-face-box-p face) 64 0)) ; box - (ps-face-foreground-name face) - (ps-face-background-name face)))) + (face-foreground face nil t) + (face-background face nil t)))) (defun ps-generate-postscript-with-faces (from to) commit 78759ddcb0fc7dd75a7a8edfb2c19dc2f1d86ee2 (refs/remotes/origin/emacs-28) Author: Eli Zaretskii Date: Sun Jul 31 18:05:09 2022 +0300 * src/lisp.h (CHECK_INTEGER): Fix the predicate. (Bug#56856) diff --git a/src/lisp.h b/src/lisp.h index ab0be3b281..0cad97c077 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2998,7 +2998,7 @@ CHECK_NUMBER (Lisp_Object x) INLINE void CHECK_INTEGER (Lisp_Object x) { - CHECK_TYPE (INTEGERP (x), Qnumberp, x); + CHECK_TYPE (INTEGERP (x), Qintegerp, x); } INLINE void commit 66e01c9608b81516ad8c3f948bd448d56ff496ba Author: Michael Albinus Date: Sun Jul 31 15:45:34 2022 +0200 Declare Tramp function for backward compatibility * lisp/net/tramp.el (tramp-archive-file-name-handler): * lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Declare. diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index dd7e0f9f34..d4bbb94479 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -31,6 +31,7 @@ (require 'tramp) ;; Pacify byte-compiler. +(declare-function tramp-archive-file-name-handler "tramp-archive") (defvar ange-ftp-ftp-name-arg) (defvar ange-ftp-ftp-name-res) (defvar ange-ftp-name-format) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 426a669f62..0afa6fc431 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -62,6 +62,7 @@ (require 'cl-lib) (declare-function file-notify-rm-watch "filenotify") (declare-function netrc-parse "netrc") +(declare-function tramp-archive-file-name-handler "tramp-archive") (defvar auto-save-file-name-transforms) ;; Reload `tramp-compat' when we reload `tramp-autoloads' of the GNU ELPA package. commit ac237334c7672377721e4d27e8ecd6b09d453568 Author: Mattias Engdegård Date: Sun Jul 31 12:54:53 2022 +0200 Reduce internal rx autoloads * lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform): Don't autoload. (rx--pcase-macroexpander): Extract body into... (rx--pcase-expand): ...a separate function, which is autoloaded. diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index a2cf23f271..ec51146484 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1150,8 +1150,6 @@ For extending the `rx' notation in FORM, use `rx-define' or `rx-let-eval'." (rx--atomic-regexp item)))) (apply #'concat exprs))) -;; Autoloaded because it's referred to by form in loaddefs.el. -;;;###autoload (defun rx--to-expr (form) "Translate the rx-expression FORM to a Lisp expression yielding a regexp." (let* ((rx--delayed-evaluation t) @@ -1407,8 +1405,6 @@ For more details, see Info node `(elisp) Extending Rx'. ;; becomes a problem, we can handle those forms in the ordinary parser, ;; using a dynamic variable for activating the augmented forms. -;; Autoloaded because it's referred to by form in loaddefs.el. -;;;###autoload (defun rx--pcase-transform (rx) "Transform RX, an rx-expression augmented with `let' and named `backref', into a plain rx-expression, collecting names into `rx--pcase-vars'." @@ -1455,6 +1451,12 @@ following constructs: REF can be a number, as usual, or a name introduced by a previous (let REF ...) construct." + (rx--pcase-expand regexps)) + +;; Autoloaded because it's referred to by the pcase rx macro above, +;; whose body ends up in loaddefs.el. +;;;###autoload +(defun rx--pcase-expand (regexps) (let* ((rx--pcase-vars nil) (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps))))) `(and (pred stringp) commit f48493577d9dcfddecda5d8b40e156c5c063d9c6 Author: Mattias Engdegård Date: Sun Jul 31 11:48:56 2022 +0200 ; Use values instead of trying to ignore them * test/lisp/subr-tests.el (test-print-unreadable-function): * test/src/print-tests.el (test-print-unreadable-function-buffer): Instead of binding the value of nominally side-effect-free expressions to an ignored variable (_), make use of them. This is more robust and provides useful extra checks in the test. diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index bc11e6f3c7..3d03057f56 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1042,11 +1042,14 @@ final or penultimate step during initialization.")) (ert-deftest test-print-unreadable-function () ;; Check that problem with unwinding properly is fixed (bug#56773). - (with-temp-buffer - (let ((buf (current-buffer))) - (let ((_ (readablep (make-marker)))) nil) ; this `let' silences a - ; warning - (should (eq buf (current-buffer)))))) + (let* ((before nil) + (after nil) + (r (with-temp-buffer + (setq before (current-buffer)) + (prog1 (readablep (make-marker)) + (setq after (current-buffer)))))) + (should (equal after before)) + (should (equal r nil)))) (ert-deftest test-string-lines () (should (equal (string-lines "") '(""))) diff --git a/test/src/print-tests.el b/test/src/print-tests.el index b503bdeb99..5c349342eb 100644 --- a/test/src/print-tests.el +++ b/test/src/print-tests.el @@ -530,15 +530,17 @@ otherwise, use a different charset." 0))))))))))) (ert-deftest test-print-unreadable-function-buffer () - (with-temp-buffer - (let ((current (current-buffer)) - callback-buffer) - (let ((print-unreadable-function - (lambda (_object _escape) - (setq callback-buffer (current-buffer))))) - (let ((_ (prin1-to-string (make-marker)))) nil)) ; this `let' silences a - ; warning - (should (eq current callback-buffer))))) + (let* ((buffer nil) + (callback-buffer nil) + (str (with-temp-buffer + (setq buffer (current-buffer)) + (let ((print-unreadable-function + (lambda (_object _escape) + (setq callback-buffer (current-buffer)) + "tata"))) + (prin1-to-string (make-marker)))))) + (should (eq callback-buffer buffer)) + (should (equal str "tata")))) (provide 'print-tests) ;;; print-tests.el ends here commit df8dede8585257a2ee76ed93d6ecb6cf117e124a Author: Philip Kaludercic Date: Sun Jul 31 12:45:29 2022 +0200 Fix electric paring in rcirc buffers * rcirc.el (rcirc--electric-pair-inhibit): Add new predicate function. (rcirc-mode): Use rcirc--electric-pair-inhibit. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 54d7861f44..065398b64a 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1388,6 +1388,21 @@ Each element looks like (FILENAME . TEXT).") "The current number of responses printed in this channel. This number is independent of the number of lines in the buffer.") +(defun rcirc--electric-pair-inhibit (char) + "Check whether CHAR should be paired by `electric-pair-mode'. +This uses the default value inhibition predicate (as set by +`electric-pair-inhibit-predicate'), but ignores all text prior to +the prompt so that mismatches parentheses by some other message +does not confuse the pairing." + (let ((fallback (default-value 'electric-pair-inhibit-predicate))) + ;; The assumption is that this function is only bound by + ;; `rcirc-mode', and should never be the global default. + (cl-assert (not (eq fallback #'rcirc--electric-pair-inhibit))) + (save-restriction + (widen) + (narrow-to-region rcirc-prompt-start-marker (point-max)) + (funcall fallback char)))) + (defun rcirc-mode (process target) "Initialize an IRC buffer for writing with TARGET. PROCESS is the process object used for communication. @@ -1459,6 +1474,9 @@ PROCESS is the process object used for communication. (when rcirc-cycle-completion-flag (setq-local completion-cycle-threshold t)) + (setq-local electric-pair-inhibit-predicate + #'rcirc--electric-pair-inhibit) + (run-mode-hooks 'rcirc-mode-hook)) (defun rcirc-update-prompt (&optional all) commit ca2d3ed74c63167c7d8378482016efea9756dd17 Author: Stefan Kangas Date: Sun Jul 31 12:01:01 2022 +0200 * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read): Simplify. diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 4c702deaa9..ef02216411 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -281,32 +281,26 @@ being pedantic." (unless class (warn "`eieio-persistent-read' called without specifying a class")) (when class (cl-check-type class class)) - (let ((ret nil) - (buffstr nil)) - (unwind-protect - (progn - (with-current-buffer (get-buffer-create " *tmp eieio read*") - (insert-file-contents filename nil nil nil t) - (goto-char (point-min)) - (setq buffstr (buffer-string))) - ;; Do the read in the buffer the read was initialized from - ;; so that any initialize-instance calls that depend on - ;; the current buffer will work. - (setq ret (read buffstr)) - (when (not (child-of-class-p (car ret) 'eieio-persistent)) - (error - "Invalid object: %s is not a subclass of `eieio-persistent'" - (car ret))) - (when (and class - (not (or (eq (car ret) class) ; same class - (and allow-subclass ; subclass - (child-of-class-p (car ret) class))))) - (error - "Invalid object: %s is not an object of class %s nor a subclass" - (car ret) class)) - (setq ret (eieio-persistent-make-instance (car ret) (cdr ret))) - (oset ret file filename)) - (kill-buffer " *tmp eieio read*")) + (let* ((buffstr (with-temp-buffer + (insert-file-contents filename) + (buffer-string))) + ;; Do the read in the buffer the read was initialized from + ;; so that any initialize-instance calls that depend on + ;; the current buffer will work. + (ret (read buffstr))) + (when (not (child-of-class-p (car ret) 'eieio-persistent)) + (error + "Invalid object: %s is not a subclass of `eieio-persistent'" + (car ret))) + (when (and class + (not (or (eq (car ret) class) ; same class + (and allow-subclass ; subclass + (child-of-class-p (car ret) class))))) + (error + "Invalid object: %s is not an object of class %s nor a subclass" + (car ret) class)) + (setq ret (eieio-persistent-make-instance (car ret) (cdr ret))) + (oset ret file filename) ret)) (cl-defgeneric eieio-persistent-make-instance (objclass inputlist) commit ef5abcd4cc61791fe6d19d187e03f4e3ba33891f Author: Stefan Kangas Date: Sun Jul 31 11:46:31 2022 +0200 ; Simplify two functions after recent change * lisp/textmodes/bib-mode.el (bib-capitalize-title): * lisp/textmodes/refbib.el (r2b-capitalize-title): Simplify. diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 83759090af..af49464d1e 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -227,7 +227,6 @@ named by variable `bib-unread-file'." (defun bib-capitalize-title (s) "Like `capitalize', but don't capitalize stop words, except the first." (with-temp-buffer - (erase-buffer) (insert s) (bib-capitalize-title-region (point-min) (point-max)) (buffer-string))) diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index f697fcaf40..203a0fdbb7 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -165,7 +165,6 @@ This is in addition to the `r2b-capitalize-title-stop-words'.") (defun r2b-capitalize-title (s) "Like `capitalize', but don't capitalize stop words, except the first." (with-temp-buffer - (erase-buffer) (insert s) (r2b-capitalize-title-region (point-min) (point-max)) (buffer-string))) commit 623356ee946d695771d92ac4a03cd10d30bd505f Author: Lars Ingebrigtsen Date: Sun Jul 31 12:01:10 2022 +0200 Fix compilation warnings in tramp-loaddefs.el * lisp/files.el (file-name-quoted-p): Autoload because it's referred to from tramp-loaddefs. * lisp/net/tramp.el (defvar): Put the entire form into the loaddefs file instead of eval-and-compile -- this fixes a dependency problem when byte-compiling the loaddefs file. (tramp-methods, tramp-default-method-alist) (tramp-default-user-alist, tramp-default-host-alist) (tramp-local-host-regexp, tramp-terminal-type) (tramp-foreign-file-name-handler-alist): Autoload to avoid compilation warnings. Also put (require 'cl-lib) into the loaddefs file for the same reason. (tramp-ensure-dissected-file-name) (tramp-set-completion-function) (tramp-register-foreign-file-name-handler): Autoload. diff --git a/lisp/files.el b/lisp/files.el index b6d0a0013f..65f9039b33 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -8234,6 +8234,7 @@ arguments as the running Emacs)." (_ (apply operation arguments)))))) +;;;###autoload (defsubst file-name-quoted-p (name &optional top) "Whether NAME is quoted with prefix \"/:\". If NAME is a remote file name and TOP is nil, check the local part of NAME." diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index bc32044451..e813533270 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -79,6 +79,7 @@ Add the extension of F, if existing." ;; `file-name-quoted-p', `file-name-quote' and `file-name-unquote' got ;; a second argument in Emacs 27.1. +;;;###tramp-autoload (defalias 'tramp-compat-file-name-quoted-p (if (equal (func-arity #'file-name-quoted-p) '(1 . 2)) #'file-name-quoted-p diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a808c79dd9..426a669f62 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -77,7 +77,8 @@ :link '(custom-manual "(tramp)Top") :version "22.1") -(eval-and-compile ;; So it's also available in tramp-loaddefs.el! +;;;###tramp-autoload +(progn (defvar tramp--startup-hook nil "Forms to be executed at the end of tramp.el.") (put 'tramp--startup-hook 'tramp-suppress-trace t) @@ -186,9 +187,11 @@ See the variable `tramp-encoding-shell' for more information." ;; Since Emacs 26.1, `system-name' can return nil at build time if ;; Emacs is compiled with "--no-build-details". We do expect it to be ;; a string. (Bug#44481, Bug#54294) +;;;###tramp-autoload (defconst tramp-system-name (or (system-name) "") "The system name Tramp is running locally.") +;;;###tramp-autoload (defvar tramp-methods nil "Alist of methods for remote files. This is a list of entries of the form (NAME PARAM1 PARAM2 ...). @@ -403,6 +406,7 @@ See `tramp-methods' for possibilities. Also see `tramp-default-method-alist'." :type 'string) +;;;###tramp-autoload (defcustom tramp-default-method-alist nil ;; FIXME: This is not an "alist", because its elements are not of ;; the form (KEY . VAL) but (KEY1 KEY2 VAL). @@ -432,6 +436,7 @@ It is nil by default; otherwise settings in configuration files like This variable is regarded as obsolete, and will be removed soon." :type '(choice (const nil) string)) +;;;###tramp-autoload (defcustom tramp-default-user-alist nil ;; FIXME: This is not an "alist", because its elements are not of ;; the form (KEY . VAL) but (KEY1 KEY2 VAL). @@ -453,6 +458,7 @@ empty string for the method name." Useful for su and sudo methods mostly." :type 'string) +;;;###tramp-autoload (defcustom tramp-default-host-alist nil ;; FIXME: This is not an "alist", because its elements are not of ;; the form (KEY . VAL) but (KEY1 KEY2 VAL). @@ -518,6 +524,7 @@ host runs a restricted shell, it shall be added to this list, too." :version "27.1" :type '(repeat (regexp :tag "Host regexp"))) +;;;###tramp-autoload (defcustom tramp-local-host-regexp (concat "\\`" @@ -679,6 +686,7 @@ The regexp should match at end of buffer. See also `tramp-yesno-prompt-regexp'." :type 'regexp) +;;;###tramp-autoload (defcustom tramp-terminal-type "dumb" "Value of TERM environment variable for logging in to remote host. Because Tramp wants to parse the output of the remote shell, it is easily @@ -1415,6 +1423,7 @@ Operations not mentioned here will be handled by Tramp's file name handler functions, or the normal Emacs functions.") ;; Handlers for foreign methods, like FTP or SMB, shall be plugged here. +;;;###autoload (defvar tramp-foreign-file-name-handler-alist nil "Alist of elements (FUNCTION . HANDLER) for foreign methods handled specially. If (FUNCTION FILENAME) returns non-nil, then all I/O on that file is done by @@ -1429,6 +1438,7 @@ calling HANDLER.") ;; The basic structure for remote file names. We must autoload it in ;; tramp-loaddefs.el, because some functions, which need it, wouldn't ;; work otherwise when unloading / reloading Tramp. (Bug#50869) +;;;###tramp-autoload(require 'cl-lib) ;;;###tramp-autoload (cl-defstruct (tramp-file-name (:type list) :named) method user domain host port localname hop) @@ -1693,6 +1703,7 @@ default values are used." (put #'tramp-dissect-file-name 'tramp-suppress-trace t) +;;;###tramp-autoload (defun tramp-ensure-dissected-file-name (vec-or-filename) "Return a `tramp-file-name' structure for VEC-OR-FILENAME. @@ -2444,6 +2455,7 @@ letter into the file name. This function removes it." (defconst tramp-dns-sd-service-regexp "^_[-[:alnum:]]+\\._tcp$" "DNS-SD service regexp.") +;;;###tramp-autoload (defun tramp-set-completion-function (method function-list) "Set the list of completion functions for METHOD. FUNCTION-LIST is a list of entries of the form (FUNCTION FILE). @@ -2880,6 +2892,7 @@ remote file names." (tramp--with-startup (tramp-register-file-name-handlers)) +;;;###tramp-autoload (defun tramp-register-foreign-file-name-handler (func handler &optional append) "Register (FUNC . HANDLER) in `tramp-foreign-file-name-handler-alist'. commit 2682ea1b3a9524eb54efac41b3221b514374c232 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:43:48 2022 +0200 Fix org.el byte-compile warning in org-loaddefs.el * lisp/org/org.el (org-dynamic-block-define): Autoload because it's referred to in org-loaddefs.el. diff --git a/lisp/org/org.el b/lisp/org/org.el index 7ab1801cfa..e62ee3203b 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9319,6 +9319,7 @@ TYPE is the dynamic block type, as a string." "List all defined dynamic block types." (mapcar #'car org-dynamic-block-alist)) +;;;###org-autoload (defun org-dynamic-block-define (type func) "Define dynamic block TYPE with FUNC. TYPE is a string. FUNC is the function creating the dynamic commit 18f105bd7d485a9ddffe2b2b9b8a5c2dc243a542 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:38:27 2022 +0200 Fix ede byte-compile warnings in loaddefs.el * lisp/emacs-lisp/eieio.el (make-instance): * lisp/cedet/ede/auto.el (ede-add-project-autoload): Autoload functions referred to by ede/loaddefs.el. diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 7af9987de1..7e3cac616f 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el @@ -234,6 +234,7 @@ type is required and the load function used.") (display-buffer b) )) +;;;###autoload (defun ede-add-project-autoload (projauto &optional flag) "Add PROJAUTO, an EDE autoload definition to `ede-project-class-files'. Optional argument FLAG indicates how this autoload should be diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 565eaf2d73..984166b593 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -689,6 +689,7 @@ This class is not stored in the `parent' slot of a class vector." (define-obsolete-function-alias 'standard-class #'eieio-default-superclass "26.1") +;;;###autoload (cl-defgeneric make-instance (class &rest initargs) "Make a new instance of CLASS based on INITARGS. For example: commit bd7a15ef784cbe7326e19cd78da70e3625e72aad Author: Lars Ingebrigtsen Date: Sun Jul 31 11:37:45 2022 +0200 Remove loaddefs debug code * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Remove code inadvertantly checked in. diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index e273381222..261e44aece 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -481,7 +481,6 @@ FILE's name." (insert " \n;;; End of scraped data\n\n") (generate-lisp-file-trailer file :provide (and (stringp feature) feature) - :compile t :inhibit-provide (not feature)) (buffer-string)))) commit 5276519255c27e7dd01cbc3fea00d1c29f44d514 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:33:47 2022 +0200 Fix cl byte-compile warning in cl-loaddefs.el * lisp/emacs-lisp/cl-macs.el (cl--optimize) (cl-struct-sequence-type, cl-struct-slot-offset): Autoload since they are referred to by code in cl-loaddefs.el. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 6646167b92..727b3098e3 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2559,6 +2559,7 @@ values. For compatibility, (cl-values A B C) is a synonym for (list A B C). (push x macro-declarations-alist) (push x defun-declarations-alist))) +;;;###cl-autoload (defun cl--optimize (f _args &rest qualities) "Serve `cl-optimize' in function declarations. Example: @@ -3335,6 +3336,7 @@ the form NAME which is a shorthand for (NAME NAME)." :around #'cl--pcase-mutually-exclusive-p)) +;;;###cl-autoload (defun cl-struct-sequence-type (struct-type) "Return the sequence used to build STRUCT-TYPE. STRUCT-TYPE is a symbol naming a struct type. Return values are @@ -3374,6 +3376,7 @@ slots skipped by :initial-offset may appear in the list." (define-error 'cl-struct-unknown-slot "struct has no slot") +;;;###cl-autoload (defun cl-struct-slot-offset (struct-type slot-name) "Return the offset of slot SLOT-NAME in STRUCT-TYPE. The returned zero-based slot index is relative to the start of diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 261e44aece..e273381222 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -481,6 +481,7 @@ FILE's name." (insert " \n;;; End of scraped data\n\n") (generate-lisp-file-trailer file :provide (and (stringp feature) feature) + :compile t :inhibit-provide (not feature)) (buffer-string)))) commit 107f832577123ea7ebe867cba55601d0142f546f Author: Stefan Kangas Date: Sun Jul 31 11:33:42 2022 +0200 Delete additional items obsolete since 20, 21 and 22 * lisp/font-lock.el (font-lock-reference-face): Delete variable alias obsolete since 20.3. * lisp/progmodes/cc-cmds.el (c-toggle-auto-state): Delete alias obsolete since 22.1. * lisp/replace.el (query-replace-regexp-eval): Delete function obsolete since 22.1. (replace-count, replace-re-search-function): Doc fixes; adjust for above deleted function. diff --git a/etc/NEWS b/etc/NEWS index a6b95cd88f..ba05b49176 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2416,7 +2416,8 @@ but switching to `ash` is generally much preferable. 'dired-x-submit-report', 'eieio-defgeneric', 'eieio-defmethod', 'emacs-lock-from-exiting', 'erc-complete-word', 'eshell-cmpl-suffix-list', 'eshell-for', 'font-lock-maximum-size', -'gnus-carpal', 'gnus-debug-exclude-variables', 'gnus-debug-files', +'font-lock-reference-face', 'gnus-carpal', +'gnus-debug-exclude-variables', 'gnus-debug-files', 'gnus-local-domain', 'gnus-outgoing-message-group', 'gnus-secondary-servers', 'gnus-registry-user-format-function-M', 'image-extension-data', 'image-library-alist', @@ -2458,7 +2459,8 @@ but switching to `ash` is generally much preferable. --- ** Some functions and variables obsolete since Emacs 21 or 22 have been removed: -'find-file-not-found-hooks', 'ls-lisp-dired-ignore-case'. +'c-toggle-auto-state', 'find-file-not-found-hooks', +'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. +++ ** New generic function 'function-documentation'. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4ae84220a7..7eb5a414fe 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -346,9 +346,6 @@ If a number, only buffers greater than this size have fontification messages." (defvar font-lock-type-face 'font-lock-type-face "Face name to use for type and class names.") -(define-obsolete-variable-alias - 'font-lock-reference-face 'font-lock-constant-face "20.3") - (defvar font-lock-constant-face 'font-lock-constant-face "Face name to use for constant and label names.") diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 82268f4943..38e9d6011d 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -328,9 +328,6 @@ after special characters such as brace, comma, semi-colon, and colon." (c-update-modeline) (c-keep-region-active)) -(defalias 'c-toggle-auto-state 'c-toggle-auto-newline) -(make-obsolete 'c-toggle-auto-state 'c-toggle-auto-newline "22.1") - (defun c-toggle-hungry-state (&optional arg) "Toggle hungry-delete-key feature. Optional numeric ARG, if supplied, turns on hungry-delete when diff --git a/lisp/replace.el b/lisp/replace.el index f8cc784f7c..ab9ac17ed9 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -157,7 +157,7 @@ is highlighted lazily using isearch lazy highlighting (see (defvar replace-count 0 "Number of replacements done so far. -See `replace-regexp' and `query-replace-regexp-eval'.") +See `replace-regexp'.") (defun query-replace-descr (string) (setq string (copy-sequence string)) @@ -563,84 +563,6 @@ REGION-NONCONTIGUOUS-P are passed to `perform-replace' (which see)." (define-key esc-map [?\C-%] 'query-replace-regexp) -(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end region-noncontiguous-p) - "Replace some things after point matching REGEXP with the result of TO-EXPR. - -Interactive use of this function is deprecated in favor of the -`\\,' feature of `query-replace-regexp'. For non-interactive use, a loop -using `search-forward-regexp' and `replace-match' is preferred. - -As each match is found, the user must type a character saying -what to do with it. Type SPC or `y' to replace the match, -DEL or `n' to skip and go to the next match. For more directions, -type \\[help-command] at that time. - -TO-EXPR is a Lisp expression evaluated to compute each replacement. It may -reference `replace-count' to get the number of replacements already made. -If the result of TO-EXPR is not a string, it is converted to one using -`prin1-to-string' with the NOESCAPE argument (which see). - -For convenience, when entering TO-EXPR interactively, you can use `\\&' -to stand for whatever matched the whole of REGEXP, and `\\N' (where -N is a digit) to stand for whatever matched the Nth `\\(...\\)' (1-based) -in REGEXP. - -Use `\\#&' or `\\#N' if you want a number instead of a string. -In interactive use, `\\#' in itself stands for `replace-count'. - -In Transient Mark mode, if the mark is active, operate on the contents -of the region. Otherwise, operate from point to the end of the buffer's -accessible portion. - -Use \\\\[next-history-element] \ -to pull the last incremental search regexp to the minibuffer -that reads REGEXP. - -Preserves case in each replacement if `case-replace' and `case-fold-search' -are non-nil and REGEXP has no uppercase letters. - -Ignore read-only matches if `query-replace-skip-read-only' is non-nil, -ignore hidden matches if `search-invisible' is nil, and ignore more -matches using `isearch-filter-predicate'. - -If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp -to be replaced will match a sequence of whitespace chars defined by the -regexp in `search-whitespace-regexp'. - -This function is not affected by `replace-char-fold'. - -Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace -only matches that are surrounded by word boundaries. -Fourth and fifth arg START and END specify the region to operate on. - -Arguments REGEXP, DELIMITED, START, END, and REGION-NONCONTIGUOUS-P -are passed to `perform-replace' (which see)." - (declare (obsolete "use the `\\,' feature of `query-replace-regexp' -for interactive calls, and `search-forward-regexp'/`replace-match' -for Lisp calls." "22.1")) - (interactive - (progn - (barf-if-buffer-read-only) - (let* ((from - ;; Let-bind the history var to disable the "foo -> bar" - ;; default. Maybe we shouldn't disable this default, but - ;; for now I'll leave it off. --Stef - (let ((query-replace-defaults nil)) - (query-replace-read-from "Query replace regexp" t))) - (to (list (read-from-minibuffer - (format "Query replace regexp %s with eval: " - (query-replace-descr from)) - nil nil t query-replace-to-history-variable from t)))) - ;; We make TO a list because replace-match-string-symbols requires one, - ;; and the user might enter a single token. - (replace-match-string-symbols to) - (list from (car to) current-prefix-arg - (if (use-region-p) (region-beginning)) - (if (use-region-p) (region-end)) - (if (use-region-p) (region-noncontiguous-p)))))) - (perform-replace regexp (cons #'replace-eval-replacement to-expr) - t 'literal delimited nil nil start end nil region-noncontiguous-p)) - (defun map-query-replace-regexp (regexp to-strings &optional n start end region-noncontiguous-p) "Replace some matches for REGEXP with various strings, in rotation. The second argument TO-STRINGS contains the replacement strings, separated @@ -2719,10 +2641,9 @@ with three arguments, as if it were `search-forward'.") (defvar replace-re-search-function nil "Function to use when searching for regexps to replace. -It is used by `query-replace-regexp', `replace-regexp', -`query-replace-regexp-eval', and `map-query-replace-regexp'. -It is called with three arguments, as if it were -`re-search-forward'.") +It is used by `query-replace-regexp', `replace-regexp', and +`map-query-replace-regexp'. It is called with three arguments, +as if it were `re-search-forward'.") (defvar replace-regexp-function nil "Function to convert the FROM string of query-replace commands to a regexp. commit 9c5d8d59cf94887e5cba94d80ddadf76ccb05a07 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:29:52 2022 +0200 Fix remaining byte-compile warnings in loaddefs.el * lisp/progmodes/compile.el (compilation--default-buffer-name): * lisp/kmacro.el (kmacro-name-last-macro): * lisp/emacs-lisp/package.el (package--activate-all): Autoload to avoid byte-compilation warnings when byte-compiling loaddefs.el. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 97be7d6e50..df70f908da 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1663,6 +1663,7 @@ The variable `package-load-list' controls which packages to load." (require 'package) (package--activate-all))))) +;;;###autoload (defun package--activate-all () (dolist (elt (package--alist)) (condition-case err diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 92118ad143..72420a6730 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -920,6 +920,7 @@ The ARG parameter is unused." (vectorp f) ;FIXME: Deprecated. (kmacro-p f))))) +;;;###autoload (defun kmacro-name-last-macro (symbol) "Assign a name to the last keyboard macro defined. Argument SYMBOL is the name to define. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9ecea7d21b..5ce80e0657 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1792,6 +1792,7 @@ Otherwise, construct a buffer name from NAME-OF-MODE." #'compilation--default-buffer-name) name-of-mode)) +;;;###autoload (defun compilation--default-buffer-name (name-of-mode) (cond ((or (eq major-mode (intern-soft name-of-mode)) (eq major-mode (intern-soft (concat name-of-mode "-mode")))) commit e8d198a00a87df7b047cf8eeebad197584d35717 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:28:04 2022 +0200 Fix rx.el byte-compile warning in loaddefs.el * lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform): Autoload to avoid warning when byte-compiling loaddefs.el. diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 18eb168a70..a2cf23f271 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1150,6 +1150,8 @@ For extending the `rx' notation in FORM, use `rx-define' or `rx-let-eval'." (rx--atomic-regexp item)))) (apply #'concat exprs))) +;; Autoloaded because it's referred to by form in loaddefs.el. +;;;###autoload (defun rx--to-expr (form) "Translate the rx-expression FORM to a Lisp expression yielding a regexp." (let* ((rx--delayed-evaluation t) @@ -1405,6 +1407,8 @@ For more details, see Info node `(elisp) Extending Rx'. ;; becomes a problem, we can handle those forms in the ordinary parser, ;; using a dynamic variable for activating the augmented forms. +;; Autoloaded because it's referred to by form in loaddefs.el. +;;;###autoload (defun rx--pcase-transform (rx) "Transform RX, an rx-expression augmented with `let' and named `backref', into a plain rx-expression, collecting names into `rx--pcase-vars'." commit f8278a923fd789b8dd0d33584e840e03e4f21c2a Author: Lars Ingebrigtsen Date: Sun Jul 31 11:25:41 2022 +0200 Fix sendmail.el byte-compile warning in loaddefs.el * lisp/mail/sendmail.el (mail-send-and-exit): Autoload since it's referred to by autoloaded code in loaddefs.el. diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 8cb079f7fb..76ef65b343 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -820,6 +820,7 @@ If within the headers, this makes the new lines into continuation lines." ;; User-level commands for sending. +;;;###autoload (defun mail-send-and-exit (&optional arg) "Send message like `mail-send', then, if no errors, exit from mail buffer. Prefix arg means don't delete this window." commit 0a0e1ed0e02431827dfd26014d9db9059f1ccc30 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:24:23 2022 +0200 tramp fixes for byte-compiling loaddefs.el * lisp/net/tramp-archive.el (tramp-archive-file-name-handler): Move to the main loaddefs file since it's referred to by functions there. * lisp/net/tramp.el (tramp-file-name-handler): Autoload to avoid warning when byte-compiling loaddefs.el. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 4f106a6b59..b224494110 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -322,7 +322,7 @@ arguments to pass to the OPERATION." (inhibit-file-name-operation operation)) (apply operation args)))) -;;;###tramp-autoload +;;;###autoload (defun tramp-archive-file-name-handler (operation &rest args) "Invoke the file archive related OPERATION. First arg specifies the OPERATION, second arg ARGS is a list of diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index faf3182d4a..a808c79dd9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2684,6 +2684,7 @@ Must be handled by the callers." res))) ;; Main function. +;;;###autoload (defun tramp-file-name-handler (operation &rest args) "Invoke Tramp file name handler for OPERATION and ARGS. Fall back to normal file name handler if no Tramp file name handler exists." commit c5df73941efaca822cd04ad7a61cdc70eae2d547 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:21:47 2022 +0200 Fix further package.el loaddefs byte-compile warnings * lisp/emacs-lisp/package.el (package-directory-list) (package-quickstart-file): Specify group to avoid warning when byte-compiling loaddefs.el. (package-activated-list): Autoload since we're assigning the variable from a function completely autoloaded. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7424678008..97be7d6e50 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -320,6 +320,7 @@ These directories contain packages intended for system-wide; in contrast, `package-user-dir' contains packages for personal use." :type '(repeat directory) :initialize #'custom-initialize-delay + :group 'applications :risky t :version "24.1") @@ -628,6 +629,7 @@ called via `package-activate-all'. To change which packages are loaded and/or activated, customize `package-load-list'.") (put 'package-alist 'risky-local-variable t) +;;;###autoload (defvar package-activated-list nil ;; FIXME: This should implicitly include all builtin packages. "List of the names of currently activated packages.") @@ -4287,6 +4289,7 @@ activations need to be changed, such as when `package-load-list' is modified." (locate-user-emacs-file "package-quickstart.el") "Location of the file used to speed up activation of packages at startup." :type 'file + :group 'applications :initialize #'custom-initialize-delay :version "27.1") commit ca14dbd6b5bf0c3941cb70b5b46a8c9bc8f7a41d Author: Lars Ingebrigtsen Date: Sun Jul 31 11:16:37 2022 +0200 Fix loaddefs byte-compile warnings from grep.el * lisp/progmodes/grep.el (grep-highlight-matches) (grep-match-face): Autoload to avoid byte-compile warnings from loaddefs.el. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index c01d7e997e..4c1f801980 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -66,6 +66,7 @@ SYMBOL should be one of `grep-command', `grep-template', integer) :version "22.1") +;;;###autoload (defcustom grep-highlight-matches 'auto-detect "Use special markers to highlight grep matches. @@ -352,6 +353,7 @@ A grep buffer becomes most recent when you select Grep mode in it. Notice that using \\[next-error] or \\[compile-goto-error] modifies `next-error-last-buffer' rather than `grep-last-buffer'.") +;;;###autoload (defvar grep-match-face 'match "Face name to use for grep matches.") commit d5fd9e0e5b85919536bb9353b655166c0df481a8 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:15:58 2022 +0200 Fix loaddefs byte-compile warning from package.el * lisp/emacs-lisp/package.el (package-user-dir): :group has to be explicit for autoloaded defcustoms. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index b25865f429..7424678008 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -301,6 +301,7 @@ packages in `package-directory-list'." :type 'directory :initialize #'custom-initialize-delay :risky t + :group 'applications :version "24.1") ;;;###autoload commit 02c14216db46ca3402fdb34062f83132dc3cc1f7 Author: Lars Ingebrigtsen Date: Sun Jul 31 11:07:04 2022 +0200 Reformulate compile-command condition * lisp/progmodes/compile.el: Reformulate to avoid a byte-compile warning when compiling loaddefs.el. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a665fccc73..9ecea7d21b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -860,7 +860,7 @@ You might also use mode hooks to specify it in certain modes, like this: It's often useful to leave a space at the end of the value." :type 'string) -;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) +;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (if (boundp 'compilation-read-command) compilation-read-command t)))) ;;;###autoload (defcustom compilation-disable-input nil commit a4cf4893d179d9eed774284ce1b427767da66730 Author: Stefan Kangas Date: Sun Jul 31 10:56:35 2022 +0200 Delete aliases obsolete since 21.1 and 22.1 * lisp/ls-lisp.el (ls-lisp-dired-ignore-case): * lisp/files.el (find-file-not-found-hooks): Delete variable aliases, obsolete since 21.1 and 22.1 respectively. diff --git a/etc/NEWS b/etc/NEWS index 489948214d..a6b95cd88f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2456,6 +2456,10 @@ but switching to `ash` is generally much preferable. 'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode', 'vc-arch-command', 'window-redisplay-end-trigger'. +--- +** Some functions and variables obsolete since Emacs 21 or 22 have been removed: +'find-file-not-found-hooks', 'ls-lisp-dired-ignore-case'. + +++ ** New generic function 'function-documentation'. Can dynamically generate a raw docstring depending on the type of diff --git a/lisp/files.el b/lisp/files.el index bea0c13d25..b6d0a0013f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -577,8 +577,6 @@ location of point in the current buffer." ;;;It is not useful to make this a local variable. ;;;(put 'find-file-not-found-functions 'permanent-local t) -(define-obsolete-variable-alias 'find-file-not-found-hooks - 'find-file-not-found-functions "22.1") (defvar find-file-not-found-functions nil "List of functions to be called for `find-file' on nonexistent file. These functions are called as soon as the error is detected. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 6d1f449568..3e50b0dcc8 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -100,14 +100,6 @@ update the dependent variables." (ls-lisp-set-options))) :group 'ls-lisp) -;; Only made an obsolete alias in 23.3. Before that, the initial -;; value was set according to: -;; (or (memq ls-lisp-emulation '(MS-Windows MacOS)) -;; (and (boundp 'ls-lisp-dired-ignore-case) ls-lisp-dired-ignore-case)) -;; Which isn't the right thing to do. -(define-obsolete-variable-alias 'ls-lisp-dired-ignore-case - 'ls-lisp-ignore-case "21.1") - (defcustom ls-lisp-ignore-case (memq ls-lisp-emulation '(MS-Windows MacOS)) "Non-nil causes ls-lisp alphabetic sorting to ignore case." commit 92ec08bc46b8732283ea08456942811a27f5b7bd Author: Eli Zaretskii Date: Sun Jul 31 11:22:29 2022 +0300 Support keyboard input and display of U+1E9E * lisp/international/latin1-disp.el (latin1-display): * lisp/international/iso-transl.el (iso-transl-char-map) (iso-transl-language-alist): Add U+1E9E capital sharp S. diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index 90fdc06b1e..5e9fd69ea0 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -76,6 +76,7 @@ ("\"E" . [?Ë]) ("\"I" . [?Ï]) ("\"O" . [?Ö]) + ("\"S" . [?ẞ]) ("\"U" . [?Ü]) ("\"a" . [?ä]) ("\"e" . [?ë]) @@ -324,6 +325,7 @@ sequence VECTOR. (VECTOR is normally one character long.)") ("German" ("A" . [?Ä]) ("O" . [?Ö]) + ("S" . [?ẞ]) ("U" . [?Ü]) ("a" . [?ä]) ("o" . [?ö]) diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 7054077fb0..af75192793 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -124,6 +124,7 @@ display for all of `latin1-display-sets'. See also (?\™ "TM") ;; TRADE MARK SIGN (?\› ">") ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (?• "·") + (?ẞ "SS") ;; LATIN CAPITAL LETTER SHARP S ))) (setq latin1-display t)) (mapc #'latin1-display-reset latin1-display-sets) commit 57100e0a36f6b00670e8f8a003187783b50280c3 Author: Po Lu Date: Sun Jul 31 15:10:14 2022 +0800 ; * src/xterm.c (XTset_vertical_scroll_bar): Fix yet another typo. Reported by Lars Ingebrigtsen . diff --git a/src/xterm.c b/src/xterm.c index 9dc83ac84c..d7d4cb418f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -14929,7 +14929,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio } bar = x_scroll_bar_create (w, top, left, width, max (height, 1), false); -#ifndef USE_TOOKIT_SCROLL_BARS +#ifndef USE_TOOLKIT_SCROLL_BARS /* Since non-toolkit scroll bars don't display their contents to a dedicated window, no expose event will be generated. Redraw the scroll bar manually. */ commit d9bd334ef367f3e16967ae2ed714ff419f2b5328 Merge: 3d6af11c42 eb11dae499 Author: Stefan Kangas Date: Sun Jul 31 06:30:25 2022 +0200 Merge from origin/emacs-28 eb11dae499 Improve documentation of column-related functions c95a34c960 * src/macfont.m (macfont_open): Initialize font->space_wid... 31a6a37d45 Improve indexing of keymap variables commit 3d6af11c42453065d5ace1223fe99228b7927318 Author: Po Lu Date: Sun Jul 31 10:55:06 2022 +0800 Fix NS unexec build * nextstep/Makefile.in (all): Only build Emacs.pdmp on pdumper builds. * src/sheap.h: Make STATIC_HEAP_SIZE bigger, otherwise I get: static heap exhausted: avail 67108864 used 67101824 failed request 20480 diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in index 9c7059f2c0..ee883f3cff 100644 --- a/nextstep/Makefile.in +++ b/nextstep/Makefile.in @@ -45,7 +45,11 @@ ns_check_file = @ns_appdir@/@ns_check_file@ .PHONY: all -all: ${ns_appdir} ${ns_appbindir}/Emacs ${ns_applibexecdir}/Emacs.pdmp +ifeq ($(DUMPING),pdumper) +ns_pdump_target = ${ns_applibexecdir}/Emacs.pdmp +endif + +all: ${ns_appdir} ${ns_appbindir}/Emacs ${ns_pdmp_target} ${ns_check_file}: ${ns_appdir} diff --git a/src/sheap.h b/src/sheap.h index 9133f0b292..cef111bc2f 100644 --- a/src/sheap.h +++ b/src/sheap.h @@ -23,7 +23,7 @@ along with GNU Emacs. If not, see . */ /* Size of the static heap. Guess a value that is probably too large, by up to a factor of four or so. Typically the unused part is not paged in and so does not cost much. */ -enum { STATIC_HEAP_SIZE = sizeof (Lisp_Object) << 23 }; +enum { STATIC_HEAP_SIZE = sizeof (Lisp_Object) << 24 }; extern char bss_sbrk_buffer[STATIC_HEAP_SIZE]; extern char *max_bss_sbrk_ptr; commit b7f227ed8bece1a8fafd36ce5f0ee0d5913b6f8b Author: Po Lu Date: Sun Jul 31 10:42:51 2022 +0800 ; * src/xterm.c (XTset_vertical_scroll_bar): Fix typo in last change. diff --git a/src/xterm.c b/src/xterm.c index 6dd3aad0e0..9dc83ac84c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -14929,7 +14929,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio } bar = x_scroll_bar_create (w, top, left, width, max (height, 1), false); -#ifdef USE_TOOKIT_SCROLL_BARS +#ifndef USE_TOOKIT_SCROLL_BARS /* Since non-toolkit scroll bars don't display their contents to a dedicated window, no expose event will be generated. Redraw the scroll bar manually. */ commit a66e6542769eae039aba57644eca2d6afcbe3360 Author: Po Lu Date: Sun Jul 31 10:41:58 2022 +0800 Fix frame synchronization with scroll bar movement * src/xfns.c (x_set_inhibit_double_buffering): Stop condeming scroll bars. * src/xterm.c (x_scroll_bar_create): Create an InputOnly window. Update event masks accordingly and stop allocating back buffer. (x_scroll_bar_remove): Stop deallocating back buffer. (XTset_vertical_scroll_bar, x_scroll_bar_set_handle): Draw onto the edit window so they can be synchronized with buffer flips. (x_scroll_bar_clear): Redraw scroll bars instead of just clearing them. (x_scroll_bar_handle_expose, x_scroll_bar_redraw): New functions. (x_scroll_bar_expose, x_scroll_bar_end_update): Delete functions. (handle_one_xevent): Update exposure logic accordingly. * src/xterm.h (struct scroll_bar): Remove `x_drawable' field. diff --git a/src/xfns.c b/src/xfns.c index 579237068a..1ae615fad4 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -838,21 +838,9 @@ x_set_inhibit_double_buffering (struct frame *f, block_input (); if (want_double_buffering != was_double_buffered) - { - /* Force XftDraw etc to be recreated with the new double - buffered drawable. */ - font_drop_xrender_surfaces (f); - - /* Scroll bars decide whether or not to use a back buffer - based on the value of this frame parameter, so destroy - all scroll bars. */ -#ifndef USE_TOOLKIT_SCROLL_BARS - if (FRAME_TERMINAL (f)->condemn_scroll_bars_hook) - FRAME_TERMINAL (f)->condemn_scroll_bars_hook (f); - if (FRAME_TERMINAL (f)->judge_scroll_bars_hook) - FRAME_TERMINAL (f)->judge_scroll_bars_hook (f); -#endif - } + /* Force XftDraw etc to be recreated with the new double + buffered drawable. */ + font_drop_xrender_surfaces (f); if (FRAME_X_DOUBLE_BUFFERED_P (f) && !want_double_buffering) tear_down_x_back_buffer (f); else if (!FRAME_X_DOUBLE_BUFFERED_P (f) && want_double_buffering) diff --git a/src/xterm.c b/src/xterm.c index dc9637d35c..6dd3aad0e0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1129,10 +1129,6 @@ static void x_initialize (void); static bool x_get_current_wm_state (struct frame *, Window, int *, bool *, bool *); static void x_update_opaque_region (struct frame *, XEvent *); -#if !defined USE_TOOLKIT_SCROLL_BARS && defined HAVE_XDBE -static void x_scroll_bar_end_update (struct x_display_info *, struct scroll_bar *); -#endif - #ifdef HAVE_X_I18N static int x_filter_event (struct x_display_info *, XEvent *); #endif @@ -1142,6 +1138,10 @@ static struct frame *x_tooltip_window_to_frame (struct x_display_info *, Window, bool *); static Window x_get_window_below (Display *, Window, int, int, int *, int *); +#ifndef USE_TOOLKIT_SCROLL_BARS +static void x_scroll_bar_redraw (struct scroll_bar *); +#endif + /* Global state maintained during a drag-and-drop operation. */ /* Flag that indicates if a drag-and-drop operation is in progress. */ @@ -14627,20 +14627,12 @@ x_scroll_bar_create (struct window *w, int top, int left, XSetWindowAttributes a; unsigned long mask; Window window; -#ifdef HAVE_XDBE - Drawable drawable; -#endif - - a.background_pixel = f->output_data.x->scroll_bar_background_pixel; - if (a.background_pixel == -1) - a.background_pixel = FRAME_BACKGROUND_PIXEL (f); a.event_mask = (ButtonPressMask | ButtonReleaseMask - | ButtonMotionMask | PointerMotionHintMask - | ExposureMask); + | ButtonMotionMask | PointerMotionHintMask); a.cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; - mask = (CWBackPixel | CWEventMask | CWCursor); + mask = (CWEventMask | CWCursor); /* Clear the area of W that will serve as a scroll bar. This is for the case that a window has been split horizontally. In @@ -14648,32 +14640,22 @@ x_scroll_bar_create (struct window *w, int top, int left, if (width > 0 && window_box_height (w) > 0) x_clear_area (f, left, top, width, window_box_height (w)); + /* Create an input only window. Scroll bar contents are drawn to + the frame window itself, so they can be double buffered and + synchronized using the same mechanism as the frame. */ window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), /* Position and size of scroll bar. */ left, top, width, height, - /* Border width, depth, class, and visual. */ + /* Border width. */ 0, + /* Depth. */ CopyFromParent, - CopyFromParent, + /* Class. */ + InputOnly, + /* Visual class. */ CopyFromParent, /* Attributes. */ mask, &a); -#ifdef HAVE_XDBE - if (FRAME_DISPLAY_INFO (f)->supports_xdbe - && FRAME_X_DOUBLE_BUFFERED_P (f)) - { - x_catch_errors (FRAME_X_DISPLAY (f)); - drawable = XdbeAllocateBackBufferName (FRAME_X_DISPLAY (f), - window, XdbeCopied); - if (x_had_errors_p (FRAME_X_DISPLAY (f))) - drawable = window; - else - XSetWindowBackgroundPixmap (FRAME_X_DISPLAY (f), window, None); - x_uncatch_errors_after_check (); - } - else - drawable = window; -#endif #ifdef HAVE_XINPUT2 /* Ask for input extension button and motion events. This lets us @@ -14700,9 +14682,6 @@ x_scroll_bar_create (struct window *w, int top, int left, #endif bar->x_window = window; -#ifdef HAVE_XDBE - bar->x_drawable = drawable; -#endif } #endif /* not USE_TOOLKIT_SCROLL_BARS */ @@ -14775,14 +14754,11 @@ static void x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, bool rebuild) { - bool dragging = bar->dragging != -1; -#ifndef HAVE_XDBE - Window w = bar->x_window; -#else - Drawable w = bar->x_drawable; -#endif - struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); - GC gc = f->output_data.x->normal_gc; + bool dragging; + struct frame *f; + Drawable w; + GC gc; + int inside_width, inside_height, top_range, length; /* If the display is already accurate, do nothing. */ if (! rebuild @@ -14790,106 +14766,102 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, && end == bar->end) return; - block_input (); - - { - int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, bar->width); - int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, bar->height); - int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); + f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); + dragging = bar->dragging != -1; + gc = f->output_data.x->normal_gc; + w = FRAME_X_DRAWABLE (f); - /* Make sure the values are reasonable, and try to preserve - the distance between start and end. */ - { - int length = end - start; + block_input (); - if (start < 0) - start = 0; - else if (start > top_range) - start = top_range; - end = start + length; + inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, bar->width); + inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, bar->height); + top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); - if (end < start) - end = start; - else if (end > top_range && ! dragging) - end = top_range; - } + /* Make sure the values are reasonable, and try to preserve + the distance between start and end. */ + length = end - start; - /* Store the adjusted setting in the scroll bar. */ - bar->start = start; - bar->end = end; + if (start < 0) + start = 0; + else if (start > top_range) + start = top_range; + end = start + length; - /* Clip the end position, just for display. */ - if (end > top_range) - end = top_range; + if (end < start) + end = start; + else if (end > top_range && ! dragging) + end = top_range; - /* Draw bottom positions VERTICAL_SCROLL_BAR_MIN_HANDLE pixels - below top positions, to make sure the handle is always at least - that many pixels tall. */ - end += VERTICAL_SCROLL_BAR_MIN_HANDLE; + /* Store the adjusted setting in the scroll bar. */ + bar->start = start; + bar->end = end; - /* Draw the empty space above the handle. Note that we can't clear - zero-height areas; that means "clear to end of window." */ - if ((inside_width > 0) && (start > 0)) - { - if (f->output_data.x->scroll_bar_background_pixel != -1) - XSetForeground (FRAME_X_DISPLAY (f), gc, - f->output_data.x->scroll_bar_background_pixel); - else - XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_BACKGROUND_PIXEL (f)); + /* Clip the end position, just for display. */ + if (end > top_range) + end = top_range; - XFillRectangle (FRAME_X_DISPLAY (f), w, gc, - VERTICAL_SCROLL_BAR_LEFT_BORDER, - VERTICAL_SCROLL_BAR_TOP_BORDER, - inside_width, start); + /* Draw bottom positions VERTICAL_SCROLL_BAR_MIN_HANDLE pixels + below top positions, to make sure the handle is always at least + that many pixels tall. */ + end += VERTICAL_SCROLL_BAR_MIN_HANDLE; + /* Draw the empty space above the handle. Note that we can't clear + zero-height areas; that means "clear to end of window." */ + if ((inside_width > 0) && (start > 0)) + { + if (f->output_data.x->scroll_bar_background_pixel != -1) XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_FOREGROUND_PIXEL (f)); - } + f->output_data.x->scroll_bar_background_pixel); + else + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_BACKGROUND_PIXEL (f)); - /* Change to proper foreground color if one is specified. */ - if (f->output_data.x->scroll_bar_foreground_pixel != -1) - XSetForeground (FRAME_X_DISPLAY (f), gc, - f->output_data.x->scroll_bar_foreground_pixel); + XFillRectangle (FRAME_X_DISPLAY (f), w, gc, + bar->left + VERTICAL_SCROLL_BAR_LEFT_BORDER, + bar->top + VERTICAL_SCROLL_BAR_TOP_BORDER, + inside_width, start); - /* Draw the handle itself. */ - XFillRectangle (FRAME_X_DISPLAY (f), w, gc, - /* x, y, width, height */ - VERTICAL_SCROLL_BAR_LEFT_BORDER, - VERTICAL_SCROLL_BAR_TOP_BORDER + start, - inside_width, end - start); + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_FOREGROUND_PIXEL (f)); + } + /* Change to proper foreground color if one is specified. */ + if (f->output_data.x->scroll_bar_foreground_pixel != -1) + XSetForeground (FRAME_X_DISPLAY (f), gc, + f->output_data.x->scroll_bar_foreground_pixel); - /* Draw the empty space below the handle. Note that we can't - clear zero-height areas; that means "clear to end of window." */ - if ((inside_width > 0) && (end < inside_height)) - { - if (f->output_data.x->scroll_bar_background_pixel != -1) - XSetForeground (FRAME_X_DISPLAY (f), gc, - f->output_data.x->scroll_bar_background_pixel); - else - XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_BACKGROUND_PIXEL (f)); + /* Draw the handle itself. */ + XFillRectangle (FRAME_X_DISPLAY (f), w, gc, + /* x, y, width, height */ + bar->left + VERTICAL_SCROLL_BAR_LEFT_BORDER, + bar->top + VERTICAL_SCROLL_BAR_TOP_BORDER + start, + inside_width, end - start); - XFillRectangle (FRAME_X_DISPLAY (f), w, gc, - VERTICAL_SCROLL_BAR_LEFT_BORDER, - VERTICAL_SCROLL_BAR_TOP_BORDER + end, - inside_width, inside_height - end); + /* Draw the empty space below the handle. Note that we can't + clear zero-height areas; that means "clear to end of window." */ + if ((inside_width > 0) && (end < inside_height)) + { + if (f->output_data.x->scroll_bar_background_pixel != -1) XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_FOREGROUND_PIXEL (f)); - } + f->output_data.x->scroll_bar_background_pixel); + else + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_BACKGROUND_PIXEL (f)); + + XFillRectangle (FRAME_X_DISPLAY (f), w, gc, + bar->left + VERTICAL_SCROLL_BAR_LEFT_BORDER, + bar->top + VERTICAL_SCROLL_BAR_TOP_BORDER + end, + inside_width, inside_height - end); - /* Restore the foreground color of the GC if we changed it above. */ - if (f->output_data.x->scroll_bar_foreground_pixel != -1) XSetForeground (FRAME_X_DISPLAY (f), gc, FRAME_FOREGROUND_PIXEL (f)); - } + } -#ifdef HAVE_XDBE - if (!rebuild) - x_scroll_bar_end_update (FRAME_DISPLAY_INFO (f), bar); -#endif + /* Restore the foreground color of the GC if we changed it above. */ + if (f->output_data.x->scroll_bar_foreground_pixel != -1) + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_FOREGROUND_PIXEL (f)); unblock_input (); } @@ -14912,11 +14884,6 @@ x_scroll_bar_remove (struct scroll_bar *bar) XtDestroyWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar)); #endif /* not USE_GTK */ #else -#ifdef HAVE_XDBE - if (bar->x_window != bar->x_drawable) - XdbeDeallocateBackBufferName (FRAME_X_DISPLAY (f), - bar->x_drawable); -#endif XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window); #endif @@ -14962,6 +14929,12 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio } bar = x_scroll_bar_create (w, top, left, width, max (height, 1), false); +#ifdef USE_TOOKIT_SCROLL_BARS + /* Since non-toolkit scroll bars don't display their contents to + a dedicated window, no expose event will be generated. + Redraw the scroll bar manually. */ + x_scroll_bar_redraw (bar); +#endif } else { @@ -15021,6 +14994,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio bar->width = width; bar->height = height; +#ifndef USE_TOOLKIT_SCROLL_BARS + /* Redraw the scroll bar. */ + x_scroll_bar_redraw (bar); +#endif + unblock_input (); } @@ -15328,60 +15306,84 @@ XTjudge_scroll_bars (struct frame *f) #ifndef USE_TOOLKIT_SCROLL_BARS -/* Handle an Expose or GraphicsExpose event on a scroll bar. This - is a no-op when using toolkit scroll bars. - - This may be called from a signal handler, so we have to ignore GC - mark bits. */ +/* Handle exposure event EVENT generated for F, by redrawing all + intersecting scroll bars. */ static void -x_scroll_bar_expose (struct scroll_bar *bar, const XEvent *event) +x_scroll_bar_handle_exposure (struct frame *f, XEvent *event) { -#ifndef HAVE_XDBE - Window w = bar->x_window; -#else - Drawable w = bar->x_drawable; int x, y, width, height; + XRectangle rect, scroll_bar_rect, intersection; + Lisp_Object bar, condemned; + struct scroll_bar *b; - if (event->type == Expose) + if (event->type == GraphicsExpose) + { + x = event->xgraphicsexpose.x; + y = event->xgraphicsexpose.y; + width = event->xgraphicsexpose.width; + height = event->xgraphicsexpose.height; + } + else { x = event->xexpose.x; y = event->xexpose.y; width = event->xexpose.width; height = event->xexpose.height; } - else + + rect.x = x; + rect.y = y; + rect.width = width; + rect.height = height; + + /* Scan this frame's scroll bar list for intersecting scroll + bars. */ + condemned = FRAME_CONDEMNED_SCROLL_BARS (f); + for (bar = FRAME_SCROLL_BARS (f); + /* This trick allows us to search both the ordinary and + condemned scroll bar lists with one loop. */ + !NILP (bar) || (bar = condemned, + condemned = Qnil, + !NILP (bar)); + bar = XSCROLL_BAR (bar)->next) { - x = event->xgraphicsexpose.x; - y = event->xgraphicsexpose.y; - width = event->xgraphicsexpose.width; - height = event->xgraphicsexpose.height; + b = XSCROLL_BAR (bar); + + scroll_bar_rect.x = b->left; + scroll_bar_rect.y = b->top; + scroll_bar_rect.width = b->width; + scroll_bar_rect.height = b->height; + + if (gui_intersect_rectangles (&rect, + &scroll_bar_rect, + &intersection)) + x_scroll_bar_redraw (b); } -#endif +} + +/* Redraw the scroll bar BAR. Draw its border and set its thumb. + This is usually called from x_clear_frame, but is also used to + handle exposure events that overlap scroll bars. */ +static void +x_scroll_bar_redraw (struct scroll_bar *bar) +{ struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); GC gc = f->output_data.x->normal_gc; - block_input (); - -#ifdef HAVE_XDBE - if (w != bar->x_window) - { - if (f->output_data.x->scroll_bar_background_pixel != -1) - XSetForeground (FRAME_X_DISPLAY (f), gc, - f->output_data.x->scroll_bar_background_pixel); - else - XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_BACKGROUND_PIXEL (f)); + if (f->output_data.x->scroll_bar_background_pixel != -1) + XSetForeground (FRAME_X_DISPLAY (f), gc, + f->output_data.x->scroll_bar_background_pixel); + else + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_BACKGROUND_PIXEL (f)); - XFillRectangle (FRAME_X_DISPLAY (f), - bar->x_drawable, - gc, x, y, width, height); + XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f), gc, + bar->left, bar->top, bar->width, bar->height); - XSetForeground (FRAME_X_DISPLAY (f), gc, - FRAME_FOREGROUND_PIXEL (f)); - } -#endif + XSetForeground (FRAME_X_DISPLAY (f), gc, + FRAME_FOREGROUND_PIXEL (f)); x_scroll_bar_set_handle (bar, bar->start, bar->end, true); @@ -15391,27 +15393,13 @@ x_scroll_bar_expose (struct scroll_bar *bar, const XEvent *event) f->output_data.x->scroll_bar_foreground_pixel); /* Draw a one-pixel border just inside the edges of the scroll bar. */ - XDrawRectangle (FRAME_X_DISPLAY (f), w, gc, - /* x, y, width, height */ - 0, 0, bar->width - 1, bar->height - 1); - - /* XDrawPoint (FRAME_X_DISPLAY (f), w, gc, - bar->width - 1, bar->height - 1); - - This code is no longer required since the normal GC now uses the - regular line width. */ + XDrawRectangle (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f), gc, + bar->left, bar->top, bar->width - 1, bar->height - 1); /* Restore the foreground color of the GC if we changed it above. */ if (f->output_data.x->scroll_bar_foreground_pixel != -1) XSetForeground (FRAME_X_DISPLAY (f), gc, FRAME_FOREGROUND_PIXEL (f)); - -#ifdef HAVE_XDBE - x_scroll_bar_end_update (FRAME_DISPLAY_INFO (f), bar); -#endif - - unblock_input (); - } #endif /* not USE_TOOLKIT_SCROLL_BARS */ @@ -15552,24 +15540,6 @@ x_scroll_bar_note_movement (struct scroll_bar *bar, } } -#ifdef HAVE_XDBE -static void -x_scroll_bar_end_update (struct x_display_info *dpyinfo, - struct scroll_bar *bar) -{ - XdbeSwapInfo swap_info; - - /* This means the scroll bar is double-buffered. */ - if (bar->x_drawable != bar->x_window) - { - memset (&swap_info, 0, sizeof swap_info); - swap_info.swap_window = bar->x_window; - swap_info.swap_action = XdbeCopied; - XdbeSwapBuffers (dpyinfo->display, &swap_info, 1); - } -} -#endif - #endif /* !USE_TOOLKIT_SCROLL_BARS */ /* Return information to the user about the current position of the mouse @@ -15710,17 +15680,15 @@ x_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_windo } -/* The screen has been cleared so we may have changed foreground or - background colors, and the scroll bars may need to be redrawn. - Clear out the scroll bars, and ask for expose events, so we can - redraw them. */ +/* The screen has been cleared and foreground or background colors may + have changed, so the scroll bars need to be redrawn. Clear the + scroll bars and redraw them. */ static void x_scroll_bar_clear (struct frame *f) { #ifndef USE_TOOLKIT_SCROLL_BARS - Lisp_Object bar; -#ifdef HAVE_XDBE + Lisp_Object bar, condemned; GC gc = f->output_data.x->normal_gc; if (f->output_data.x->scroll_bar_background_pixel != -1) @@ -15729,35 +15697,25 @@ x_scroll_bar_clear (struct frame *f) else XSetForeground (FRAME_X_DISPLAY (f), gc, FRAME_BACKGROUND_PIXEL (f)); -#endif /* We can have scroll bars even if this is 0, if we just turned off scroll bar mode. But in that case we should not clear them. */ if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)) - for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar); - bar = XSCROLL_BAR (bar)->next) - { -#ifdef HAVE_XDBE - if (XSCROLL_BAR (bar)->x_window - == XSCROLL_BAR (bar)->x_drawable) -#endif - XClearArea (FRAME_X_DISPLAY (f), - XSCROLL_BAR (bar)->x_window, - 0, 0, 0, 0, True); -#ifdef HAVE_XDBE - else - XFillRectangle (FRAME_X_DISPLAY (f), - XSCROLL_BAR (bar)->x_drawable, - gc, 0, 0, XSCROLL_BAR (bar)->width, - XSCROLL_BAR (bar)->height); -#endif - } + { + condemned = FRAME_CONDEMNED_SCROLL_BARS (f); + for (bar = FRAME_SCROLL_BARS (f); + /* This trick allows us to search both the ordinary and + condemned scroll bar lists with one loop. */ + !NILP (bar) || (bar = condemned, + condemned = Qnil, + !NILP (bar)); + bar = XSCROLL_BAR (bar)->next) + x_scroll_bar_redraw (XSCROLL_BAR (bar)); + } -#ifdef HAVE_XDBE XSetForeground (FRAME_X_DISPLAY (f), gc, FRAME_FOREGROUND_PIXEL (f)); -#endif #endif /* not USE_TOOLKIT_SCROLL_BARS */ } @@ -17643,7 +17601,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!FRAME_GARBAGED_P (f)) { -#ifdef USE_X_TOOLKIT +#if defined USE_X_TOOLKIT && defined USE_TOOLKIT_SCROLL_BARS if (f->output_data.x->edit_widget) /* The widget's expose proc will be run in this case. */ @@ -17658,10 +17616,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif expose_frame (f, event->xexpose.x, event->xexpose.y, event->xexpose.width, event->xexpose.height); +#ifndef USE_TOOLKIT_SCROLL_BARS + x_scroll_bar_handle_exposure (f, (XEvent *) event); +#endif #ifdef USE_GTK x_clear_under_internal_border (f); #endif } +#ifndef USE_TOOLKIT_SCROLL_BARS + else + x_scroll_bar_handle_exposure (f, (XEvent *) event); +#endif #ifdef HAVE_XDBE if (!FRAME_GARBAGED_P (f)) @@ -17670,9 +17635,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, } else { -#ifndef USE_TOOLKIT_SCROLL_BARS - struct scroll_bar *bar; -#endif #if defined USE_LUCID /* Submenus of the Lucid menu bar aren't widgets themselves, so there's no way to dispatch events @@ -17684,20 +17646,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, } #endif /* USE_LUCID */ -#ifdef USE_TOOLKIT_SCROLL_BARS /* Dispatch event to the widget. */ goto OTHER; -#else /* not USE_TOOLKIT_SCROLL_BARS */ - bar = x_window_to_scroll_bar (event->xexpose.display, - event->xexpose.window, 2); - - if (bar) - x_scroll_bar_expose (bar, event); -#ifdef USE_X_TOOLKIT - else - goto OTHER; -#endif /* USE_X_TOOLKIT */ -#endif /* not USE_TOOLKIT_SCROLL_BARS */ } break; @@ -17711,6 +17661,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, event->xgraphicsexpose.y, event->xgraphicsexpose.width, event->xgraphicsexpose.height); +#ifndef USE_TOOLKIT_SCROLL_BARS + x_scroll_bar_handle_exposure (f, (XEvent *) event); +#endif #ifdef USE_GTK x_clear_under_internal_border (f); #endif @@ -17718,16 +17671,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, show_back_buffer (f); #endif } -#ifndef USE_TOOLKIT_SCROLL_BARS - struct scroll_bar *bar - = x_window_to_scroll_bar (dpyinfo->display, - /* Hopefully this is just a window, - not the back buffer. */ - event->xgraphicsexpose.drawable, 2); - - if (bar) - x_scroll_bar_expose (bar, event); -#endif #ifdef USE_X_TOOLKIT else goto OTHER; diff --git a/src/xterm.h b/src/xterm.h index 2e3d0950d9..2b8a2e5da4 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1282,11 +1282,6 @@ struct scroll_bar /* The X window representing this scroll bar. */ Window x_window; -#if defined HAVE_XDBE && !defined USE_TOOLKIT_SCROLL_BARS - /* The X drawable representing this scroll bar. */ - Drawable x_drawable; -#endif - /* The position and size of the scroll bar in pixels, relative to the frame. */ int top, left, width, height; commit 88d719e95b76ccb38e4a39b24729d5b3d9514118 Author: Stefan Kangas Date: Sun Jul 31 01:50:38 2022 +0200 ; Silence byte-compiler in two tests * test/lisp/subr-tests.el (test-print-unreadable-function): * test/src/print-tests.el (test-print-unreadable-function-buffer): Pacify byte-compiler. diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 08f08f0466..bc11e6f3c7 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1044,7 +1044,8 @@ final or penultimate step during initialization.")) ;; Check that problem with unwinding properly is fixed (bug#56773). (with-temp-buffer (let ((buf (current-buffer))) - (readablep (make-marker)) + (let ((_ (readablep (make-marker)))) nil) ; this `let' silences a + ; warning (should (eq buf (current-buffer)))))) (ert-deftest test-string-lines () diff --git a/test/src/print-tests.el b/test/src/print-tests.el index 37ee21af6b..b503bdeb99 100644 --- a/test/src/print-tests.el +++ b/test/src/print-tests.el @@ -536,7 +536,8 @@ otherwise, use a different charset." (let ((print-unreadable-function (lambda (_object _escape) (setq callback-buffer (current-buffer))))) - (prin1-to-string (make-marker))) + (let ((_ (prin1-to-string (make-marker)))) nil)) ; this `let' silences a + ; warning (should (eq current callback-buffer))))) (provide 'print-tests) commit 5b29f8cd98c014b4b3e5844ef128ba97e65ea036 Author: Stefan Kangas Date: Sun Jul 31 01:44:22 2022 +0200 Delete redisplay-end-trigger-functions and related defuns This variable and related functions have been obsolete since 23.1. The last things to depend on this (fast-lock.el and lazy-lock.el) were recently removed. * src/dispextern.h (struct it): Delete field 'redisplay_end_trigger_charpos'. * src/window.c (Fwindow_redisplay_end_trigger) (Fset_window_redisplay_end_trigger): Delete defuns and corresponding defsubrs for functions obsolete since 23.1. * src/window.h (wset_redisplay_end_trigger): Delete function. (GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'. * src/xdisp.c (run_redisplay_end_trigger_hook): Delete function. (syms_of_xdisp) : Delete variable obsolete since 23.1. (init_iterator, next_element_from_buffer): Don't run or set above deleted hook variable. * lisp/subr.el: Delete obsoletion definitions for above deleted defuns and variable. * doc/lispref/hooks.texi (Standard Hooks): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/loadhist.el (unload-feature-special-hooks): Don't mention above deleted variable. * admin/coccinelle/window.cocci: Adjust for above changes. diff --git a/admin/coccinelle/window.cocci b/admin/coccinelle/window.cocci index 1448febfcc..4543fb2ce1 100644 --- a/admin/coccinelle/window.cocci +++ b/admin/coccinelle/window.cocci @@ -106,9 +106,6 @@ Lisp_Object O; - W->column_number_displayed + WVAR (W, column_number_displayed) | -- W->redisplay_end_trigger -+ WVAR (W, redisplay_end_trigger) -| - W->combination_limit + WVAR (W, combination_limit) | @@ -225,9 +222,6 @@ Lisp_Object O; - XWINDOW (O)->column_number_displayed + WVAR (XWINDOW (O), column_number_displayed) | -- XWINDOW (O)->redisplay_end_trigger -+ WVAR (XWINDOW (O), redisplay_end_trigger) -| - XWINDOW (O)->combination_limit + WVAR (XWINDOW (O), combination_limit) | diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index 59b7930732..339e1387d2 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -280,7 +280,6 @@ kbd-macro-termination-hook signal-hook-function C functions: -redisplay-end-trigger-functions x-lost-selection-functions x-sent-selection-functions diff --git a/etc/NEWS b/etc/NEWS index e74f60780f..489948214d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2452,8 +2452,9 @@ but switching to `ash` is generally much preferable. --- ** Some functions and variables obsolete since Emacs 23 have been removed: 'find-emacs-lisp-shadows', 'newsticker-cache-filename', +'redisplay-end-trigger-functions', 'set-window-redisplay-end-trigger', 'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode', -'vc-arch-command'. +'vc-arch-command', 'window-redisplay-end-trigger'. +++ ** New generic function 'function-documentation'. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 9817fa0eb1..7a4bbf2e8a 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1471,7 +1471,7 @@ See Info node `(elisp) Integer Basics'." window-next-buffers window-next-sibling window-new-normal window-new-total window-normal-size window-parameter window-parameters window-parent window-pixel-edges window-point window-prev-buffers - window-prev-sibling window-redisplay-end-trigger window-scroll-bars + window-prev-sibling window-scroll-bars window-start window-text-height window-top-child window-top-line window-total-height window-total-width window-use-time window-vscroll window-width zerop)) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 39481ab068..b4ed043246 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -128,7 +128,7 @@ from a file." font-lock-unfontify-region-function kill-buffer-query-functions kill-emacs-query-functions lisp-indent-function mouse-position-function - redisplay-end-trigger-functions suspend-tty-functions + suspend-tty-functions temp-buffer-show-function window-scroll-functions window-size-change-functions write-contents-functions write-file-functions write-region-annotate-functions) diff --git a/lisp/subr.el b/lisp/subr.el index c220a7f4a8..1a16d78117 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1860,10 +1860,7 @@ be a list of the form returned by `event-start' and `event-end'." ;;;; Obsolescence declarations for variables, and aliases. -(make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") (make-obsolete-variable 'redisplay-dont-pause nil "24.5") -(make-obsolete 'window-redisplay-end-trigger nil "23.1") -(make-obsolete 'set-window-redisplay-end-trigger nil "23.1") (make-obsolete-variable 'operating-system-release nil "28.1") (make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1") diff --git a/src/dispextern.h b/src/dispextern.h index 817211e795..037e02ff58 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2350,9 +2350,6 @@ struct it used for overlay strings and strings from display properties. */ ptrdiff_t string_nchars; - /* Position at which redisplay end trigger functions should be run. */ - ptrdiff_t redisplay_end_trigger_charpos; - /* True means multibyte characters are enabled. */ bool_bf multibyte_p : 1; diff --git a/src/window.c b/src/window.c index 33a1b8a4bf..afb8f75537 100644 --- a/src/window.c +++ b/src/window.c @@ -1300,31 +1300,6 @@ window so that the location of point moves off-window. */) return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol)); } -DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger, - Swindow_redisplay_end_trigger, 0, 1, 0, - doc: /* Return WINDOW's redisplay end trigger value. -WINDOW must be a live window and defaults to the selected one. -See `set-window-redisplay-end-trigger' for more information. */) - (Lisp_Object window) -{ - return decode_live_window (window)->redisplay_end_trigger; -} - -DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger, - Sset_window_redisplay_end_trigger, 2, 2, 0, - doc: /* Set WINDOW's redisplay end trigger value to VALUE. -WINDOW must be a live window and defaults to the selected one. VALUE -should be a buffer position (typically a marker) or nil. If it is a -buffer position, then if redisplay in WINDOW reaches a position beyond -VALUE, the functions in `redisplay-end-trigger-functions' are called -with two arguments: WINDOW, and the end trigger value. Afterwards the -end-trigger value is reset to nil. */) - (register Lisp_Object window, Lisp_Object value) -{ - wset_redisplay_end_trigger (decode_live_window (window), value); - return value; -} - /* Test if the character at column X, row Y is within window W. If it is not, return ON_NOTHING; if it is on the window's vertical divider, return @@ -8640,8 +8615,6 @@ displayed after a scrolling operation to be somewhat inaccurate. */); defsubr (&Swindow_body_width); defsubr (&Swindow_hscroll); defsubr (&Sset_window_hscroll); - defsubr (&Swindow_redisplay_end_trigger); - defsubr (&Sset_window_redisplay_end_trigger); defsubr (&Swindow_mode_line_height); defsubr (&Swindow_header_line_height); defsubr (&Swindow_tab_line_height); diff --git a/src/window.h b/src/window.h index c63b1b24d4..93817a9544 100644 --- a/src/window.h +++ b/src/window.h @@ -199,10 +199,6 @@ struct window and Qt, so bitfield can't be used here. */ Lisp_Object dedicated; - /* If redisplay in this window goes beyond this buffer position, - must run the redisplay-end-trigger-hook. */ - Lisp_Object redisplay_end_trigger; - /* t means this window's child windows are not (re-)combined. */ Lisp_Object combination_limit; @@ -497,12 +493,6 @@ wset_prev (struct window *w, Lisp_Object val) w->prev = val; } -INLINE void -wset_redisplay_end_trigger (struct window *w, Lisp_Object val) -{ - w->redisplay_end_trigger = val; -} - INLINE void wset_mode_line_help_echo (struct window *w, Lisp_Object val) { diff --git a/src/xdisp.c b/src/xdisp.c index b1ee7889d4..88a489e290 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1138,7 +1138,6 @@ static int display_string (const char *, Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int); static void compute_line_metrics (struct it *); -static void run_redisplay_end_trigger_hook (struct it *); static bool get_overlay_strings (struct it *, ptrdiff_t); static bool get_overlay_strings_1 (struct it *, ptrdiff_t, bool); static void next_overlay_string (struct it *); @@ -3279,17 +3278,6 @@ init_iterator (struct it *it, struct window *w, /* Are multibyte characters enabled in current_buffer? */ it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); - /* Get the position at which the redisplay_end_trigger hook should - be run, if it is to be run at all. */ - if (MARKERP (w->redisplay_end_trigger) - && XMARKER (w->redisplay_end_trigger)->buffer != 0) - it->redisplay_end_trigger_charpos - = marker_position (w->redisplay_end_trigger); - else if (FIXNUMP (w->redisplay_end_trigger)) - it->redisplay_end_trigger_charpos - = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (w->redisplay_end_trigger), - PTRDIFF_MAX); - it->tab_width = SANE_TAB_WIDTH (current_buffer); /* Are lines in the display truncated? */ @@ -9430,13 +9418,6 @@ next_element_from_buffer (struct it *it) previously seen overlays is no longer valid. */ it->ignore_overlay_strings_at_pos_p = false; - /* Maybe run the redisplay end trigger hook. Performance note: - This doesn't seem to cost measurable time. */ - if (it->redisplay_end_trigger_charpos - && it->glyph_row - && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos) - run_redisplay_end_trigger_hook (it); - if (composition_break_at_point && !NILP (BVAR (current_buffer, enable_multibyte_characters)) && !NILP (Vauto_composition_mode)) @@ -9504,29 +9485,6 @@ next_element_from_buffer (struct it *it) } -/* Run the redisplay end trigger hook for IT. */ - -static void -run_redisplay_end_trigger_hook (struct it *it) -{ - /* IT->glyph_row should be non-null, i.e. we should be actually - displaying something, or otherwise we should not run the hook. */ - eassert (it->glyph_row); - - ptrdiff_t charpos = it->redisplay_end_trigger_charpos; - it->redisplay_end_trigger_charpos = 0; - - /* Since we are *trying* to run these functions, don't try to run - them again, even if they get an error. */ - wset_redisplay_end_trigger (it->w, Qnil); - CALLN (Frun_hook_with_args, Qredisplay_end_trigger_functions, it->window, - make_fixnum (charpos)); - - /* Notice if it changed the face of the character we are on. */ - handle_face_prop (it); -} - - /* Deliver a composition display element. Unlike the other next_element_from_XXX, this function is not registered in the array get_next_element[]. It is called from next_element_from_buffer and @@ -36129,7 +36087,6 @@ be let-bound around code that needs to disable messages temporarily. */); DEFSYM (Qoverriding_terminal_local_map, "overriding-terminal-local-map"); DEFSYM (Qoverriding_local_map, "overriding-local-map"); DEFSYM (Qwindow_scroll_functions, "window-scroll-functions"); - DEFSYM (Qredisplay_end_trigger_functions, "redisplay-end-trigger-functions"); DEFSYM (Qinhibit_point_motion_hooks, "inhibit-point-motion-hooks"); DEFSYM (Qeval, "eval"); DEFSYM (QCdata, ":data"); @@ -36533,12 +36490,6 @@ is scrolled. It is not designed for that, and such use probably won't work. */); Vwindow_scroll_functions = Qnil; - DEFVAR_LISP ("redisplay-end-trigger-functions", Vredisplay_end_trigger_functions, - doc: /* Functions called when redisplay of a window reaches the end trigger. -Each function is called with two arguments, the window and the end trigger value. -See `set-window-redisplay-end-trigger'. */); - Vredisplay_end_trigger_functions = Qnil; - DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, doc: /* Non-nil means autoselect window with mouse pointer. If nil, do not autoselect windows. commit a3d974d59f4c352724f5562f4cc53e8a8f6e8cab Author: Stefan Kangas Date: Sat Jul 30 12:52:15 2022 +0200 ; * etc/NEWS: Minor edits. diff --git a/etc/NEWS b/etc/NEWS index f7cfae30f3..e74f60780f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -160,7 +160,7 @@ the current Emacs version). This function can be called in your init files to change the user-specific directory where Emacs stores the "*.eln" files produced by native compilation of Lisp packages Emacs loads. The default -eln-cache directory is unchanged: it is the 'eln-cache' subdirectory +eln-cache directory is unchanged: it is the "eln-cache" subdirectory of 'user-emacs-directory'. @@ -204,7 +204,7 @@ is handled like all the other X resources, and set on a per-frame basis. Previously, this command did the same as 'e'. --- -** '/ a' in "*Packages*" buffer now limits by package name(s) instead of regexp. +** '/ a' in "*Packages*" buffer now limits by archive name(s) instead of regexp. +++ ** Setting the goal columns now also affects '' and ''. @@ -328,19 +328,25 @@ variable set to nil, as it will default to nil in a future Emacs version and will be removed some time after that. +++ -** Functions which recreate the "*scratch*" buffer now also initialize it. +** Functions that recreate the "*scratch*" buffer now also initialize it. When functions like 'other-buffer' and 'server-execute' recreate "*scratch*", they now also insert 'initial-scratch-message' and set the major mode according to 'initial-major-mode', like at Emacs startup. Previously, these functions ignored 'initial-scratch-message' and left "*scratch*" in 'fundamental-mode'. +--- +** The autoarg.el library is now marked obsolete. +This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor +modes to emulate the behavior of the historical editor Twenex Emacs. +It is believed to no longer be useful. + --- ** The quickurl.el library is now obsolete. -Use 'skeleton' or 'tempo' instead. +Use 'abbrev', 'skeleton' or 'tempo' instead. --- -** The rlogin.el library and 'rsh' command are now obsolete. +** The rlogin.el library, and the 'rsh' command are now obsolete. Use something like 'M-x shell RET ssh RET' instead. --- @@ -2192,13 +2198,7 @@ also been renamed: 'unread-bib' to 'bib-unread' --- -** The autoarg.el library is now marked obsolete. -This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor -modes to emulate the behavior of the historical editor Twenex Emacs. -It is believed to no longer be useful. - ---- -** proced.el shows system processes of remote hosts. +*** proced.el shows system processes of remote hosts. When 'default-directory' is remote, and 'proced' is invoked with a negative argument like 'C-u - proced', the system processes of that remote host are shown. Alternatively, the user option commit eb11dae499fc395bbf3d51883ced6244c91019cf Author: Eli Zaretskii Date: Sat Jul 30 19:34:38 2022 +0300 Improve documentation of column-related functions * doc/lispref/text.texi (Primitive Indent, Columns): * src/indent.c (Fcurrent_indentation, Fmove_to_column): Document that column counting ignores invisible text. (Bug#56837) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 6ac631ebbf..72fb674aa5 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2297,6 +2297,9 @@ begins. @xref{Usual Display}. amount of horizontal scrolling. Consequently, a column value can be arbitrarily high. The first (or leftmost) column is numbered 0. They also ignore overlays and text properties, aside from invisibility. +Invisible text is considered as having zero width, unless +@code{buffer-invisibility-spec} specifies that invisible text should +be displayed as ellipsis (@pxref{Invisible Text}). @defun current-column This function returns the horizontal position of point, measured in @@ -2370,6 +2373,10 @@ This function returns the indentation of the current line, which is the horizontal position of the first nonblank character. If the contents are entirely blank, then this is the horizontal position of the end of the line. + +This function considers invisible text as having zero width, unless +@code{buffer-invisibility-spec} specifies that invisible text should +be displayed as ellipsis. @xref{Invisible Text}. @end defun @deffn Command indent-to column &optional minimum diff --git a/src/indent.c b/src/indent.c index f5a2a078b9..5e33fc2e77 100644 --- a/src/indent.c +++ b/src/indent.c @@ -866,8 +866,10 @@ The return value is the column where the insertion ends. */) DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, 0, 0, 0, doc: /* Return the indentation of the current line. -This is the horizontal position of the character -following any initial whitespace. */) +This is the horizontal position of the character following any initial +whitespace. +Text that has an invisible property is considered as having width 0, unless +`buffer-invisibility-spec' specifies that it is replaced by an ellipsis. */) (void) { ptrdiff_t posbyte; @@ -985,6 +987,9 @@ as displayed of the previous characters in the line. This function ignores line-continuation; there is no upper limit on the column number a character can have and horizontal scrolling has no effect. +Text that has an invisible property is considered as having width 0, +unless `buffer-invisibility-spec' specifies that it is replaced by +an ellipsis. If specified column is within a character, point goes after that character. If it's past end of line, point goes to end of line. commit ff57f30bee778fe34bfbcc518ac9c326fbb9103e Author: Gerd Möllmann Date: Sat Jul 30 17:36:27 2022 +0200 ; Fix warnings from #pragma GCC iagnostic pop on macOS * src/comp.c: Add #pragma GCC diagnostic push in some places. diff --git a/src/comp.c b/src/comp.c index 81d27299fa..21d2ee5300 100644 --- a/src/comp.c +++ b/src/comp.c @@ -2626,6 +2626,7 @@ emit_maybe_gc_or_quit (Lisp_Object insn) /* This is in charge of serializing an object and export a function to retrieve it at load time. */ +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" static void emit_static_object (const char *name, Lisp_Object obj) @@ -4681,6 +4682,7 @@ DEFUN ("comp--release-ctxt", Fcomp__release_ctxt, Scomp__release_ctxt, return Qt; } +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" DEFUN ("comp-native-driver-options-effective-p", Fcomp_native_driver_options_effective_p, @@ -4697,6 +4699,7 @@ DEFUN ("comp-native-driver-options-effective-p", } #pragma GCC diagnostic pop +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" DEFUN ("comp-native-compiler-options-effective-p", Fcomp_native_compiler_options_effective_p, @@ -4943,6 +4946,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, return filename; } +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Waddress" DEFUN ("comp-libgccjit-version", Fcomp_libgccjit_version, Scomp_libgccjit_version, 0, 0, 0, commit 9e6eee36b5af2e2b719bca0279a063cfbeef2042 Author: Gerd Möllmann Date: Sat Jul 30 17:32:04 2022 +0200 Fix native compiler handling of narrow-to-region * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Use auto for byte-narrow-to-region. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 6e9132e430..4354ea03a4 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1915,11 +1915,7 @@ and the annotation emission." (byte-char-syntax auto) (byte-buffer-substring auto) (byte-delete-region auto) - (byte-narrow-to-region - (comp-emit-set-call (comp-call 'narrow-to-region - (comp-slot) - (comp-slot+1) - (make-comp-mvar :constant nil)))) + (byte-narrow-to-region auto) (byte-widen (comp-emit-set-call (comp-call 'widen))) (byte-end-of-line auto) commit 250dbaa7dd4072639724ef841ff5083127ede028 Author: Lars Ingebrigtsen Date: Sat Jul 30 15:56:49 2022 +0200 Tweak icons.el emoji detection * lisp/emacs-lisp/icons.el (icons--create): Choose another character that's unlikely to appear in non-Emoji fonts. (Comment left in place since this should be fixed in a less breakable way.) diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index c16bb96612..277b285c2e 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -207,7 +207,7 @@ present if the icon is represented by an image." (when-let ((font (and (display-multi-font-p) ;; FIXME: This is not enough for ensuring ;; display of color Emoji. - (car (internal-char-font nil ?😀))))) + (car (internal-char-font nil ?🟠))))) (and (font-has-char-p font (aref icon 0)) icon))) commit d34e38f7d14ff45c19102676dc53f5389e8f32f6 Author: Lars Ingebrigtsen Date: Sat Jul 30 15:36:16 2022 +0200 Make the symbol icons in outline.el more logical * lisp/outline.el (outline-open, outline-close): Use symbols from the same series so that it's more likely that they match up (bug#56823). diff --git a/lisp/outline.el b/lisp/outline.el index 1aba79784f..7750f9a75d 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -295,7 +295,7 @@ buffers (yet) -- that will be amended in a future version." (define-icon outline-open button '((emoji "▶️") - (symbol " ▶ ") + (symbol " ⯈ ") (text " open ")) "Icon used for buttons for opening a section in outline buffers." :version "29.1" @@ -303,7 +303,7 @@ buffers (yet) -- that will be amended in a future version." (define-icon outline-close button '((emoji "🔽") - (symbol " ▼ ") + (symbol " ⯆ ") (text " close ")) "Icon used for buttons for closing a section in outline buffers." :version "29.1" commit 76f49943c3baf1fa342889e08c5b6b86c2736437 Author: Eli Zaretskii Date: Sat Jul 30 16:11:43 2022 +0300 Make sure to preserve point across locked narrowing * src/editfns.c (Fnarrow_to_region): Save the position of point when locking the restriction, since this function can move point. diff --git a/src/editfns.c b/src/editfns.c index d15d4dc68b..79af27d24d 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2721,6 +2721,7 @@ the current body form. */) if (BEGV != s || ZV != e) current_buffer->clip_changed = 1; + record_unwind_protect (restore_point_unwind, Fpoint_marker ()); record_unwind_protect (unwind_locked_begv, Fpoint_min ()); record_unwind_protect (unwind_locked_zv, Fpoint_max ()); commit d92fb1592a02f7e34fb82069fc8d61d85dac8a48 Author: Mattias Engdegård Date: Sat Jul 30 15:06:43 2022 +0200 ; * lisp/emacs-lisp/icons.el (icon-preference): repair type diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index 00784c4d95..c16bb96612 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -49,10 +49,10 @@ on the current display, and \"degrade\" gracefully to an icon type that's available." :version "29.1" :group 'customize - :type '(repeat (const :tag "Images" image) - (const :tag "Colorful Emojis" emoji) - (const :tag "Monochrome Symbols" symbol) - (const :tag "Text Only" text))) + :type '(repeat (choice (const :tag "Images" image) + (const :tag "Colorful Emojis" emoji) + (const :tag "Monochrome Symbols" symbol) + (const :tag "Text Only" text)))) (defmacro define-icon (name parent specification documentation &rest keywords) "Define an icon identified by NAME. commit a5adcbdf28eb8ad376a1004f4a6c9eda1f1447fb Author: Gregory Heytings Date: Sat Jul 30 12:02:28 2022 +0000 Handle the optional argument of 'narrow-to-region' in byte-compiled code. * lisp/emacs-lisp/bytecomp.el: Adapt the specifications. * src/bytecode.c (exec_byte_code): Get the optional argument. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b4954eee9f..1ecd77f751 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -767,7 +767,7 @@ Each element is (INDEX . VALUE)") (byte-defop 122 0 byte-char-syntax) (byte-defop 123 -1 byte-buffer-substring) (byte-defop 124 -1 byte-delete-region) -(byte-defop 125 -1 byte-narrow-to-region) +(byte-defop 125 -2 byte-narrow-to-region) (byte-defop 126 1 byte-widen) (byte-defop 127 0 byte-end-of-line) @@ -3833,7 +3833,7 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\"" (byte-defop-compiler setcdr 2) (byte-defop-compiler buffer-substring 2) (byte-defop-compiler delete-region 2) -(byte-defop-compiler narrow-to-region 2) +(byte-defop-compiler narrow-to-region 2-3) (byte-defop-compiler (% byte-rem) 2) (byte-defop-compiler aset 3) diff --git a/src/bytecode.c b/src/bytecode.c index 241cbaf04f..2b1eccdc51 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1480,8 +1480,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, CASE (Bnarrow_to_region): { - Lisp_Object v1 = POP; - TOP = Fnarrow_to_region (TOP, v1, Qnil); + Lisp_Object v2 = POP, v1 = POP; + TOP = Fnarrow_to_region (TOP, v1, v2); NEXT; } commit 6ce75b19797abcf65a93307260a6688bbf76f287 Author: Lars Ingebrigtsen Date: Sat Jul 30 13:40:59 2022 +0200 Clarify mail-header address parsing doc strings * lisp/mail/mail-parse.el (mail-header-parse-address-lax): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): Clarify what these functions do (bug#56824). diff --git a/lisp/mail/ietf-drums.el b/lisp/mail/ietf-drums.el index d1ad671b16..b7d96a1053 100644 --- a/lisp/mail/ietf-drums.el +++ b/lisp/mail/ietf-drums.el @@ -189,6 +189,19 @@ the Content-Transfer-Encoding header of a mail." (defun ietf-drums-parse-address (string &optional decode) "Parse STRING and return a MAILBOX / DISPLAY-NAME pair. +STRING here is supposed to be an RFC822(bis) mail address, and +will commonly look like, for instance: + + \"=?utf-8?Q?Andr=C3=A9?= \" + +If you have an already-decoded address, like + + \"André \" + +this function can't be used to parse that. Instead, use +`mail-header-parse-address-lax' to make a guess at what's the +name and what's the address. + If DECODE, the DISPLAY-NAME will have RFC2047 decoding performed (that's the \"=?utf...q...=?\") stuff." (when decode diff --git a/lisp/mail/mail-parse.el b/lisp/mail/mail-parse.el index ec719850e2..d28b8b5843 100644 --- a/lisp/mail/mail-parse.el +++ b/lisp/mail/mail-parse.el @@ -85,10 +85,10 @@ The return value is a list with mail/name pairs." "Parse STRING as a mail address. Returns a mail/name pair. -This function will first try to parse STRING as a -standards-compliant address string, and if that fails, try to use -heuristics to determine the email address and the name in the -string." +This function uses heuristics to determine the email address and +the name in the string. If you have an RFC822(bis) +standards-compliant STRING, use `mail-header-parse-address' +instead." (with-temp-buffer (insert (string-clean-whitespace string)) ;; Find the bit with the @ and guess that that's the mail. commit 40c4691355314cac57c490de3c6848a58930283a Author: Lars Ingebrigtsen Date: Sat Jul 30 13:18:44 2022 +0200 Fix outline-minor-mode-use-buttons defcustom type * lisp/outline.el (outline-minor-mode-use-buttons): Fix wrong type. diff --git a/lisp/outline.el b/lisp/outline.el index 6837722e64..1aba79784f 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -288,8 +288,8 @@ The value should be a `buffer-match-p' condition. These buttons can be used to hide and show the body under the heading. Note that this feature is not meant to be used in editing buffers (yet) -- that will be amended in a future version." - :type 'boolean ;; FIXME -- is there a `buffer-match-p' defcustom type somewhere? + :type 'sexp :safe #'booleanp :version "29.1") commit 07d6b3b577239b1a240158db426397668da844a6 Author: Lars Ingebrigtsen Date: Sat Jul 30 13:16:12 2022 +0200 buffer-match-p doc string clarification * lisp/subr.el (buffer-match-p): Actually say that nil is a valid value. diff --git a/lisp/subr.el b/lisp/subr.el index 9f7cb3ab6a..c220a7f4a8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6899,7 +6899,8 @@ lines." (defun buffer-match-p (condition buffer-or-name &optional arg) "Return non-nil if BUFFER-OR-NAME matches CONDITION. CONDITION is either: -- the symbol t, to always match +- the symbol t, to always match, +- the symbol nil, which never matches, - a regular expression, to match a buffer name, - a predicate function that takes a buffer object and ARG as arguments, and returns non-nil if the buffer matches, commit 30f598bcc1371dbf27ea034d260fe35baf0905f9 Author: Lars Ingebrigtsen Date: Sat Jul 30 12:50:47 2022 +0200 Adjust outline--use-buttons-p to buffer-match-p change * lisp/outline.el (outline-minor-mode-use-buttons): Adjust doc string. (outline--use-buttons-p): No longer any need to special-case t/nil. diff --git a/lisp/outline.el b/lisp/outline.el index a68f648bd8..6837722e64 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -283,13 +283,13 @@ This option is only in effect when `outline-minor-mode-cycle' is non-nil." (defcustom outline-minor-mode-use-buttons '(derived-mode . special-mode) "Whether to display clickable buttons on the headings. -The value should be a `buffer-match-p' condition, or nil to -disable in all buffers and t to enable in all buffers. +The value should be a `buffer-match-p' condition. These buttons can be used to hide and show the body under the heading. Note that this feature is not meant to be used in editing buffers (yet) -- that will be amended in a future version." :type 'boolean + ;; FIXME -- is there a `buffer-match-p' defcustom type somewhere? :safe #'booleanp :version "29.1") @@ -478,10 +478,7 @@ See the command `outline-mode' for more information on this mode." (defun outline--use-buttons-p () (and outline-minor-mode - outline-minor-mode-use-buttons - (or (eq outline-minor-mode-use-buttons t) - (buffer-match-p outline-minor-mode-use-buttons - (current-buffer))))) + (buffer-match-p outline-minor-mode-use-buttons (current-buffer)))) (defvar-local outline-heading-alist () "Alist associating a heading for every possible level. commit 2539039335709ccf64f4792882a0e74a0715f1fa Author: Lars Ingebrigtsen Date: Sat Jul 30 12:45:36 2022 +0200 Move a test from subr-tests to print-tests diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index be613ce759..08f08f0466 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1126,15 +1126,5 @@ final or penultimate step during initialization.")) (should (equal (butlast l n) (subr-tests--butlast-ref l n)))))) -(ert-deftest test-print-unreadable-function-buffer () - (with-temp-buffer - (let ((current (current-buffer)) - callback-buffer) - (let ((print-unreadable-function - (lambda (_object _escape) - (setq callback-buffer (current-buffer))))) - (prin1-to-string (make-marker))) - (should (eq current callback-buffer))))) - (provide 'subr-tests) ;;; subr-tests.el ends here diff --git a/test/src/print-tests.el b/test/src/print-tests.el index 91187d9f45..37ee21af6b 100644 --- a/test/src/print-tests.el +++ b/test/src/print-tests.el @@ -529,5 +529,15 @@ otherwise, use a different charset." (should (equal (% (- (length numbers) loopback-index) loop) 0))))))))))) +(ert-deftest test-print-unreadable-function-buffer () + (with-temp-buffer + (let ((current (current-buffer)) + callback-buffer) + (let ((print-unreadable-function + (lambda (_object _escape) + (setq callback-buffer (current-buffer))))) + (prin1-to-string (make-marker))) + (should (eq current callback-buffer))))) + (provide 'print-tests) ;;; print-tests.el ends here commit cd3ce6e54182a1630b870f13289131cc957eafa6 Author: Stefan Kangas Date: Sat Jul 30 12:06:25 2022 +0200 * lisp/apropos.el (apropos-documentation): Simplify. diff --git a/lisp/apropos.el b/lisp/apropos.el index 0b84f9fa63..13dc8fa139 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -909,41 +909,39 @@ Returns list of symbols and documentation found." (apropos-parse-pattern pattern t) (or do-all (setq do-all apropos-do-all)) (setq apropos-accumulator () apropos-files-scanned ()) - (let ((standard-input (get-buffer-create " apropos-temp")) - (apropos-sort-by-scores apropos-documentation-sort-by-scores) - f v sf sv) - (unwind-protect - (with-current-buffer standard-input - (apropos-documentation-check-doc-file) - (if do-all - (mapatoms - (lambda (symbol) - (setq f (apropos-safe-documentation symbol) - v (get symbol 'variable-documentation)) - (if (integerp v) (setq v nil)) - (setq f (apropos-documentation-internal f) - v (apropos-documentation-internal v)) - (setq sf (apropos-score-doc f) - sv (apropos-score-doc v)) - (if (or f v) - (if (setq apropos-item - (cdr (assq symbol apropos-accumulator))) - (progn - (if f - (progn - (setcar (nthcdr 1 apropos-item) f) - (setcar apropos-item (+ (car apropos-item) sf)))) - (if v - (progn - (setcar (nthcdr 2 apropos-item) v) - (setcar apropos-item (+ (car apropos-item) sv))))) - (setq apropos-accumulator - (cons (list symbol - (+ (apropos-score-symbol symbol 2) sf sv) - f v) - apropos-accumulator))))))) - (apropos-print nil "\n----------------\n" nil t)) - (kill-buffer standard-input)))) + (with-temp-buffer + (let ((standard-input (current-buffer)) + (apropos-sort-by-scores apropos-documentation-sort-by-scores) + f v sf sv) + (apropos-documentation-check-doc-file) + (if do-all + (mapatoms + (lambda (symbol) + (setq f (apropos-safe-documentation symbol) + v (get symbol 'variable-documentation)) + (if (integerp v) (setq v nil)) + (setq f (apropos-documentation-internal f) + v (apropos-documentation-internal v)) + (setq sf (apropos-score-doc f) + sv (apropos-score-doc v)) + (if (or f v) + (if (setq apropos-item + (cdr (assq symbol apropos-accumulator))) + (progn + (if f + (progn + (setcar (nthcdr 1 apropos-item) f) + (setcar apropos-item (+ (car apropos-item) sf)))) + (if v + (progn + (setcar (nthcdr 2 apropos-item) v) + (setcar apropos-item (+ (car apropos-item) sv))))) + (setq apropos-accumulator + (cons (list symbol + (+ (apropos-score-symbol symbol 2) sf sv) + f v) + apropos-accumulator))))))) + (apropos-print nil "\n----------------\n" nil t)))) (defun apropos-value-internal (predicate symbol function) commit f08f5b7afe5da475ebbce700116375757c37521e Author: Stefan Kangas Date: Sat Jul 30 11:52:05 2022 +0200 Avoid leaving temp buffers in bib-mode and refbib * lisp/textmodes/bib-mode.el (bib-capitalize-title): * lisp/textmodes/refbib.el (r2b-capitalize-title): Use with-temp-buffer. diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 21a4dc751a..83759090af 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -225,12 +225,12 @@ named by variable `bib-unread-file'." (set-syntax-table orig-syntax-table)))) (defun bib-capitalize-title (s) - "Like `capitalize', but don't capitalize stop words, except the first." - (with-current-buffer (get-buffer-create "$$$Scratch$$$") - (erase-buffer) - (insert s) - (bib-capitalize-title-region (point-min) (point-max)) - (buffer-string))) + "Like `capitalize', but don't capitalize stop words, except the first." + (with-temp-buffer + (erase-buffer) + (insert s) + (bib-capitalize-title-region (point-min) (point-max)) + (buffer-string))) (define-obsolete-function-alias 'addbib #'bib-add "29.1") (define-obsolete-function-alias 'return-key-bib #'bib-return-key "29.1") diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index ba1deca47d..f697fcaf40 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -163,12 +163,12 @@ This is in addition to the `r2b-capitalize-title-stop-words'.") (defun r2b-capitalize-title (s) - "Like `capitalize', but don't capitalize stop words, except the first." - (with-current-buffer (get-buffer-create "$$$Scratch$$$") - (erase-buffer) - (insert s) - (r2b-capitalize-title-region (point-min) (point-max)) - (buffer-string))) + "Like `capitalize', but don't capitalize stop words, except the first." + (with-temp-buffer + (erase-buffer) + (insert s) + (r2b-capitalize-title-region (point-min) (point-max)) + (buffer-string))) ;********************************************************* (defun r2b-reset () commit 2e21074efd01ad4cd79c70be2f45896af8bc2cdf Author: Stefan Kangas Date: Sat Jul 30 11:22:19 2022 +0200 Prefer defvar-keymap in dns-mode-map * lisp/textmodes/dns-mode.el (dns-mode-map): Prefer defvar-keymap. diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index 42d547504c..86da09c216 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -1,6 +1,6 @@ ;;; dns-mode.el --- a mode for viewing/editing Domain Name System master files -*- lexical-binding: t -*- -;; Copyright (C) 2000-2001, 2004-2022 Free Software Foundation, Inc. +;; Copyright (C) 2000-2022 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: DNS master zone file SOA comm @@ -22,11 +22,11 @@ ;;; Commentary: -;; Use M-x dns-mode RET to invoke in master files. +;; Use `M-x dns-mode' to invoke in master files. ;; -;; C-c C-s Increment SOA serial. -;; Understands YYYYMMDDNN, Unix time, and serial number formats, -;; and complains if it fail to find SOA serial. +;; `C-c C-s' Increment SOA serial. +;; Understands YYYYMMDDNN, Unix time, and serial number +;; formats, and complains if it fail to find SOA serial. ;;; References: @@ -37,12 +37,6 @@ ;; Transport Layer Security (TLS) Protocol: TLSA" ;; RFC 6844, "DNS Certification Authority Authorization (CAA) Resource Record" -;;; Release history: - -;; 2004-09-11 Posted on gnu.emacs.sources. -;; 2004-09-13 Ported to XEmacs. -;; 2004-09-14 Installed in Emacs CVS. - ;;; Code: (eval-when-compile (require 'cl-lib)) @@ -142,12 +136,10 @@ manually with \\[dns-mode-soa-increment-serial]." ;; Keymap. -(defvar dns-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-c\C-s" #'dns-mode-soa-increment-serial) - (define-key map "\C-c\C-e" #'dns-mode-ipv6-to-nibbles) - map) - "Keymap for DNS master file mode.") +(defvar-keymap dns-mode-map + :doc "Keymap for DNS master file mode." + "C-c C-s" #'dns-mode-soa-increment-serial + "C-c C-e" #'dns-mode-ipv6-to-nibbles) ;; Menu. commit 7e84db9484f59f3409d5c4e0d9b8a432381c2f15 Author: Stefan Kangas Date: Sat Jul 30 09:46:20 2022 +0200 Prefer defvar-keymap in nroff-mode-map * lisp/textmodes/nroff-mode.el (nroff-mode-map): Prefer defvar-keymap. diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 435423d31e..4d1de18b2c 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -1,7 +1,6 @@ ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source -*- lexical-binding: t -*- -;; Copyright (C) 1985-1986, 1994-1995, 1997, 2001-2022 Free Software -;; Foundation, Inc. +;; Copyright (C) 1985-2022 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: wp @@ -45,16 +44,14 @@ "Non-nil means automatically closing requests when you insert an open." :type 'boolean) -(defvar nroff-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\t" #'tab-to-tab-stop) - (define-key map "\e?" #'nroff-count-text-lines) - (define-key map "\n" #'nroff-electric-newline) - (define-key map "\en" #'nroff-forward-text-line) - (define-key map "\ep" #'nroff-backward-text-line) - (define-key map "\C-c\C-c" #'nroff-view) - map) - "Major mode keymap for `nroff-mode'.") +(defvar-keymap nroff-mode-map + :doc "Major mode keymap for `nroff-mode'." + "TAB" #'tab-to-tab-stop + "M-?" #'nroff-count-text-lines + "C-j" #'nroff-electric-newline + "M-n" #'nroff-forward-text-line + "M-p" #'nroff-backward-text-line + "C-c C-c" #'nroff-view) (easy-menu-define nroff-mode-menu nroff-mode-map "Menu for `nroff-mode'." @@ -160,8 +157,6 @@ closing requests for requests that are used in matched pairs." (skip-chars-forward ".H ") (string-to-number (buffer-substring (point) (+ 1 (point)))))) -;; Compute how much to indent a comment in nroff/troff source. -;; By mit-erl!gildea April 86 (defun nroff-comment-indent () "Compute indent for an nroff/troff comment. Puts a full-stop before comments on a line by themselves." commit 454c06a22c8b2ddb177d2e613807fc206ba29da7 Author: Stefan Kangas Date: Fri Jul 29 18:31:19 2022 +0200 Fix namespace use in bib-mode.el * lisp/textmodes/bib-mode.el (bib-unread-file, bib-add) (bib-return-key, bib-mark, bib-unread): Rename from 'unread-bib-file', 'addbib', 'return-key-bib', 'mark-bib', and 'unread-bib' respectively. Maintain old names as obsolete aliases and update uses. (bib-mode-map): Prefer defvar-keymap. diff --git a/etc/NEWS b/etc/NEWS index b6f77e3e49..f7cfae30f3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2181,6 +2181,16 @@ instead of also trying to ping it. Customize the user option --- *** The 'run-dig' command is now obsolete; use 'dig' instead. +--- +*** Some `bib-mode' commands and variables have been renamed. +To respect Emacs naming conventions, the variable 'unread-bib-file' +has been renamed to 'bib-unread-file'. The following commands have +also been renamed: + 'addbib' to 'bib-add' + 'return-key-bib' to 'bib-return-key' + 'mark-bib' to 'bib-mark' + 'unread-bib' to 'bib-unread' + --- ** The autoarg.el library is now marked obsolete. This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 6168fed6c8..21a4dc751a 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -24,12 +24,10 @@ ;;; Commentary: -;; GNU Emacs code to help maintain databases compatible with (troff) -;; refer and lookbib. The file bib-file should be set to your -;; bibliography file. Keys are automagically inserted as you type, -;; and appropriate keys are presented for various kinds of entries. - -;; FIXME: Fix the namespace use of this library. +;; GNU Emacs code to help maintain databases compatible with (troff) +;; refer and lookbib. The file `bib-file' should be set to your +;; bibliography file. Keys are automagically inserted as you type, +;; and appropriate keys are presented for various kinds of entries. ;;; Code: @@ -40,23 +38,23 @@ :group 'text) (defcustom bib-file "~/my-bibliography.bib" - "Default name of file used by `addbib'." + "Default name of file used by `bib-add'." :type 'file) -(defcustom unread-bib-file "~/to-be-read.bib" - "Default name of file used by `unread-bib' in Bib mode." - :type 'file) +(define-obsolete-variable-alias 'unread-bib-file 'bib-unread-file "29.1") +(defcustom bib-unread-file "~/to-be-read.bib" + "Default name of file used by `bib-unread' in Bib mode." + :type 'file + :version "29.1") -(defvar bib-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map text-mode-map) - (define-key map "\C-M" #'return-key-bib) - (define-key map "\C-c\C-u" #'unread-bib) - (define-key map "\C-c\C-@" #'mark-bib) - (define-key map "\e`" #'abbrev-mode) - map)) +(defvar-keymap bib-mode-map + :parent text-mode-map + "RET" #'bib-return-key + "C-c C-u" #'bib-unread + "C-c C-@" #'bib-mark + "M-`" #'abbrev-mode) -(defun addbib () +(defun bib-add () "Set up editor to add to troff bibliography file specified by global variable `bib-file'. See description of `bib-mode'." (interactive) @@ -87,10 +85,10 @@ R eport number or `phd thesis' or `masters thesis' or `draft' or W here can be found locally (login name, or ailib, etc.) X comments (not used in indexing) -\\[unread-bib] appends current entry to a different file (for example, +\\[bib-unread] appends current entry to a different file (for example, a file of papers to be read in the future), given by the value of the -variable `unread-bib-file'. -\\[mark-bib] marks current or previous entry. +variable `bib-unread-file'. +\\[bib-mark] marks current or previous entry. Abbreviations are saved in `bib-mode-abbrev-table'. Hook can be stored in `bib-mode-hook'. Field keys given by variable `bib-assoc'. @@ -142,7 +140,7 @@ with the cdr.") (defconst bib-capitalized-fields "%[AETCBIJR]") -(defun return-key-bib () +(defun bib-return-key () "Magic when user hits return, used by `bib-mode'." (interactive) (if (eolp) @@ -172,7 +170,7 @@ with the cdr.") (insert new-key)) (newline))) -(defun mark-bib () +(defun bib-mark () "Set mark at beginning of current or previous bib entry, point at end." (interactive) (beginning-of-line nil) @@ -185,14 +183,14 @@ with the cdr.") (forward-line 1) (beginning-of-line nil)) -(defun unread-bib () - "Append current or previous entry to file of unread papers -named by variable `unread-bib-file'." - (interactive) - (mark-bib) - (if (get-file-buffer unread-bib-file) - (append-to-buffer (get-file-buffer unread-bib-file) (mark) (point)) - (append-to-file (mark) (point) unread-bib-file))) +(defun bib-unread () + "Append current or previous entry to file of unread papers +named by variable `bib-unread-file'." + (interactive) + (bib-mark) + (if (get-file-buffer bib-unread-file) + (append-to-buffer (get-file-buffer bib-unread-file) (mark) (point)) + (append-to-file (mark) (point) bib-unread-file))) (defvar bib-capitalize-title-stop-words @@ -226,7 +224,6 @@ named by variable `unread-bib-file'." )) (set-syntax-table orig-syntax-table)))) - (defun bib-capitalize-title (s) "Like `capitalize', but don't capitalize stop words, except the first." (with-current-buffer (get-buffer-create "$$$Scratch$$$") @@ -235,6 +232,11 @@ named by variable `unread-bib-file'." (bib-capitalize-title-region (point-min) (point-max)) (buffer-string))) +(define-obsolete-function-alias 'addbib #'bib-add "29.1") +(define-obsolete-function-alias 'return-key-bib #'bib-return-key "29.1") +(define-obsolete-function-alias 'mark-bib #'bib-mark "29.1") +(define-obsolete-function-alias 'unread-bib #'bib-unread "29.1") + (provide 'bib-mode) ;;; bib-mode.el ends here commit 9bdcca553f89838c45006ef869a7a10d4ad41262 Author: Stefan Kangas Date: Fri Jul 29 17:56:55 2022 +0200 ; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment. diff --git a/lisp/emacs-lisp/regi.el b/lisp/emacs-lisp/regi.el index 0099d157e4..a7d61ed51c 100644 --- a/lisp/emacs-lisp/regi.el +++ b/lisp/emacs-lisp/regi.el @@ -5,7 +5,6 @@ ;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. ;; Created: 24-Feb-1993 ;; Old-Version: 1.8 -;; Last Modified: 1993/06/01 21:33:00 ;; Keywords: extensions, matching ;; This file is part of GNU Emacs. commit a109cdc8f25c820626a332da7a747601b62032a7 Author: Stefan Kangas Date: Fri Jul 29 14:52:01 2022 +0200 ; * lisp/ffap.el: Comment cleanup. diff --git a/lisp/ffap.el b/lisp/ffap.el index 528c02d060..e401759591 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -31,7 +31,7 @@ ;; (`ffap-require-prefix' swaps these behaviors). This is useful for ;; following references in situations such as mail or news buffers, ;; README's, MANIFEST's, and so on. Submit bugs or suggestions with -;; M-x report-emacs-bug. +;; `M-x report-emacs-bug'. ;; ;; For the default installation, add this line to your init file: ;; @@ -69,8 +69,8 @@ ;; `ffap-bindings', or write your own. ;; ;; If you use ange-ftp, it is best to load or autoload it before ffap. -;; If you use ff-paths, load it afterwards. Try apropos {C-h a ffap -;; RET} to get a list of the many option variables. In particular, if +;; If you use ff-paths, load it afterwards. Try apropos `C-h a ffap +;; RET' to get a list of the many option variables. In particular, if ;; ffap is slow, try these: ;; ;; (setq ffap-alist nil) ; faster, dumber prompting @@ -86,8 +86,8 @@ ;;; Code: ;;; Change Log: -;; The History and Contributors moved to ffap.LOG, -;; which also has some old examples and commentary from ffap 1.5. +;; The History and Contributors moved to ffap.LOG, which also has some +;; old examples and commentary from ffap 1.5. ;;; Todo list: ;; * let "/dir/file#key" jump to key (tag or regexp) in /dir/file @@ -109,9 +109,6 @@ :group 'matching :group 'convenience) -;; The code is organized in pages, separated by formfeed characters. -;; See the next two pages for standard customization ideas. - ;;; User Variables: @@ -246,7 +243,6 @@ it passes it on to `dired'." (make-obsolete-variable 'ffap-newfile-prompt 'find-file-not-found-functions "29.1") (defcustom ffap-require-prefix nil - ;; Suggestion from RHOGEE, 20 Oct 1994. "If set, reverses the prefix argument to `find-file-at-point'. This is nil so neophytes notice ffap. Experts may prefer to disable ffap most of the time." @@ -254,19 +250,19 @@ ffap most of the time." :group 'ffap) ;;;###autoload -(defcustom ffap-file-finder 'find-file +(defcustom ffap-file-finder #'find-file "The command called by `find-file-at-point' to find a file." :type 'function :group 'ffap :risky t) -(defcustom ffap-directory-finder 'dired +(defcustom ffap-directory-finder #'dired "The command called by `dired-at-point' to find a directory." :type 'function :group 'ffap :risky t) -(defcustom ffap-url-fetcher 'browse-url +(defcustom ffap-url-fetcher #'browse-url "A function of one argument, called by ffap to fetch an URL." :type '(choice (const browse-url) function) @@ -306,10 +302,6 @@ disable ffap most of the time." ;;; Find Next Thing in buffer (`ffap-next'): -;; -;; Original ffap-next-url (URLs only) from RPECK 30 Mar 1995. Since -;; then, broke it up into ffap-next-guess (noninteractive) and -;; ffap-next (a command). It now work on files as well as url's. (defvar ffap-next-guess nil "Last value returned by `ffap-next-guess'.") @@ -736,8 +728,7 @@ This uses `ffap-file-exists-string', which may try adding suffixes from ;; ;; These search actions depend on the major-mode or regexps matching ;; the current name. The little functions and their variables are -;; deferred to the next section, at some loss of "code locality". A -;; good example of featuritis. Trim this list for speed. +;; deferred to the next section, at some loss of "code locality". (defvar ffap-alist '( @@ -748,12 +739,12 @@ This uses `ffap-file-exists-string', which may try adding suffixes from ("\\.elc?\\'" . ffap-el) ; simple.el, simple.elc (emacs-lisp-mode . ffap-el-mode) ; rmail, gnus, simple, custom ;; (lisp-interaction-mode . ffap-el-mode) ; maybe - (finder-mode . ffap-el-mode) ; type {C-h p} and try it + (finder-mode . ffap-el-mode) ; type `C-h p' and try it (help-mode . ffap-el-mode) ; maybe useful (c++-mode . ffap-c++-mode) ; search ffap-c++-path (cc-mode . ffap-c-mode) ; same ("\\.\\([chCH]\\|cc\\|hh\\)\\'" . ffap-c-mode) ; stdio.h - (fortran-mode . ffap-fortran-mode) ; FORTRAN requested by MDB + (fortran-mode . ffap-fortran-mode) ("\\.[fF]\\'" . ffap-fortran-mode) (tex-mode . ffap-tex-mode) ; search ffap-tex-path (latex-mode . ffap-latex-mode) ; similar @@ -1005,7 +996,6 @@ out of NAME." (match-beginning 1) (match-end 1))))) try)))) -;; Maybe a "Lisp Code Directory" reference: (defun ffap-lcd (name) (declare (obsolete nil "29.1")) (and @@ -1076,8 +1066,7 @@ Function `ffap-string-at-point' uses the data fields as follows: The arguments CHARS, BEG and END are handled as described in `skip-chars-forward'.") -(defvar ffap-string-at-point nil - ;; Added at suggestion of RHOGEE (for ff-paths), 7/24/95. +(defvar ffap-string-at-point nil ; for ff-paths "Last string returned by the function `ffap-string-at-point'.") (defcustom ffap-file-name-with-spaces nil @@ -1529,12 +1518,6 @@ which may actually result in an URL rather than a filename." ;; during the completing-read call). (setq file-name-handler-alist (delq elem file-name-handler-alist))))) -;; The rest of this page is just to work with package complete.el. -;; This code assumes that you load ffap.el after complete.el. -;; -;; We must inform complete about whether our completion function -;; will do filename style completion. - ;;; Highlighting (`ffap-highlight'): @@ -1641,14 +1624,14 @@ and `ffap-url-at-point'." (file-exists-p filename) (y-or-n-p "File does not exist, create buffer? ")) (find-file - ;; expand-file-name fixes "~/~/.emacs" bug sent by CHUCKR. + ;; expand-file-name fixes "~/~/.emacs" bug (expand-file-name filename))) ;; User does not want to find a non-existent file: ((signal 'file-missing (list "Opening file buffer" "No such file or directory" filename))))))) -;; Shortcut: allow {M-x ffap} rather than {M-x find-file-at-point}. +;; Shortcut: allow `M-x ffap' rather than `M-x find-file-at-point'. ;;;###autoload (defalias 'ffap 'find-file-at-point) @@ -1791,7 +1774,7 @@ Applies `ffap-menu-text-plist' text properties at all matches." ;;; Mouse Support (`ffap-at-mouse'): ;; -;; See the suggested binding in ffap-bindings (near eof). +;; See the suggested binding in `ffap-bindings' (near eof). (defvar ffap-at-mouse-fallback nil ; ffap-menu? too time-consuming "Command invoked by `ffap-at-mouse' if nothing found at click, or nil. @@ -1852,7 +1835,7 @@ Only intended for interactive use." "Like `ffap', but put buffer in another frame. Only intended for interactive use." (interactive (list (ffap-prompter nil " other frame"))) - ;; Extra code works around dedicated windows (noted by JENS, 7/96): + ;; Extra code works around dedicated windows: (let* ((win (selected-window)) (wdp (window-dedicated-p win)) value) @@ -2079,7 +2062,7 @@ Only intended for interactive use." "Like `dired-at-point', but put buffer in another frame. Only intended for interactive use." (interactive) - ;; Extra code works around dedicated windows (noted by JENS, 7/96): + ;; Extra code works around dedicated windows: (let* ((win (selected-window)) (wdp (window-dedicated-p win)) value) commit ecfac493fa21deef5fb694028782eace56afc87e Author: Stefan Kangas Date: Fri Jul 29 13:02:48 2022 +0200 Make ffap-newfile-prompt obsolete * lisp/ffap.el (ffap-newfile-prompt): Obsolete in favor of 'find-file-not-found-functions'. diff --git a/lisp/ffap.el b/lisp/ffap.el index 9ed17125de..528c02d060 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -240,11 +240,10 @@ it passes it on to `dired'." :group 'ffap) (defcustom ffap-newfile-prompt nil - ;; Suggestion from RHOGEE, 11 Jul 1994. Disabled, I think this is - ;; better handled by `find-file-not-found-functions'. "Whether `find-file-at-point' prompts about a nonexistent file." :type 'boolean :group 'ffap) +(make-obsolete-variable 'ffap-newfile-prompt 'find-file-not-found-functions "29.1") (defcustom ffap-require-prefix nil ;; Suggestion from RHOGEE, 20 Oct 1994. @@ -1611,7 +1610,7 @@ Uses the face `ffap' if it is defined, or else `highlight'." If `ffap-url-regexp' is not nil, the FILENAME may also be an URL. With a prefix, this command behaves exactly like `ffap-file-finder'. If `ffap-require-prefix' is set, the prefix meaning is reversed. -See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt', +See also the variables `ffap-dired-wildcards', `ffap-url-unwrap-local', `ffap-url-unwrap-remote', `ffap-file-name-with-spaces', and the functions `ffap-file-at-point' and `ffap-url-at-point'." commit fc79bb6ffc90d68b450b8be88ce5c69429fcc275 Author: Stefan Kangas Date: Fri Jul 29 10:45:40 2022 +0200 * lisp/ffap.el (ffap-url-regexp): Add gemini. diff --git a/lisp/ffap.el b/lisp/ffap.el index ffed9f9759..9ed17125de 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -185,7 +185,7 @@ Note this name may be omitted if it equals the default "\\(" "news\\(post\\)?:\\|mailto:\\|file:" ; no host ok "\\|" - "\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://" ; needs host + "\\(ftp\\|https?\\|telnet\\|gopher\\|gemini\\|www\\|wais\\)://" ; needs host "\\)") "Regexp matching the beginning of a URI, for ffap. If the value is nil, disable URL-matching features in ffap.") commit 53b1e6f96cb03a461061e1e21cd185dd8a82ce6b Author: Stefan Kangas Date: Fri Jul 15 18:08:34 2022 +0200 Make outline-view-change-hook obsolete According to a comment, this hook "Seems only used by lazy-lock. I.e. obsolete." But lazy-lock has been deleted. * lisp/outline.el (outline-view-change-hook): Make obsolete. diff --git a/lisp/outline.el b/lisp/outline.el index 6ec7d95d3a..a68f648bd8 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -327,6 +327,7 @@ data reflects the `outline-regexp'.") (defvar outline-view-change-hook nil "Normal hook to be run after outline visibility changes.") +(make-obsolete-variable 'outline-view-change-hook nil "29.1") (defvar outline-mode-hook nil "This hook is run when outline mode starts.") @@ -864,7 +865,6 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." (or outline-isearch-open-invisible-function #'outline-isearch-open-invisible)))) (outline--fix-up-all-buttons from to) - ;; Seems only used by lazy-lock. I.e. obsolete. (run-hooks 'outline-view-change-hook)) (defun outline-reveal-toggle-invisible (o hidep) commit c95a34c96013aaba1cdf2166c4a1d0e2c5f3de6a Author: YAMAMOTO Mitsuharu Date: Sat Jul 30 17:21:54 2022 +0900 * src/macfont.m (macfont_open): Initialize font->space_width. (Bug#56808) diff --git a/src/macfont.m b/src/macfont.m index e3dab1c42e..b30c3c9763 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -2628,6 +2628,9 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no font->pixel_size = size; font->driver = &macfont_driver; font->encoding_charset = font->repertory_charset = -1; + /* Clear font->space_width so macfont_monospace_width_multiplier may + not be confused by an uninitialized value. */ + font->space_width = 0; block_input (); commit 31a6a37d45dbf324f26048ce45f82213860f2ec8 Author: Eli Zaretskii Date: Sat Jul 30 09:32:48 2022 +0300 Improve indexing of keymap variables * doc/lispref/maps.texi (Standard Keymaps): * doc/lispref/display.texi (Button Buffer Commands) (Button Properties): * doc/lispref/keymaps.texi (Translation Keymaps): Improve indexing of keymaps. (Bug#56816) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 404cf1b247..9aed5b2d7a 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6941,6 +6941,7 @@ the usual Emacs @code{highlight} face. @item keymap @kindex keymap @r{(button property)} +@vindex button-map The button's keymap, defining bindings active within the button region. By default this is the usual button region keymap, stored in the variable @code{button-map}, which defines @key{RET} and @@ -7155,6 +7156,7 @@ Return @code{t} if button-type @var{type} is a subtype of @var{supertype}. These are commands and functions for locating and operating on buttons in an Emacs buffer. +@cindex buffer-button-map @code{push-button} is the command that a user uses to actually push a button, and is bound by default in the button itself to @key{RET} and to @key{mouse-2} using a local keymap in the button's overlay or diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index bda9301ffc..4b9252f1ed 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -1599,6 +1599,7 @@ to make entries in @code{input-decode-map} beyond those that can be deduced from Termcap and Terminfo. @xref{Terminal-Specific}. @end defvar +@cindex function-key-map @defvar local-function-key-map This variable holds a keymap similar to @code{input-decode-map} except that it describes key sequences which should be translated to diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index 90497728a1..d18b553dc1 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -125,6 +125,7 @@ setup-language-environment-map, describe-language-environment-map, menu-bar-epatch-menu, menu-bar-ediff-merge-menu, menu-bar-ediff-menu, etc. @end ignore +@cindex minibuffer-inactive-mode-map @item minibuffer-inactive-mode-map A full keymap used in the minibuffer when it is not active.@* @xref{Minibuffer Edit,, Editing in the Minibuffer, emacs, The GNU Emacs Manual}. @@ -156,6 +157,7 @@ The global keymap used for the @kbd{C-x @key{RET}} prefix key. @vindex narrow-map A sparse keymap for subcommands of the prefix @kbd{C-x n}. +@cindex prog-mode-map @item prog-mode-map The keymap used by Prog mode.@* @xref{Basic Major Modes}. @@ -171,6 +173,7 @@ for multi-buffer replacements. @xref{Search and Replace, query-replace-map}. @item search-map A sparse keymap that provides global bindings for search-related commands. +@cindex special-mode-map @item special-mode-map The keymap used by Special mode.@* @xref{Basic Major Modes}. @@ -179,6 +182,7 @@ The keymap used by Special mode.@* The global keymap used for the @kbd{C-x t} prefix key for tab-bar related commands.@* @xref{Tab Bars,,, emacs, The GNU Emacs Manual}. +@cindex tab-bar-map @item tab-bar-map The keymap defining the contents of the tab bar.@* @xref{Tab Bars,,, emacs, The GNU Emacs Manual}.