commit 44ed8f6555288f00b982f21e68ac5a51372279de (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sun Apr 4 10:10:00 2021 +0300 Fix unexec compilation * src/pdumper.c (thaw_hash_tables): Now conditioned by HAVE_PDUMPER. (init_pdumper_once): No-op unless HAVE_PDUMPER. Reported by Nikolay Kudryavtsev . diff --git a/src/pdumper.c b/src/pdumper.c index fdd9b3bacb..d32a147a3c 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -5463,9 +5463,6 @@ Value is nil if this session was not started using a dump file.*/) Fcons (Qdump_file_name, dump_fn)); } -#endif /* HAVE_PDUMPER */ - - static void thaw_hash_tables (void) { @@ -5474,10 +5471,15 @@ thaw_hash_tables (void) hash_table_thaw (AREF (hash_tables, i)); } +#endif /* HAVE_PDUMPER */ + + void init_pdumper_once (void) { +#ifdef HAVE_PDUMPER pdumper_do_now_and_after_load (thaw_hash_tables); +#endif } void commit 69158a19956656c52208cbe8c11134eeed8ca867 Author: Eli Zaretskii Date: Sun Apr 4 09:41:44 2021 +0300 Fix recent changes regarding frame-scale-factor * src/frame.c (Fframe_scale_factor): Make more robust and avoid compiler warning while at that. Doc fix. diff --git a/src/frame.c b/src/frame.c index 784a079bff..bbdc3b5599 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3747,13 +3747,13 @@ window state change flag is reset. */) DEFUN ("frame-scale-factor", Fframe_scale_factor, Sframe_scale_factor, 0, 1, 0, doc: /* Return FRAMEs scale factor. -The scale factor is the amount a logical pixel size must be multiplied -to find the real number of pixels. */) +The scale factor is the amount by which a logical pixel size must be +multiplied to find the real number of pixels. */) (Lisp_Object frame) { struct frame *f = decode_live_frame (frame); - return (make_float (FRAME_SCALE_FACTOR (f))); + return (make_float (f ? FRAME_SCALE_FACTOR (f) : 1)); } /*********************************************************************** commit 55c768f3ea7da76328641c2db9aa922564b0a1f3 Author: İ. Göktuğ Kayaalp Date: Sun Apr 4 04:14:29 2021 +0200 Fix build error in frame.h on non-NS * src/frame.h (FRAME_SCALE_FACTOR): Fix syntax of macro in previous change. diff --git a/src/frame.h b/src/frame.h index 9963112036..0fd95e4dd3 100644 --- a/src/frame.h +++ b/src/frame.h @@ -911,7 +911,7 @@ default_pixels_per_inch_y (void) #if defined HAVE_NS # define FRAME_SCALE_FACTOR(f) (FRAME_NS_P (f) ? ns_frame_scale_factor (f) : 1) #else -# define FRAME_SCALE_FACTOR(f) 1; +# define FRAME_SCALE_FACTOR(f) 1 #endif /* Pixel width of frame F. */ commit 0689a4ac508a213f29c11ed6230596885d42f89b Author: Alan Third Date: Sat Apr 3 23:23:54 2021 +0100 Make new SVG widgets match character height (bug#47074) * etc/images/checkbox-mixed.svg: * etc/images/checked.svg: * etc/images/radio-checked.svg: * etc/images/radio-mixed.svg: * etc/images/radio.svg: * etc/images/unchecked.svg: Use viewBox and set height to 1em. diff --git a/etc/images/checkbox-mixed.svg b/etc/images/checkbox-mixed.svg index 13bccaa7ce..647a0ccf9b 100644 --- a/etc/images/checkbox-mixed.svg +++ b/etc/images/checkbox-mixed.svg @@ -1,4 +1,4 @@ - + diff --git a/etc/images/checked.svg b/etc/images/checked.svg index 6fefd5569e..b84dde1c3a 100644 --- a/etc/images/checked.svg +++ b/etc/images/checked.svg @@ -1,4 +1,4 @@ - + diff --git a/etc/images/radio-checked.svg b/etc/images/radio-checked.svg index db711841cf..5354324c34 100644 --- a/etc/images/radio-checked.svg +++ b/etc/images/radio-checked.svg @@ -1,4 +1,4 @@ - + diff --git a/etc/images/radio-mixed.svg b/etc/images/radio-mixed.svg index 5a8be0cf65..e2a6fcae57 100644 --- a/etc/images/radio-mixed.svg +++ b/etc/images/radio-mixed.svg @@ -1,4 +1,4 @@ - + diff --git a/etc/images/radio.svg b/etc/images/radio.svg index 0d649c99cd..2593a78610 100644 --- a/etc/images/radio.svg +++ b/etc/images/radio.svg @@ -1,3 +1,3 @@ - + diff --git a/etc/images/unchecked.svg b/etc/images/unchecked.svg index 18cd25b43f..7cc1516220 100644 --- a/etc/images/unchecked.svg +++ b/etc/images/unchecked.svg @@ -1,3 +1,3 @@ - + commit 1fdbeffe3a65cb23abb43a4ea59df9553c9246f9 Author: Alan Third Date: Sun Mar 28 17:52:57 2021 +0100 Set CSS for SVG files * src/dispextern.h (struct image): Add font details required for the CSS. * src/image.c (free_image): Free the font family string. (search_image_cache): (uncache_image): Make image caching understand the font details. (lookup_image): Handle the font details when generating the image and looking up the cache. (svg_css_length_to_pixels): Handle 'em' when we know the font size. (svg_load_image): Generate the CSS and apply it to the SVG. (enum svg_keyword_index): (svg_format): (syms_of_image): Add ':css' attribute. * doc/lispref/display.texi (SVG Images): Add details of new svg image attributes. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 2e1b4a6b66..68d7e827d2 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5751,6 +5751,28 @@ Cropping is performed after scaling but before rotation. @cindex SVG images SVG (Scalable Vector Graphics) is an XML format for specifying images. +SVG images support the following additional image descriptor +properties: + +@table @code +@item :foreground @var{foreground} +@var{foreground}, if non-@code{nil}, should be a string specifying a +color, which is used as the image's foreground color. If the value is +@code{nil}, it defaults to the faces's foreground color. + +@item :background @var{background} +@var{background}, if non-@code{nil}, should be a string specifying a +color, which is used as the image's background color if the image +supports transparency. If the value is @code{nil}, it defaults to the +faces's background color. + +@item :css @var{css} +@var{css}, if non-@code{nil}, should be a string specifying the CSS to +override the default CSS used when generating the image. +@end table + +@subsubheading SVG library + If your Emacs build has SVG support, you can create and manipulate these images with the following functions from the @file{svg.el} library. diff --git a/etc/NEWS b/etc/NEWS index 2d66a93474..c93e2e7044 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1511,6 +1511,15 @@ This controls whether to use smoothing or not for an image. Values include nil (no smoothing), t (do smoothing) or a predicate function that's called with the image object and should return nil/t. ++++ +*** SVG images now support user stylesheets. +The ':css' image attribute can be used to override the default CSS +stylesheet for an image. The default sets 'font-family' and +'font-size' to match the current face, so an image with 'height="1em"' +will match the font size in use where it is embedded. + +This feature relies on librsvg 2.48 or above being available. + ** EWW +++ diff --git a/src/dispextern.h b/src/dispextern.h index f4e872644d..a2ebd04f23 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3066,6 +3066,11 @@ struct image is created. */ unsigned long face_foreground, face_background; + /* Details of the font, only really relevant for types like SVG that + allow us to draw text. */ + int face_font_size; + char *face_font_family; + /* True if this image has a `transparent' background -- that is, is uses an image mask. The accessor macro for this is `IMAGE_BACKGROUND_TRANSPARENT'. */ diff --git a/src/image.c b/src/image.c index 774b7e14ea..13bd503e53 100644 --- a/src/image.c +++ b/src/image.c @@ -1199,6 +1199,7 @@ free_image (struct frame *f, struct image *img) /* Free resources, then free IMG. */ img->type->free_img (f, img); + xfree (img->face_font_family); xfree (img); } } @@ -1597,7 +1598,7 @@ make_image_cache (void) static struct image * search_image_cache (struct frame *f, Lisp_Object spec, EMACS_UINT hash, unsigned long foreground, unsigned long background, - bool ignore_colors) + int font_size, char *font_family, bool ignore_colors) { struct image *img; struct image_cache *c = FRAME_IMAGE_CACHE (f); @@ -1621,7 +1622,10 @@ search_image_cache (struct frame *f, Lisp_Object spec, EMACS_UINT hash, if (img->hash == hash && !NILP (Fequal (img->spec, spec)) && (ignore_colors || (img->face_foreground == foreground - && img->face_background == background))) + && img->face_background == background + && img->face_font_size == font_size + && (font_family + &&!strcmp (font_family, img->face_font_family))))) break; return img; } @@ -1639,7 +1643,7 @@ uncache_image (struct frame *f, Lisp_Object spec) can have multiple copies of an image with the same spec. We want to remove them all to ensure the user doesn't see an old version of the image when the face changes. */ - while ((img = search_image_cache (f, spec, hash, 0, 0, true))) + while ((img = search_image_cache (f, spec, hash, 0, 0, 0, NULL, true))) { free_image (f, img); /* As display glyphs may still be referring to the image ID, we @@ -2411,6 +2415,8 @@ lookup_image (struct frame *f, Lisp_Object spec, int face_id) struct face *face = FACE_FROM_ID (f, face_id); unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f); unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f); + int font_size = face->font->pixel_size; + char *font_family = SSDATA (face->lface[LFACE_FAMILY_INDEX]); /* F must be a window-system frame, and SPEC must be a valid image specification. */ @@ -2419,7 +2425,8 @@ lookup_image (struct frame *f, Lisp_Object spec, int face_id) /* Look up SPEC in the hash table of the image cache. */ hash = sxhash (spec); - img = search_image_cache (f, spec, hash, foreground, background, false); + img = search_image_cache (f, spec, hash, foreground, background, + font_size, font_family, false); if (img && img->load_failed_p) { free_image (f, img); @@ -2434,6 +2441,9 @@ lookup_image (struct frame *f, Lisp_Object spec, int face_id) cache_image (f, img); img->face_foreground = foreground; img->face_background = background; + img->face_font_size = font_size; + img->face_font_family = malloc (strlen (font_family) + 1); + strcpy (img->face_font_family, font_family); img->load_failed_p = ! img->type->load_img (f, img); /* If we can't load the image, and we don't have a width and @@ -9532,6 +9542,7 @@ enum svg_keyword_index SVG_DATA, SVG_FILE, SVG_BASE_URI, + SVG_CSS, SVG_ASCENT, SVG_MARGIN, SVG_RELIEF, @@ -9552,6 +9563,7 @@ static const struct image_keyword svg_format[SVG_LAST] = {":data", IMAGE_STRING_VALUE, 0}, {":file", IMAGE_STRING_VALUE, 0}, {":base-uri", IMAGE_STRING_VALUE, 0}, + {":css", IMAGE_STRING_VALUE, 0}, {":ascent", IMAGE_ASCENT_VALUE, 0}, {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, {":relief", IMAGE_INTEGER_VALUE, 0}, @@ -9838,7 +9850,7 @@ svg_load (struct frame *f, struct image *img) #if LIBRSVG_CHECK_VERSION (2, 46, 0) static double -svg_css_length_to_pixels (RsvgLength length, double dpi) +svg_css_length_to_pixels (RsvgLength length, double dpi, int font_size) { double value = length.length; @@ -9866,9 +9878,16 @@ svg_css_length_to_pixels (RsvgLength length, double dpi) case RSVG_UNIT_IN: value *= dpi; break; +#if LIBRSVG_CHECK_VERSION (2, 48, 0) + /* We don't know exactly what font size is used on older librsvg + versions. */ + case RSVG_UNIT_EM: + value *= font_size; + break; +#endif default: - /* Probably one of em, ex, or %. We can't know what the pixel - value is without more information. */ + /* Probably ex or %. We can't know what the pixel value is + without more information. */ value = 0; } @@ -9923,6 +9942,27 @@ svg_load_image (struct frame *f, struct image *img, char *contents, rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx, FRAME_DISPLAY_INFO (f)->resy); + +#if LIBRSVG_CHECK_VERSION (2, 48, 0) + char *css; + Lisp_Object lcss = image_spec_value (img->spec, QCcss, NULL); + if (!STRINGP (lcss)) + { + /* Generate the CSS for the SVG image. */ + char *css_spec = "svg{font-family:\"%s\";font-size:%4dpx}"; + int css_len = strlen (css_spec) + strlen (img->face_font_family); + css = xmalloc (css_len); + snprintf (css, css_len, css_spec, img->face_font_family, img->face_font_size); + rsvg_handle_set_stylesheet (rsvg_handle, css, strlen (css), NULL); + } + else + { + css = xmalloc (SBYTES (lcss) + 1); + strncpy (css, SSDATA (lcss), SBYTES (lcss)); + *(css + SBYTES (lcss) + 1) = 0; + } +#endif + #else /* Make a handle to a new rsvg object. */ rsvg_handle = rsvg_handle_new (); @@ -9965,20 +10005,20 @@ svg_load_image (struct frame *f, struct image *img, char *contents, if (has_width && has_height) { /* Success! We can use these values directly. */ - viewbox_width = svg_css_length_to_pixels (iwidth, dpi); - viewbox_height = svg_css_length_to_pixels (iheight, dpi); + viewbox_width = svg_css_length_to_pixels (iwidth, dpi, img->face_font_size); + viewbox_height = svg_css_length_to_pixels (iheight, dpi, img->face_font_size); } else if (has_width && has_viewbox) { - viewbox_width = svg_css_length_to_pixels (iwidth, dpi); - viewbox_height = svg_css_length_to_pixels (iwidth, dpi) - * viewbox.width / viewbox.height; + viewbox_width = svg_css_length_to_pixels (iwidth, dpi, img->face_font_size); + viewbox_height = svg_css_length_to_pixels (iwidth, dpi, img->face_font_size) + * viewbox.height / viewbox.width; } else if (has_height && has_viewbox) { - viewbox_height = svg_css_length_to_pixels (iheight, dpi); - viewbox_width = svg_css_length_to_pixels (iheight, dpi) - * viewbox.height / viewbox.width; + viewbox_height = svg_css_length_to_pixels (iheight, dpi, img->face_font_size); + viewbox_width = svg_css_length_to_pixels (iheight, dpi, img->face_font_size) + * viewbox.width / viewbox.height; } else if (has_viewbox) { @@ -10099,6 +10139,10 @@ svg_load_image (struct frame *f, struct image *img, char *contents, rsvg_handle_set_dpi_x_y (rsvg_handle, FRAME_DISPLAY_INFO (f)->resx, FRAME_DISPLAY_INFO (f)->resy); + +#if LIBRSVG_CHECK_VERSION (2, 48, 0) + rsvg_handle_set_stylesheet (rsvg_handle, css, strlen (css), NULL); +#endif #else /* Make a handle to a new rsvg object. */ rsvg_handle = rsvg_handle_new (); @@ -10132,6 +10176,11 @@ svg_load_image (struct frame *f, struct image *img, char *contents, g_object_unref (rsvg_handle); xfree (wrapped_contents); +#if LIBRSVG_CHECK_VERSION (2, 48, 0) + if (!STRINGP (lcss)) + xfree (css); +#endif + /* Extract some meta data from the svg handle. */ width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); @@ -10202,6 +10251,10 @@ svg_load_image (struct frame *f, struct image *img, char *contents, g_object_unref (rsvg_handle); if (wrapped_contents) xfree (wrapped_contents); +#if LIBRSVG_CHECK_VERSION (2, 48, 0) + if (css && !STRINGP (lcss)) + xfree (css); +#endif /* FIXME: Use error->message so the user knows what is the actual problem with the image. */ image_error ("Error parsing SVG image `%s'", img->spec); @@ -10793,6 +10846,7 @@ non-numeric, there is no explicit limit on the size of images. */); #if defined (HAVE_RSVG) DEFSYM (Qsvg, "svg"); DEFSYM (QCbase_uri, ":base-uri"); + DEFSYM (QCcss, ":css"); add_image_type (Qsvg); #ifdef HAVE_NTGUI /* Other libraries used directly by svg code. */ commit 40842f67afb2931de6789237a49570f99b70404f Author: Alan Third Date: Thu Apr 1 23:23:19 2021 +0100 Fix NSTRACE failure * src/nsterm.m ([EmacsSurface getContext]): Remove unneeded '@' symbol. diff --git a/src/nsterm.m b/src/nsterm.m index bf175bbd18..a6501100ca 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -9790,7 +9790,7 @@ - (CGContextRef) getContext IOSurfaceRef surface = NULL; NSTRACE ("[EmacsSurface getContextWithSize:]"); - NSTRACE_MSG (@"IOSurface count: %lu", [cache count] + (lastSurface ? 1 : 0)); + NSTRACE_MSG ("IOSurface count: %lu", [cache count] + (lastSurface ? 1 : 0)); for (id object in cache) { commit 4e1f92feb3a861f93b7a285715d03be930b41b91 Author: Alan Third Date: Wed Mar 24 22:50:03 2021 +0000 Implement frame-scale-factor * src/frame.c (Fframe_scale_factor): New function. (syms_of_frame): Add frame-scale-factor. * src/frame.h: Add FRAME_SCALE_FACTOR. * src/image.c: Move FRAME_SCALE_FACTOR to frame.h. diff --git a/src/frame.c b/src/frame.c index 66ae4943ba..784a079bff 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3744,6 +3744,17 @@ window state change flag is reset. */) return (FRAME_WINDOW_STATE_CHANGE (f) = !NILP (arg)) ? Qt : Qnil; } +DEFUN ("frame-scale-factor", Fframe_scale_factor, Sframe_scale_factor, + 0, 1, 0, + doc: /* Return FRAMEs scale factor. +The scale factor is the amount a logical pixel size must be multiplied +to find the real number of pixels. */) + (Lisp_Object frame) +{ + struct frame *f = decode_live_frame (frame); + + return (make_float (FRAME_SCALE_FACTOR (f))); +} /*********************************************************************** Frame Parameters @@ -6457,6 +6468,7 @@ iconify the top level frame instead. */); defsubr (&Sframe_pointer_visible_p); defsubr (&Sframe_window_state_change); defsubr (&Sset_frame_window_state_change); + defsubr (&Sframe_scale_factor); #ifdef HAVE_WINDOW_SYSTEM defsubr (&Sx_get_resource); diff --git a/src/frame.h b/src/frame.h index 9ddcb4c681..9963112036 100644 --- a/src/frame.h +++ b/src/frame.h @@ -907,6 +907,13 @@ default_pixels_per_inch_y (void) (WINDOWP (f->minibuffer_window) \ && XFRAME (XWINDOW (f->minibuffer_window)->frame) == f) +/* Scale factor of frame F. */ +#if defined HAVE_NS +# define FRAME_SCALE_FACTOR(f) (FRAME_NS_P (f) ? ns_frame_scale_factor (f) : 1) +#else +# define FRAME_SCALE_FACTOR(f) 1; +#endif + /* Pixel width of frame F. */ #define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width) diff --git a/src/image.c b/src/image.c index b85418c690..774b7e14ea 100644 --- a/src/image.c +++ b/src/image.c @@ -135,14 +135,6 @@ typedef struct ns_bitmap_record Bitmap_Record; # define COLOR_TABLE_SUPPORT 1 #endif -#ifdef HAVE_RSVG -#if defined HAVE_NS -# define FRAME_SCALE_FACTOR(f) ns_frame_scale_factor (f) -#else -# define FRAME_SCALE_FACTOR(f) 1; -#endif -#endif - static void image_disable_image (struct frame *, struct image *); static void image_edge_detection (struct frame *, struct image *, Lisp_Object, Lisp_Object); commit b0d095b2cdff7b43ab3866a2d541d18e359a4125 Author: Stefan Kangas Date: Sat Apr 3 21:53:06 2021 +0200 Add SVG icons for customize buffers * etc/images/checkbox-mixed.svg: * etc/images/checked.svg: * etc/images/down.svg: * etc/images/left.svg: * etc/images/radio-checked.svg: * etc/images/radio-mixed.svg: * etc/images/radio.svg: * etc/images/right.svg: * etc/images/unchecked.svg: * etc/images/up.svg: New files from the Adwaita Icon Theme (made by the GNOME project). The background color was changed from gray to none to use the same colors as the current face instead. (Bug#47074) * etc/images/README: Add license information for the above new files. * lisp/wid-edit.el (widget-image-conversion): Prefer SVG if it exists. (radio-button): Rename radio buttons to "radio-checked" and "radio". These files did not exist before. diff --git a/etc/images/README b/etc/images/README index 00aac4f510..9bbe796cc9 100644 --- a/etc/images/README +++ b/etc/images/README @@ -104,3 +104,30 @@ same conditions. The *.pbm files were generally converted from *.xpm by running GIMP or ImageMagick's 'convert'. + + +* The following icons are from the Adwaita Icon Theme (made by the +GNOME project). They are not part of Emacs, but are distributed and +used by Emacs. They are licensed under either the GNU LGPL v3 or the +Creative Commons Attribution-Share Alike 3.0 United States License. + +To view a copy of the CC-BY-SA licence, visit +http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative +Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA. + +For more information see the adwaita-icon-theme repository at: + + https://gitlab.gnome.org/GNOME/adwaita-icon-theme + +Emacs images and their source in the Adwaita/scalable directory: + + checked.svg ui/checkbox-checked-symbolic.svg + unchecked.svg ui/checkbox-symbolic.svg + checkbox-mixed.svg ui/checkbox-mixed-symbolic.svg + radio.svg ui/radio-symbolic.svg + radio-mixed.svg ui/radio-mixed-symbolic.svg + radio-checked.svg ui/radio-checked-symbolic.svg + down.svg ui/pan-down-symbolic.svg + left.svg ui/pan-start-symbolic.svg + right.svg ui/pan-end-symbolic.svg + up.svg ui/pan-up-symbolic.svg diff --git a/etc/images/checkbox-mixed.svg b/etc/images/checkbox-mixed.svg new file mode 100644 index 0000000000..13bccaa7ce --- /dev/null +++ b/etc/images/checkbox-mixed.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/etc/images/checked.svg b/etc/images/checked.svg new file mode 100644 index 0000000000..6fefd5569e --- /dev/null +++ b/etc/images/checked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/etc/images/down.svg b/etc/images/down.svg new file mode 100644 index 0000000000..e2760427d7 --- /dev/null +++ b/etc/images/down.svg @@ -0,0 +1,40 @@ + + + + + + + + + + image/svg+xml + + Gnome Symbolic Icons + + + + + + + + + + + + + Gnome Symbolic Icons + + + + + + + + + + + + + + + diff --git a/etc/images/left.svg b/etc/images/left.svg new file mode 100644 index 0000000000..d6429bc410 --- /dev/null +++ b/etc/images/left.svg @@ -0,0 +1,40 @@ + + + + + + + + + + image/svg+xml + + Gnome Symbolic Icons + + + + + + + + + + + + + Gnome Symbolic Icons + + + + + + + + + + + + + + + diff --git a/etc/images/radio-checked.svg b/etc/images/radio-checked.svg new file mode 100644 index 0000000000..db711841cf --- /dev/null +++ b/etc/images/radio-checked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/etc/images/radio-mixed.svg b/etc/images/radio-mixed.svg new file mode 100644 index 0000000000..5a8be0cf65 --- /dev/null +++ b/etc/images/radio-mixed.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/etc/images/radio.svg b/etc/images/radio.svg new file mode 100644 index 0000000000..0d649c99cd --- /dev/null +++ b/etc/images/radio.svg @@ -0,0 +1,3 @@ + + + diff --git a/etc/images/right.svg b/etc/images/right.svg new file mode 100644 index 0000000000..d58cd36435 --- /dev/null +++ b/etc/images/right.svg @@ -0,0 +1,40 @@ + + + + + + + + + + image/svg+xml + + Gnome Symbolic Icons + + + + + + + + + + + + + Gnome Symbolic Icons + + + + + + + + + + + + + + + diff --git a/etc/images/unchecked.svg b/etc/images/unchecked.svg new file mode 100644 index 0000000000..18cd25b43f --- /dev/null +++ b/etc/images/unchecked.svg @@ -0,0 +1,3 @@ + + + diff --git a/etc/images/up.svg b/etc/images/up.svg new file mode 100644 index 0000000000..9e1a245be7 --- /dev/null +++ b/etc/images/up.svg @@ -0,0 +1,40 @@ + + + + + + + + + + image/svg+xml + + Gnome Symbolic Icons + + + + + + + + + + + + + Gnome Symbolic Icons + + + + + + + + + + + + + + + diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 51c6b49e6d..49baab6919 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -750,7 +750,7 @@ automatically." :type 'boolean) (defcustom widget-image-conversion - '((xpm ".xpm") (gif ".gif") (png ".png") (jpeg ".jpg" ".jpeg") + '((svg ".svg") (xpm ".xpm") (gif ".gif") (png ".png") (jpeg ".jpg" ".jpeg") (xbm ".xbm")) "Conversion alist from image formats to file name suffixes." :group 'widgets @@ -2564,9 +2564,9 @@ Return an alist of (TYPE MATCH)." :button-suffix "" :button-prefix "" :on "(*)" - :on-glyph "radio1" + :on-glyph "radio-checked" :off "( )" - :off-glyph "radio0") + :off-glyph "radio") (defun widget-radio-button-notify (widget _child &optional event) ;; Tell daddy. commit ebc2b78c8bffc40f3bc863d333dccc0b26def3b4 Author: Stefan Monnier Date: Sat Apr 3 14:15:43 2021 -0400 * lisp/vcursor.el: Use lexical-binding Remove redundant `:group` args. (vcursor): Remove unused var declaration. diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 595a25381a..e219dc2d1a 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -1,4 +1,4 @@ -;;; vcursor.el --- manipulate an alternative ("virtual") cursor +;;; vcursor.el --- manipulate an alternative ("virtual") cursor -*- lexical-binding: t; -*- ;; Copyright (C) 1994, 1996, 1998, 2001-2021 Free Software Foundation, ;; Inc. @@ -27,24 +27,24 @@ ;; Latest changes ;; ============== ;; -;; - *IMPORTANT* vcursor-key-bindings is now nil by default, to avoid +;; - *IMPORTANT* `vcursor-key-bindings' is now nil by default, to avoid ;; side-effects when the package is loaded. This means no keys are ;; bound by default. Use customize to change it to t to restore ;; the old behavior. (If you do it by hand in .emacs, it ;; must come before vcursor is loaded.) ;; - You can alter the main variables and the vcursor face via ;; M-x customize: go to the Editing group and find Vcursor. -;; - vcursor-auto-disable can now be 'copy (actually any value not nil +;; - `vcursor-auto-disable' can now be 'copy (actually any value not nil ;; or t), which means that copying from the vcursor will be turned ;; off after any operation not involving the vcursor, but the ;; vcursor itself will be left alone. ;; - works on dumb terminals ;; - new keymap vcursor-map for binding to a prefix key -;; - vcursor-compare-windows substantially improved -;; - vcursor-execute-{key,command} much better about using the +;; - `vcursor-compare-windows' substantially improved +;; - `vcursor-execute-{key,command}' much better about using the ;; right keymaps and arranging for the correct windows to be used -;; - vcursor-window-funcall can call functions interactively -;; - vcursor-interpret-input for special effects +;; - `vcursor-window-funcall' can call functions interactively +;; - `vcursor-interpret-input' for special effects ;; ;; Introduction ;; ============ @@ -326,21 +326,18 @@ (defface vcursor '((((class color)) (:foreground "blue" :background "cyan" :underline t)) (t (:inverse-video t :underline t))) - "Face for the virtual cursor." - :group 'vcursor) + "Face for the virtual cursor.") (defcustom vcursor-auto-disable nil "If non-nil, disable the virtual cursor after use. Any non-vcursor command will force `vcursor-disable' to be called. If non-nil but not t, just make sure copying is toggled off, but don't disable the vcursor." - :type '(choice (const t) (const nil) (const copy)) - :group 'vcursor) + :type '(choice (const t) (const nil) (const copy))) (defcustom vcursor-modifiers (list 'control 'shift) "A list of modifiers that are used to define vcursor key bindings." - :type '(repeat symbol) - :group 'vcursor) + :type '(repeat symbol)) ;; Needed for defcustom, must be up here (defun vcursor-cs-binding (base &optional meta) @@ -349,112 +346,114 @@ disable the vcursor." (cons 'meta key) key)))) +;; (defvar vcursor) + (defun vcursor-bind-keys (var value) "Alter the value of the variable VAR to VALUE, binding keys as required. VAR is usually `vcursor-key-bindings'. Normally this function is called on loading vcursor and from the customize package." (set var value) (cond - ((not value));; don't set any key bindings + ((not value)) ;; Don't set any key bindings. ((or (eq value 'oemacs) (and (eq value t) (fboundp 'oemacs-version))) - (global-set-key [C-f1] 'vcursor-toggle-copy) - (global-set-key [C-f2] 'vcursor-copy) - (global-set-key [C-f3] 'vcursor-copy-word) - (global-set-key [C-f4] 'vcursor-copy-line) - - (global-set-key [S-f1] 'vcursor-disable) - (global-set-key [S-f2] 'vcursor-other-window) - (global-set-key [S-f3] 'vcursor-goto) - (global-set-key [S-f4] 'vcursor-swap-point) - - (global-set-key [C-f5] 'vcursor-backward-char) - (global-set-key [C-f6] 'vcursor-previous-line) - (global-set-key [C-f7] 'vcursor-next-line) - (global-set-key [C-f8] 'vcursor-forward-char) - - (global-set-key [M-f5] 'vcursor-beginning-of-line) - (global-set-key [M-f6] 'vcursor-backward-word) - (global-set-key [M-f6] 'vcursor-forward-word) - (global-set-key [M-f8] 'vcursor-end-of-line) - - (global-set-key [S-f5] 'vcursor-beginning-of-buffer) - (global-set-key [S-f6] 'vcursor-scroll-down) - (global-set-key [S-f7] 'vcursor-scroll-up) - (global-set-key [S-f8] 'vcursor-end-of-buffer) - - (global-set-key [C-f9] 'vcursor-isearch-forward) - - (global-set-key [S-f9] 'vcursor-execute-key) - (global-set-key [S-f10] 'vcursor-execute-command) - -;;; Partial dictionary of Oemacs key sequences for you to roll your own, -;;; e.g C-S-up: (global-set-key "\M-[\C-f\M-\C-m" 'vcursor-previous-line) -;;; Sequence: Sends: -;;; "\M-[\C-f\M-\C-m" C-S-up -;;; "\M-[\C-f\M-\C-q" C-S-down -;;; "\M-[\C-fs" C-S-left -;;; "\M-[\C-ft" C-S-right -;;; -;;; "\M-[\C-fw" C-S-home -;;; "\M-[\C-b\C-o" S-tab -;;; "\M-[\C-f\M-\C-r" C-S-insert -;;; "\M-[\C-fu" C-S-end -;;; "\M-[\C-f\M-\C-s" C-S-delete -;;; "\M-[\C-f\M-\C-d" C-S-prior -;;; "\M-[\C-fv" C-S-next -;;; -;;; "\M-[\C-f^" C-S-f1 -;;; "\M-[\C-f_" C-S-f2 -;;; "\M-[\C-f`" C-S-f3 -;;; "\M-[\C-fa" C-S-f4 -;;; "\M-[\C-fb" C-S-f5 -;;; "\M-[\C-fc" C-S-f6 -;;; "\M-[\C-fd" C-S-f7 -;;; "\M-[\C-fe" C-S-f8 -;;; "\M-[\C-ff" C-S-f9 -;;; "\M-[\C-fg" C-S-f10 + (global-set-key [C-f1] #'vcursor-toggle-copy) + (global-set-key [C-f2] #'vcursor-copy) + (global-set-key [C-f3] #'vcursor-copy-word) + (global-set-key [C-f4] #'vcursor-copy-line) + + (global-set-key [S-f1] #'vcursor-disable) + (global-set-key [S-f2] #'vcursor-other-window) + (global-set-key [S-f3] #'vcursor-goto) + (global-set-key [S-f4] #'vcursor-swap-point) + + (global-set-key [C-f5] #'vcursor-backward-char) + (global-set-key [C-f6] #'vcursor-previous-line) + (global-set-key [C-f7] #'vcursor-next-line) + (global-set-key [C-f8] #'vcursor-forward-char) + + (global-set-key [M-f5] #'vcursor-beginning-of-line) + (global-set-key [M-f6] #'vcursor-backward-word) + (global-set-key [M-f6] #'vcursor-forward-word) + (global-set-key [M-f8] #'vcursor-end-of-line) + + (global-set-key [S-f5] #'vcursor-beginning-of-buffer) + (global-set-key [S-f6] #'vcursor-scroll-down) + (global-set-key [S-f7] #'vcursor-scroll-up) + (global-set-key [S-f8] #'vcursor-end-of-buffer) + + (global-set-key [C-f9] #'vcursor-isearch-forward) + + (global-set-key [S-f9] #'vcursor-execute-key) + (global-set-key [S-f10] #'vcursor-execute-command) + + ;; Partial dictionary of Oemacs key sequences for you to roll your own, + ;; e.g C-S-up: (global-set-key "\M-[\C-f\M-\C-m" 'vcursor-previous-line) + ;; Sequence: Sends: + ;; "\M-[\C-f\M-\C-m" C-S-up + ;; "\M-[\C-f\M-\C-q" C-S-down + ;; "\M-[\C-fs" C-S-left + ;; "\M-[\C-ft" C-S-right + ;; + ;; "\M-[\C-fw" C-S-home + ;; "\M-[\C-b\C-o" S-tab + ;; "\M-[\C-f\M-\C-r" C-S-insert + ;; "\M-[\C-fu" C-S-end + ;; "\M-[\C-f\M-\C-s" C-S-delete + ;; "\M-[\C-f\M-\C-d" C-S-prior + ;; "\M-[\C-fv" C-S-next + ;; + ;; "\M-[\C-f^" C-S-f1 + ;; "\M-[\C-f_" C-S-f2 + ;; "\M-[\C-f`" C-S-f3 + ;; "\M-[\C-fa" C-S-f4 + ;; "\M-[\C-fb" C-S-f5 + ;; "\M-[\C-fc" C-S-f6 + ;; "\M-[\C-fd" C-S-f7 + ;; "\M-[\C-fe" C-S-f8 + ;; "\M-[\C-ff" C-S-f9 + ;; "\M-[\C-fg" C-S-f10 ) (t - (global-set-key (vcursor-cs-binding "up") 'vcursor-previous-line) - (global-set-key (vcursor-cs-binding "down") 'vcursor-next-line) - (global-set-key (vcursor-cs-binding "left") 'vcursor-backward-char) - (global-set-key (vcursor-cs-binding "right") 'vcursor-forward-char) - - (global-set-key (vcursor-cs-binding "return") 'vcursor-disable) - (global-set-key (vcursor-cs-binding "insert") 'vcursor-copy) - (global-set-key (vcursor-cs-binding "delete") 'vcursor-copy-word) - (global-set-key (vcursor-cs-binding "remove") 'vcursor-copy-word) - (global-set-key (vcursor-cs-binding "tab") 'vcursor-toggle-copy) - (global-set-key (vcursor-cs-binding "backtab") 'vcursor-toggle-copy) - (global-set-key (vcursor-cs-binding "home") 'vcursor-beginning-of-buffer) - (global-set-key (vcursor-cs-binding "up" t) 'vcursor-beginning-of-buffer) - (global-set-key (vcursor-cs-binding "end") 'vcursor-end-of-buffer) - (global-set-key (vcursor-cs-binding "down" t) 'vcursor-end-of-buffer) - (global-set-key (vcursor-cs-binding "prior") 'vcursor-scroll-down) - (global-set-key (vcursor-cs-binding "next") 'vcursor-scroll-up) - - (global-set-key (vcursor-cs-binding "f6") 'vcursor-other-window) - (global-set-key (vcursor-cs-binding "f7") 'vcursor-goto) + (global-set-key (vcursor-cs-binding "up") #'vcursor-previous-line) + (global-set-key (vcursor-cs-binding "down") #'vcursor-next-line) + (global-set-key (vcursor-cs-binding "left") #'vcursor-backward-char) + (global-set-key (vcursor-cs-binding "right") #'vcursor-forward-char) + + (global-set-key (vcursor-cs-binding "return") #'vcursor-disable) + (global-set-key (vcursor-cs-binding "insert") #'vcursor-copy) + (global-set-key (vcursor-cs-binding "delete") #'vcursor-copy-word) + (global-set-key (vcursor-cs-binding "remove") #'vcursor-copy-word) + (global-set-key (vcursor-cs-binding "tab") #'vcursor-toggle-copy) + (global-set-key (vcursor-cs-binding "backtab") #'vcursor-toggle-copy) + (global-set-key (vcursor-cs-binding "home") #'vcursor-beginning-of-buffer) + (global-set-key (vcursor-cs-binding "up" t) #'vcursor-beginning-of-buffer) + (global-set-key (vcursor-cs-binding "end") #'vcursor-end-of-buffer) + (global-set-key (vcursor-cs-binding "down" t) #'vcursor-end-of-buffer) + (global-set-key (vcursor-cs-binding "prior") #'vcursor-scroll-down) + (global-set-key (vcursor-cs-binding "next") #'vcursor-scroll-up) + + (global-set-key (vcursor-cs-binding "f6") #'vcursor-other-window) + (global-set-key (vcursor-cs-binding "f7") #'vcursor-goto) (global-set-key (vcursor-cs-binding "select") - 'vcursor-swap-point) ; DEC keyboards - (global-set-key (vcursor-cs-binding "tab" t) 'vcursor-swap-point) + #'vcursor-swap-point) ; DEC keyboards + (global-set-key (vcursor-cs-binding "tab" t) #'vcursor-swap-point) (global-set-key (vcursor-cs-binding "find") - 'vcursor-isearch-forward) ; DEC keyboards - (global-set-key (vcursor-cs-binding "f8") 'vcursor-isearch-forward) + #'vcursor-isearch-forward) ; DEC keyboards + (global-set-key (vcursor-cs-binding "f8") #'vcursor-isearch-forward) - (global-set-key (vcursor-cs-binding "left" t) 'vcursor-beginning-of-line) - (global-set-key (vcursor-cs-binding "right" t) 'vcursor-end-of-line) + (global-set-key (vcursor-cs-binding "left" t) #'vcursor-beginning-of-line) + (global-set-key (vcursor-cs-binding "right" t) #'vcursor-end-of-line) - (global-set-key (vcursor-cs-binding "prior" t) 'vcursor-backward-word) - (global-set-key (vcursor-cs-binding "next" t) 'vcursor-forward-word) + (global-set-key (vcursor-cs-binding "prior" t) #'vcursor-backward-word) + (global-set-key (vcursor-cs-binding "next" t) #'vcursor-forward-word) - (global-set-key (vcursor-cs-binding "return" t) 'vcursor-copy-line) + (global-set-key (vcursor-cs-binding "return" t) #'vcursor-copy-line) - (global-set-key (vcursor-cs-binding "f9") 'vcursor-execute-key) - (global-set-key (vcursor-cs-binding "f10") 'vcursor-execute-command) + (global-set-key (vcursor-cs-binding "f9") #'vcursor-execute-key) + (global-set-key (vcursor-cs-binding "f10") #'vcursor-execute-command) ))) (defcustom vcursor-key-bindings nil @@ -465,8 +464,7 @@ define any key bindings. Default is nil." :type '(choice (const t) (const nil) (const xterm) (const oemacs)) - :group 'vcursor - :set 'vcursor-bind-keys + :set #'vcursor-bind-keys :version "20.3") (defcustom vcursor-interpret-input nil @@ -475,13 +473,11 @@ This will cause text insertion to be much slower. Note that no special interpretation of strings is done: \"\C-x\" is a string of four characters. The default is simply to copy strings." :type 'boolean - :group 'vcursor :version "20.3") (defcustom vcursor-string "**>" "String used to show the vcursor position on dumb terminals." :type 'string - :group 'vcursor :version "20.3") (defvar vcursor-overlay nil @@ -501,42 +497,41 @@ scrolling set this. It is used by the `vcursor-auto-disable' code.") (defcustom vcursor-copy-flag nil "Non-nil means moving vcursor should copy characters moved over to point." - :type 'boolean - :group 'vcursor) + :type 'boolean) (defvar vcursor-temp-goal-column nil "Keeps track of temporary goal columns for the virtual cursor.") (defvar vcursor-map (let ((map (make-sparse-keymap))) - (define-key map "t" 'vcursor-use-vcursor-map) - - (define-key map "\C-p" 'vcursor-previous-line) - (define-key map "\C-n" 'vcursor-next-line) - (define-key map "\C-b" 'vcursor-backward-char) - (define-key map "\C-f" 'vcursor-forward-char) - - (define-key map "\r" 'vcursor-disable) - (define-key map " " 'vcursor-copy) - (define-key map "\C-y" 'vcursor-copy-word) - (define-key map "\C-i" 'vcursor-toggle-copy) - (define-key map "<" 'vcursor-beginning-of-buffer) - (define-key map ">" 'vcursor-end-of-buffer) - (define-key map "\M-v" 'vcursor-scroll-down) - (define-key map "\C-v" 'vcursor-scroll-up) - (define-key map "o" 'vcursor-other-window) - (define-key map "g" 'vcursor-goto) - (define-key map "x" 'vcursor-swap-point) - (define-key map "\C-s" 'vcursor-isearch-forward) - (define-key map "\C-r" 'vcursor-isearch-backward) - (define-key map "\C-a" 'vcursor-beginning-of-line) - (define-key map "\C-e" 'vcursor-end-of-line) - (define-key map "\M-w" 'vcursor-forward-word) - (define-key map "\M-b" 'vcursor-backward-word) - (define-key map "\M-l" 'vcursor-copy-line) - (define-key map "c" 'vcursor-compare-windows) - (define-key map "k" 'vcursor-execute-key) - (define-key map "\M-x" 'vcursor-execute-command) + (define-key map "t" #'vcursor-use-vcursor-map) + + (define-key map "\C-p" #'vcursor-previous-line) + (define-key map "\C-n" #'vcursor-next-line) + (define-key map "\C-b" #'vcursor-backward-char) + (define-key map "\C-f" #'vcursor-forward-char) + + (define-key map "\r" #'vcursor-disable) + (define-key map " " #'vcursor-copy) + (define-key map "\C-y" #'vcursor-copy-word) + (define-key map "\C-i" #'vcursor-toggle-copy) + (define-key map "<" #'vcursor-beginning-of-buffer) + (define-key map ">" #'vcursor-end-of-buffer) + (define-key map "\M-v" #'vcursor-scroll-down) + (define-key map "\C-v" #'vcursor-scroll-up) + (define-key map "o" #'vcursor-other-window) + (define-key map "g" #'vcursor-goto) + (define-key map "x" #'vcursor-swap-point) + (define-key map "\C-s" #'vcursor-isearch-forward) + (define-key map "\C-r" #'vcursor-isearch-backward) + (define-key map "\C-a" #'vcursor-beginning-of-line) + (define-key map "\C-e" #'vcursor-end-of-line) + (define-key map "\M-w" #'vcursor-forward-word) + (define-key map "\M-b" #'vcursor-backward-word) + (define-key map "\M-l" #'vcursor-copy-line) + (define-key map "c" #'vcursor-compare-windows) + (define-key map "k" #'vcursor-execute-key) + (define-key map "\M-x" #'vcursor-execute-command) map) "Keymap for vcursor command.") ;; This seems unused, but it was done as part of define-prefix-command, @@ -611,7 +606,8 @@ Set `vcursor-window' to the returned value as a side effect." (cond (winok) ; choice 2 ((and vcursor-window ; choice 3 - (not (eq thiswin vcursor-window))) vcursor-window) + (not (eq thiswin vcursor-window))) + vcursor-window) (winbuf) ; choice 4 (new-win (display-buffer (current-buffer) t)) ; choice 5 (t nil))))))) ; default (choice 6) @@ -719,16 +715,14 @@ not be visible otherwise, display it in another window." The vcursor will always appear in an unselected window." (interactive "P") - (vcursor-window-funcall 'scroll-up n) -) + (vcursor-window-funcall #'scroll-up n)) (defun vcursor-scroll-down (&optional n) "Scroll down the vcursor window ARG lines or near full screen if none. The vcursor will always appear in an unselected window." (interactive "P") - (vcursor-window-funcall 'scroll-down n) - ) + (vcursor-window-funcall #'scroll-down n)) (defun vcursor-isearch-forward (&optional rep norecurs) "Perform forward incremental search in the virtual cursor window. @@ -736,7 +730,7 @@ The virtual cursor is moved to the resulting point; the ordinary cursor stays where it was." (interactive "P") - (vcursor-window-funcall 'isearch-forward rep norecurs) + (vcursor-window-funcall #'isearch-forward rep norecurs) ) (defun vcursor-isearch-backward (&optional rep norecurs) @@ -745,7 +739,7 @@ The virtual cursor is moved to the resulting point; the ordinary cursor stays where it was." (interactive "P") - (vcursor-window-funcall 'isearch-backward rep norecurs) + (vcursor-window-funcall #'isearch-backward rep norecurs) ) (defun vcursor-window-funcall (func &rest args) @@ -891,7 +885,7 @@ A prefix argument, if any, means ignore changes in whitespace. The variable `compare-windows-whitespace' controls how whitespace is skipped. If `compare-ignore-case' is non-nil, changes in case are also ignored." (interactive "P") - ;; (vcursor-window-funcall 'compare-windows arg) + ;; (vcursor-window-funcall #'compare-windows arg) (require 'compare-w) (let* (p1 p2 maxp1 maxp2 b1 b2 w2 success @@ -1005,32 +999,32 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (defun vcursor-forward-char (arg) "Move the virtual cursor forward ARG characters." (interactive "p") - (vcursor-relative-move 'forward-char arg) + (vcursor-relative-move #'forward-char arg) ) (defun vcursor-backward-char (arg) "Move the virtual cursor backward ARG characters." (interactive "p") - (vcursor-relative-move 'backward-char arg) + (vcursor-relative-move #'backward-char arg) ) (defun vcursor-forward-word (arg) "Move the virtual cursor forward ARG words." (interactive "p") - (vcursor-relative-move 'forward-word arg) + (vcursor-relative-move #'forward-word arg) ) (defun vcursor-backward-word (arg) "Move the virtual cursor backward ARG words." (interactive "p") - (vcursor-relative-move 'backward-word arg) + (vcursor-relative-move #'backward-word arg) ) (defun vcursor-beginning-of-line (arg) "Move the virtual cursor to beginning of its current line. ARG is as for `beginning-of-line'." (interactive "P") - (vcursor-relative-move 'beginning-of-line + (vcursor-relative-move #'beginning-of-line (if arg (prefix-numeric-value arg))) ) @@ -1038,7 +1032,7 @@ ARG is as for `beginning-of-line'." "Move the virtual cursor to end of its current line. ARG is as for `end-of-line'." (interactive "P") - (vcursor-relative-move 'end-of-line + (vcursor-relative-move #'end-of-line (if arg (prefix-numeric-value arg))) ) @@ -1110,7 +1104,7 @@ is called interactively, so prefix argument etc. are usable." (defun vcursor-copy-word (arg) "Copy ARG words from the virtual cursor position to point." (interactive "p") - (vcursor-copy (vcursor-get-char-count 'forward-word arg)) + (vcursor-copy (vcursor-get-char-count #'forward-word arg)) ) (defun vcursor-copy-line (arg) @@ -1123,7 +1117,7 @@ line is treated like ordinary characters." (interactive "P") (let* ((num (prefix-numeric-value arg)) - (count (vcursor-get-char-count 'end-of-line num))) + (count (vcursor-get-char-count #'end-of-line num))) (vcursor-copy (if (or (= count 0) arg) (1+ count) count))) ) @@ -1136,7 +1130,7 @@ line is treated like ordinary characters." (setq vcursor-last-command nil) ) -(add-hook 'post-command-hook 'vcursor-post-command) +(add-hook 'post-command-hook #'vcursor-post-command) (provide 'vcursor) commit 4eca3bd8df9a1092d322eb6af7108a3ea27c21b1 Author: Michael Albinus Date: Sat Apr 3 18:25:27 2021 +0200 * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Fix code finding //DIRED//. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 255314a99e..c3e1745d2f 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2584,12 +2584,9 @@ The method used must be an out-of-band method." (save-restriction (narrow-to-region beg-marker end-marker) ;; Check for "--dired" output. - (forward-line -2) - (when (looking-at-p "//SUBDIRED//") - (forward-line -1)) - (when (looking-at "//DIRED//\\s-+") - (let ((beg (match-end 0)) - (end (point-at-eol))) + (when (re-search-backward "^//DIRED//\\s-+\\(.+\\)$" nil 'noerror) + (let ((beg (match-beginning 1)) + (end (match-end 0))) ;; Now read the numeric positions of file names. (goto-char beg) (while (< (point) end) @@ -2599,7 +2596,7 @@ The method used must be an out-of-band method." ;; End is followed by \n or by " -> ". (put-text-property start end 'dired-filename t)))))) ;; Remove trailing lines. - (goto-char (point-at-bol)) + (beginning-of-line) (while (looking-at "//") (forward-line 1) (delete-region (match-beginning 0) (point)))) commit d47706c552eb8a8cd8caff03622201fcd78639c8 Author: Stefan Kangas Date: Sat Apr 3 12:13:52 2021 +0200 ; Remove some redundant installation instructions diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index dc45a7306d..22ade15921 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -106,13 +106,6 @@ ;; If you add a new drawing mode, send it to me, and I would gladly ;; include in the next release! -;;; Installation: - -;; To use artist, put this in your .emacs: -;; -;; (autoload 'artist-mode "artist" "Enter artist-mode" t) - - ;;; Requirements: ;; Artist requires the `rect' package (which comes with Emacs) to be diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index fda8605c67..e37c09df7c 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -27,14 +27,6 @@ ;; system. ;; -;;; Installation: - -;; To install: put this file on the load-path and add Git to the list -;; of supported backends in `vc-handled-backends'; the following line, -;; placed in your init file, will accomplish this: -;; -;; (add-to-list 'vc-handled-backends 'Git) - ;;; Todo: ;; - check if more functions could use vc-git-command instead ;; of start-process. diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 2bc6ae3524..a054a7c317 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -30,8 +30,6 @@ ;;; Bugs: -;;; Installation: - ;;; Todo: ;; 1) Implement the rest of the vc interface. See the comment at the commit 860bc0db1cdf4ec58299013074edb3a3925f9dce Author: Michael Albinus Date: Sat Apr 3 12:26:14 2021 +0200 * test/lisp/filenotify-tests.el (file-notify--test-timeout): Change timing. ; * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): ; Remove test message. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 73e0807dbc..255314a99e 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3740,8 +3740,6 @@ Fall back to normal file name handler if no Tramp handler exists." "changes done" "changes-done-hint" string) string (tramp-compat-string-replace "renamed to" "moved" string)) - (when (getenv "EMACS_EMBA_CI") - (message "%s" string)) (catch 'doesnt-work ;; https://bugs.launchpad.net/bugs/1742946 diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 4a2f1f9a67..cca8aeb97d 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -117,8 +117,8 @@ There are different timeouts for local and remote file notification libraries." (defun file-notify--test-timeout () "Timeout to wait for arriving a bunch of events, in seconds." (cond + ((file-remote-p temporary-file-directory) 20) ((eq system-type 'cygwin) 10) - ((file-remote-p temporary-file-directory) 6) ((string-equal (file-notify--test-library) "w32notify") 4) (t 3)))