commit f7ee23e587b01f179284b5554c67d579a2def676 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Aug 15 17:23:14 2015 -0700 substitute-command-keys a few more doc strings * lisp/allout.el (outlineify-sticky): * lisp/files.el (hack-one-local-variable--obsolete): * lisp/help-fns.el (help-fns--obsolete, describe-variable): Use substitute-command-keys on some doc strings so that they don't use hard-coded key bindings or quoting styles. diff --git a/lisp/allout.el b/lisp/allout.el index db87cb1..025cb17 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -6378,8 +6378,9 @@ for details on preparing Emacs for automatic allout activation." (if (allout-goto-prefix) t (allout-open-topic 2) - (insert (concat "Dummy outline topic header -- see" - "`allout-mode' docstring: `^Hm'.")) + (insert (substitute-command-keys + (concat "Dummy outline topic header -- see" + " ‘allout-mode’ docstring: ‘\\[describe-mode]’."))) (allout-adjust-file-variable "allout-layout" (or allout-layout '(-1 : 0)))))) ;;;_ > allout-file-vars-section-data () diff --git a/lisp/files.el b/lisp/files.el index a371344..dd0f286 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3554,7 +3554,8 @@ It is dangerous if either of these conditions are met: (since (nth 2 o))) (message "%s is obsolete%s; %s" var (if since (format " (since %s)" since)) - (if (stringp instead) instead + (if (stringp instead) + (substitute-command-keys instead) (format "use `%s' instead" instead))))))) (defun hack-one-local-variable (var val) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a5d3834..71bcdb6 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -438,7 +438,8 @@ suitable file is found, return nil." " is obsolete") (when (nth 2 obsolete) (insert (format " since %s" (nth 2 obsolete)))) - (insert (cond ((stringp use) (concat ";\n" use)) + (insert (cond ((stringp use) + (concat ";\n" (substitute-command-keys use))) (use (format ";\nuse ‘%s’ instead." use)) (t ".")) "\n")))) @@ -871,7 +872,8 @@ if it is given a local binding.\n"))) (princ " This variable is obsolete") (if (nth 2 obsolete) (princ (format " since %s" (nth 2 obsolete)))) - (princ (cond ((stringp use) (concat ";\n " use)) + (princ (cond ((stringp use) + (concat ";\n " (substitute-command-keys use))) (use (format ";\n use ‘%s’ instead." (car obsolete))) (t "."))) commit 59b5141dd7247260cbc383e0bc2afde139d55670 Author: Paul Eggert Date: Sat Aug 15 17:16:28 2015 -0700 Fix quoting in Fformat calls * src/image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load) (xpm_load, xpm_load_image, pbm_load, png_load_body) (jpeg_load_body, tiff_load, gif_load, imagemagick_load_image) (imagemagick_load, svg_load, svg_load_image, gs_load) (x_kill_gs_process): * src/lread.c (load_warn_old_style_backquotes): * src/xfaces.c (load_pixmap): * src/xselect.c (x_clipboard_manager_error_1): Quote diagnostics according to user preference when calling Fformat or its derivatives. diff --git a/src/image.c b/src/image.c index 313419b..fb8c6e7 100644 --- a/src/image.c +++ b/src/image.c @@ -2794,7 +2794,7 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e if (!check_image_size (f, *width, *height)) { if (!inhibit_image_error) - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto failure; } else if (data == NULL) @@ -2939,13 +2939,14 @@ xbm_load_image (struct frame *f, struct image *img, unsigned char *contents, if (img->pixmap == NO_PIXMAP) { x_clear_image (f, img); - image_error ("Unable to create X pixmap for `%s'", img->spec); + image_error ("Unable to create X pixmap for "uLSQM"%s"uRSQM, + img->spec); } else success_p = 1; } else - image_error ("Error loading XBM image `%s'", img->spec); + image_error ("Error loading XBM image "uLSQM"%s"uRSQM, img->spec); return success_p; } @@ -2986,14 +2987,14 @@ xbm_load (struct frame *f, struct image *img) file = x_find_image_file (file_name); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", file_name); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, file_name); return 0; } contents = slurp_file (SSDATA (file), &size); if (contents == NULL) { - image_error ("Error loading XBM image `%s'", img->spec); + image_error ("Error loading XBM image "uLSQM"%s"uRSQM, img->spec); return 0; } @@ -3028,7 +3029,8 @@ xbm_load (struct frame *f, struct image *img) eassert (img->width > 0 && img->height > 0); if (!check_image_size (f, img->width, img->height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see " + uLSQM"max-image-size"uRSQM")"); return 0; } } @@ -3105,7 +3107,8 @@ xbm_load (struct frame *f, struct image *img) success_p = 1; else { - image_error ("Unable to create pixmap for XBM image `%s'", + image_error (("Unable to create pixmap for XBM image " + uLSQM"%s"uRSQM), img->spec); x_clear_image (f, img); } @@ -3628,7 +3631,8 @@ xpm_load (struct frame *f, struct image *img) Lisp_Object file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); #ifdef ALLOC_XPM_COLORS xpm_free_color_cache (); #endif @@ -3659,7 +3663,7 @@ xpm_load (struct frame *f, struct image *img) Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (buffer)) { - image_error ("Invalid image data `%s'", buffer); + image_error ("Invalid image data "uLSQM"%s"uRSQM, buffer); #ifdef ALLOC_XPM_COLORS xpm_free_color_cache (); #endif @@ -4103,7 +4107,7 @@ xpm_load_image (struct frame *f, if (!check_image_size (f, width, height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto failure; } @@ -4293,14 +4297,14 @@ xpm_load (struct frame *f, file = x_find_image_file (file_name); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", file_name); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, file_name); return 0; } contents = slurp_file (SSDATA (file), &size); if (contents == NULL) { - image_error ("Error loading XPM image `%s'", img->spec); + image_error ("Error loading XPM image "uLSQM"%s"uRSQM, img->spec); return 0; } @@ -4314,7 +4318,7 @@ xpm_load (struct frame *f, data = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (data)) { - image_error ("Invalid image data `%s'", data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, data); return 0; } success_p = xpm_load_image (f, img, SDATA (data), @@ -5268,14 +5272,15 @@ pbm_load (struct frame *f, struct image *img) file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); return 0; } contents = slurp_file (SSDATA (file), &size); if (contents == NULL) { - image_error ("Error reading `%s'", file); + image_error ("Error reading "uLSQM"%s"uRSQM, file); return 0; } @@ -5288,7 +5293,7 @@ pbm_load (struct frame *f, struct image *img) data = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (data)) { - image_error ("Invalid image data `%s'", data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, data); return 0; } p = SDATA (data); @@ -5298,7 +5303,7 @@ pbm_load (struct frame *f, struct image *img) /* Check magic number. */ if (end - p < 2 || *p++ != 'P') { - image_error ("Not a PBM image: `%s'", img->spec); + image_error ("Not a PBM image: "uLSQM"%s"uRSQM, img->spec); error: xfree (contents); img->pixmap = NO_PIXMAP; @@ -5332,7 +5337,7 @@ pbm_load (struct frame *f, struct image *img) break; default: - image_error ("Not a PBM image: `%s'", img->spec); + image_error ("Not a PBM image: "uLSQM"%s"uRSQM, img->spec); goto error; } @@ -5358,7 +5363,7 @@ pbm_load (struct frame *f, struct image *img) if (!check_image_size (f, width, height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto error; } @@ -5431,7 +5436,8 @@ pbm_load (struct frame *f, struct image *img) x_destroy_x_image (ximg); #endif x_clear_image (f, img); - image_error ("Invalid image size in image `%s'", + image_error (("Invalid image size in image " + uLSQM"%s"uRSQM), img->spec); goto error; } @@ -5466,7 +5472,7 @@ pbm_load (struct frame *f, struct image *img) x_destroy_x_image (ximg); #endif x_clear_image (f, img); - image_error ("Invalid image size in image `%s'", + image_error ("Invalid image size in image "uLSQM"%s"uRSQM, img->spec); goto error; } @@ -5510,7 +5516,7 @@ pbm_load (struct frame *f, struct image *img) #else x_destroy_x_image (ximg); #endif - image_error ("Invalid pixel value in image `%s'", + image_error ("Invalid pixel value in image "uLSQM"%s"uRSQM, img->spec); goto error; } @@ -5906,7 +5912,8 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); return 0; } @@ -5914,7 +5921,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) fp = emacs_fopen (SSDATA (file), "rb"); if (!fp) { - image_error ("Cannot open image file `%s'", file); + image_error ("Cannot open image file "uLSQM"%s"uRSQM, file); return 0; } @@ -5923,7 +5930,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) || png_sig_cmp (sig, 0, sizeof sig)) { fclose (fp); - image_error ("Not a PNG file: `%s'", file); + image_error ("Not a PNG file: "uLSQM"%s"uRSQM, file); return 0; } } @@ -5931,7 +5938,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) { if (!STRINGP (specified_data)) { - image_error ("Invalid image data `%s'", specified_data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, specified_data); return 0; } @@ -5944,7 +5951,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) if (tbr.len < sizeof sig || png_sig_cmp (tbr.bytes, 0, sizeof sig)) { - image_error ("Not a PNG image: `%s'", img->spec); + image_error ("Not a PNG image: "uLSQM"%s"uRSQM, img->spec); return 0; } @@ -6012,7 +6019,7 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c) if (! (width <= INT_MAX && height <= INT_MAX && check_image_size (f, width, height))) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto error; } @@ -6670,20 +6677,21 @@ jpeg_load_body (struct frame *f, struct image *img, file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); return 0; } fp = emacs_fopen (SSDATA (file), "rb"); if (fp == NULL) { - image_error ("Cannot open `%s'", file); + image_error ("Cannot open "uLSQM"%s"uRSQM, file); return 0; } } else if (!STRINGP (specified_data)) { - image_error ("Invalid image data `%s'", specified_data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, specified_data); return 0; } @@ -6699,13 +6707,14 @@ jpeg_load_body (struct frame *f, struct image *img, { char buf[JMSG_LENGTH_MAX]; mgr->cinfo.err->format_message ((j_common_ptr) &mgr->cinfo, buf); - image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buf)); + image_error ("Error reading JPEG image "uLSQM"%s"uRSQM": %s", + img->spec, build_string (buf)); break; } case MY_JPEG_INVALID_IMAGE_SIZE: - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see " + uLSQM"max-image-size"uRSQM")"); break; case MY_JPEG_CANNOT_CREATE_X: @@ -7185,7 +7194,8 @@ tiff_load (struct frame *f, struct image *img) file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); return 0; } # ifdef WINDOWSNT @@ -7196,7 +7206,7 @@ tiff_load (struct frame *f, struct image *img) tiff = TIFFOpen (SSDATA (file), "r"); if (tiff == NULL) { - image_error ("Cannot open `%s'", file); + image_error ("Cannot open "uLSQM"%s"uRSQM, file); return 0; } } @@ -7204,7 +7214,7 @@ tiff_load (struct frame *f, struct image *img) { if (!STRINGP (specified_data)) { - image_error ("Invalid image data `%s'", specified_data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, specified_data); return 0; } @@ -7224,7 +7234,8 @@ tiff_load (struct frame *f, struct image *img) if (!tiff) { - image_error ("Cannot open memory source for `%s'", img->spec); + image_error ("Cannot open memory source for "uLSQM"%s"uRSQM, + img->spec); return 0; } } @@ -7236,8 +7247,9 @@ tiff_load (struct frame *f, struct image *img) if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t) && TIFFSetDirectory (tiff, ino))) { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); + image_error + ("Invalid image number "uLSQM"%s"uRSQM" in image "uLSQM"%s"uRSQM, + image, img->spec); TIFFClose (tiff); return 0; } @@ -7250,7 +7262,7 @@ tiff_load (struct frame *f, struct image *img) if (!check_image_size (f, width, height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); TIFFClose (tiff); return 0; } @@ -7280,7 +7292,7 @@ tiff_load (struct frame *f, struct image *img) TIFFClose (tiff); if (!rc) { - image_error ("Error reading TIFF image `%s'", img->spec); + image_error ("Error reading TIFF image "uLSQM"%s"uRSQM, img->spec); xfree (buf); return 0; } @@ -7617,7 +7629,8 @@ gif_load (struct frame *f, struct image *img) file = x_find_image_file (specified_file); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", specified_file); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, + specified_file); return 0; } #ifdef WINDOWSNT @@ -7629,14 +7642,14 @@ gif_load (struct frame *f, struct image *img) gif = DGifOpenFileName (SSDATA (file)); if (gif == NULL) { - image_error ("Cannot open `%s'", file); + image_error ("Cannot open "uLSQM"%s"uRSQM, file); return 0; } #else gif = DGifOpenFileName (SSDATA (file), &gif_err); if (gif == NULL) { - image_error ("Cannot open `%s': %s", + image_error ("Cannot open "uLSQM"%s"uRSQM": %s", file, build_string (GifErrorString (gif_err))); return 0; } @@ -7646,7 +7659,7 @@ gif_load (struct frame *f, struct image *img) { if (!STRINGP (specified_data)) { - image_error ("Invalid image data `%s'", specified_data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, specified_data); return 0; } @@ -7660,14 +7673,14 @@ gif_load (struct frame *f, struct image *img) gif = DGifOpen (&memsrc, gif_read_from_memory); if (!gif) { - image_error ("Cannot open memory source `%s'", img->spec); + image_error ("Cannot open memory source "uLSQM"%s"uRSQM, img->spec); return 0; } #else gif = DGifOpen (&memsrc, gif_read_from_memory, &gif_err); if (!gif) { - image_error ("Cannot open memory source `%s': %s", + image_error ("Cannot open memory source "uLSQM"%s"uRSQM": %s", img->spec, build_string (GifErrorString (gif_err))); return 0; } @@ -7677,7 +7690,7 @@ gif_load (struct frame *f, struct image *img) /* Before reading entire contents, check the declared image size. */ if (!check_image_size (f, gif->SWidth, gif->SHeight)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); gif_close (gif, NULL); return 0; } @@ -7686,7 +7699,7 @@ gif_load (struct frame *f, struct image *img) rc = DGifSlurp (gif); if (rc == GIF_ERROR || gif->ImageCount <= 0) { - image_error ("Error reading `%s'", img->spec); + image_error ("Error reading "uLSQM"%s"uRSQM, img->spec); gif_close (gif, NULL); return 0; } @@ -7697,8 +7710,9 @@ gif_load (struct frame *f, struct image *img) idx = INTEGERP (image_number) ? XFASTINT (image_number) : 0; if (idx < 0 || idx >= gif->ImageCount) { - image_error ("Invalid image number `%s' in image `%s'", - image_number, img->spec); + image_error + ("Invalid image number "uLSQM"%s"uRSQM" in image "uLSQM"%s"uRSQM, + image_number, img->spec); gif_close (gif, NULL); return 0; } @@ -7716,7 +7730,7 @@ gif_load (struct frame *f, struct image *img) if (!check_image_size (f, width, height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); gif_close (gif, NULL); return 0; } @@ -7970,10 +7984,10 @@ gif_load (struct frame *f, struct image *img) char *error_text = GifErrorString (gif_err); if (error_text) - image_error ("Error closing `%s': %s", + image_error ("Error closing "uLSQM"%s"uRSQM": %s", img->spec, build_string (error_text)); #else - image_error ("Error closing `%s'", img->spec); + image_error ("Error closing "uLSQM"%s"uRSQM, img->spec); #endif } @@ -8514,8 +8528,9 @@ imagemagick_load_image (struct frame *f, struct image *img, if (ino < 0 || ino >= MagickGetNumberImages (image_wand)) { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); + image_error + ("Invalid image number "uLSQM"%s"uRSQM" in image "uLSQM"%s"uRSQM, + image, img->spec); DestroyMagickWand (image_wand); return 0; } @@ -8649,7 +8664,7 @@ imagemagick_load_image (struct frame *f, struct image *img, if (! (image_width <= INT_MAX && image_height <= INT_MAX && check_image_size (f, image_width, image_height))) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto imagemagick_error; } @@ -8784,7 +8799,7 @@ imagemagick_load_image (struct frame *f, struct image *img, MagickWandTerminus (); /* TODO more cleanup. */ - image_error ("Error parsing IMAGEMAGICK image `%s'", img->spec); + image_error ("Error parsing IMAGEMAGICK image "uLSQM"%s"uRSQM, img->spec); return 0; } @@ -8808,7 +8823,7 @@ imagemagick_load (struct frame *f, struct image *img) file = x_find_image_file (file_name); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", file_name); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, file_name); return 0; } #ifdef WINDOWSNT @@ -8825,7 +8840,7 @@ imagemagick_load (struct frame *f, struct image *img) data = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (data)) { - image_error ("Invalid image data `%s'", data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, data); return 0; } success_p = imagemagick_load_image (f, img, SDATA (data), @@ -9089,7 +9104,7 @@ svg_load (struct frame *f, struct image *img) file = x_find_image_file (file_name); if (!STRINGP (file)) { - image_error ("Cannot find image file `%s'", file_name); + image_error ("Cannot find image file "uLSQM"%s"uRSQM, file_name); return 0; } @@ -9097,7 +9112,7 @@ svg_load (struct frame *f, struct image *img) contents = slurp_file (SSDATA (file), &size); if (contents == NULL) { - image_error ("Error loading SVG image `%s'", img->spec); + image_error ("Error loading SVG image "uLSQM"%s"uRSQM, img->spec); return 0; } /* If the file was slurped into memory properly, parse it. */ @@ -9113,7 +9128,7 @@ svg_load (struct frame *f, struct image *img) data = image_spec_value (img->spec, QCdata, NULL); if (!STRINGP (data)) { - image_error ("Invalid image data `%s'", data); + image_error ("Invalid image data "uLSQM"%s"uRSQM, data); return 0; } original_filename = BVAR (current_buffer, filename); @@ -9180,7 +9195,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * rsvg_handle_get_dimensions (rsvg_handle, &dimension_data); if (! check_image_size (f, dimension_data.width, dimension_data.height)) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); goto rsvg_error; } @@ -9312,7 +9327,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * g_object_unref (rsvg_handle); /* 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); + image_error ("Error parsing SVG image "uLSQM"%s"uRSQM, img->spec); g_error_free (err); return 0; } @@ -9465,7 +9480,7 @@ gs_load (struct frame *f, struct image *img) if (! (in_width <= INT_MAX && in_height <= INT_MAX && check_image_size (f, in_width, in_height))) { - image_error ("Invalid image size (see `max-image-size')"); + image_error ("Invalid image size (see "uLSQM"max-image-size"uRSQM")"); return 0; } img->width = in_width; @@ -9486,7 +9501,7 @@ gs_load (struct frame *f, struct image *img) if (!img->pixmap) { - image_error ("Unable to create pixmap for `%s'", img->spec); + image_error ("Unable to create pixmap for "uLSQM"%s"uRSQM, img->spec); return 0; } @@ -9598,7 +9613,8 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f) #endif } else - image_error ("Cannot get X image of `%s'; colors will not be freed", + image_error (("Cannot get X image of "uLSQM"%s"uRSQM";" + " colors will not be freed"), img->spec); unblock_input (); diff --git a/src/lread.c b/src/lread.c index fe4d367..ebd594c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -947,7 +947,8 @@ load_warn_old_style_backquotes (Lisp_Object file) { if (!NILP (Vold_style_backquotes)) { - AUTO_STRING (format, "Loading `%s': old-style backquotes detected!"); + Lisp_Object format = build_string ("Loading "uLSQM"%s"uRSQM + ": old-style backquotes detected!"); CALLN (Fmessage, format, file); } } diff --git a/src/xfaces.c b/src/xfaces.c index ce300e7..d519578 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -797,7 +797,7 @@ load_pixmap (struct frame *f, Lisp_Object name) if (bitmap_id < 0) { - add_to_log ("Invalid or undefined bitmap `%s'", name); + add_to_log ("Invalid or undefined bitmap "uLSQM"%s"uRSQM, name); bitmap_id = 0; } else diff --git a/src/xselect.c b/src/xselect.c index bd2d65e..b54ddd8 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2147,8 +2147,10 @@ x_clipboard_manager_save (Lisp_Object frame) static Lisp_Object x_clipboard_manager_error_1 (Lisp_Object err) { - AUTO_STRING (format, "X clipboard manager error: %s\n\ -If the problem persists, set `x-select-enable-clipboard-manager' to nil."); + Lisp_Object format + = build_string ("X clipboard manager error: %s\n" + "If the problem persists, set " + uLSQM"x-select-enable-clipboard-manager"uRSQM" to nil."); CALLN (Fmessage, format, CAR (CDR (err))); return Qnil; } commit 208cfda3aa174d81952ff35272a467f8cb7e539e Author: Glenn Morris Date: Sat Aug 15 10:40:06 2015 -0700 * admin/admin.el (set-version, set-copyright): Remove deleted files. ; * src/emacs,c, lib-src/ntlib.c: Comment updates. diff --git a/admin/admin.el b/admin/admin.el index 267f2c4..914f187 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -88,21 +88,12 @@ Root must be the root of an Emacs source tree." (rx (and "AC_INIT" (1+ (not (in ?,))) ?, (0+ space) (submatch (1+ (in "0-9.")))))) - ;; No longer used, broken in multiple ways, updating version seems pointless. - (set-version-in-file root "nt/config.nt" version - (rx (and bol "#" (0+ blank) "define" (1+ blank) - "VERSION" (1+ blank) "\"" - (submatch (1+ (in "0-9.")))))) ;; TODO: msdos could easily extract the version number from ;; configure.ac with sed, rather than duplicating the information. (set-version-in-file root "msdos/sed2v2.inp" version (rx (and bol "/^#undef " (1+ not-newline) "define VERSION" (1+ space) "\"" (submatch (1+ (in "0-9.")))))) - ;; No longer used, broken in multiple ways, updating version seems pointless. - (set-version-in-file root "nt/makefile.w32-in" version - (rx (and "VERSION" (0+ space) "=" (0+ space) - (submatch (1+ (in "0-9.")))))) ;; Major version only. (when (string-match "\\([0-9]\\{2,\\}\\)" version) (setq version (match-string 1 version)) @@ -134,10 +125,6 @@ Root must be the root of an Emacs source tree." (rx (and bol "/^#undef " (1+ not-newline) "define COPYRIGHT" (1+ space) ?\" (submatch (1+ (not (in ?\")))) ?\"))) - (set-version-in-file root "nt/config.nt" copyright - (rx (and bol "#" (0+ blank) "define" (1+ blank) - "COPYRIGHT" (1+ blank) - ?\" (submatch (1+ (not (in ?\")))) ?\"))) (set-version-in-file root "lib-src/rcs2log" copyright (rx (and "Copyright" (0+ space) ?= (0+ space) ?\' (submatch (1+ nonl))))) diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index 7d9dff9..37b847b 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -302,7 +302,7 @@ is_exec (const char * name) stricmp (p, ".cmd") == 0)); } -/* FIXME? This is in config.nt now - is this still needed? */ +/* FIXME? This is in configure.ac now - is this still needed? */ #define IS_DIRECTORY_SEP(x) ((x) == '/' || (x) == '\\') /* We need this because nt/inc/sys/stat.h defines struct stat that is diff --git a/src/emacs.c b/src/emacs.c index aace618..80bb70c 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2429,7 +2429,7 @@ Special values: Anything else (in Emacs 24.1, the possibilities are: aix, berkeley-unix, hpux, irix, usg-unix-v) indicates some sort of Unix system. */); Vsystem_type = intern_c_string (SYSTEM_TYPE); - /* See configure.ac (and config.nt) for the possible SYSTEM_TYPEs. */ + /* See configure.ac for the possible SYSTEM_TYPEs. */ DEFVAR_LISP ("system-configuration", Vsystem_configuration, doc: /* Value is string indicating configuration Emacs was built for. */); commit 2ff8791d61b81a72b8c7d288ebcd352b696584a7 Author: Stephen Leake Date: Sat Aug 15 12:17:47 2015 -0500 Allow describe-function helpers to access buffer-local values. This will be used by cedet/mode-local.el `describe-mode-local-override' on `help-fns-describe-function-functions' in upstream CEDET. * lisp/help-fns.el (describe-function-orig-buffer): New, let-bound in `describe-function'. (describe-function): Bind it, save it on the help xref stack. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c97647c..a5d3834 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -43,6 +43,11 @@ The functions will receive the function name as argument.") ;; Functions +(defvar describe-function-orig-buffer nil + "Buffer that was current when 'describe-function' was invoked. +Functions on 'help-fns-describe-function-functions' can use this +to get buffer-local values.") + ;;;###autoload (defun describe-function (function) "Display the full documentation of FUNCTION (a symbol)." @@ -61,18 +66,35 @@ The functions will receive the function name as argument.") (user-error "You didn't specify a function symbol")) (or (fboundp function) (user-error "Symbol's function definition is void: %s" function)) - (help-setup-xref (list #'describe-function function) - (called-interactively-p 'interactive)) - (save-excursion - (with-help-window (help-buffer) - (prin1 function) - ;; Use " is " instead of a colon so that - ;; it is easier to get out the function name using forward-sexp. - (princ " is ") - (describe-function-1 function) - (with-current-buffer standard-output - ;; Return the text we displayed. - (buffer-string))))) + + ;; We save describe-function-orig-buffer on the help xref stack, so + ;; it is restored by the back/forward buttons. 'help-buffer' + ;; expects (current-buffer) to be a help buffer when processing + ;; those buttons, so we can't change the current buffer before + ;; calling that. + (let ((describe-function-orig-buffer + (or describe-function-orig-buffer + (current-buffer)))) + + (help-setup-xref + (list (lambda (function buffer) + (let ((describe-function-orig-buffer + (if (buffer-live-p buffer) buffer))) + (describe-function function))) + function describe-function-orig-buffer) + (called-interactively-p 'interactive)) + + (save-excursion + (with-help-window (help-buffer) + (prin1 function) + ;; Use " is " instead of a colon so that + ;; it is easier to get out the function name using forward-sexp. + (princ " is ") + (describe-function-1 function) + (with-current-buffer standard-output + ;; Return the text we displayed. + (buffer-string)))) + )) ;; Could be this, if we make symbol-file do the work below. commit b6d4bafa1de2aa3ae2bb8cba5825d4a6f248ed0a Author: Stephen Leake Date: Sat Aug 15 12:14:27 2015 -0500 Handle pulse-background being nil * lisp/cedet/pulse.el (pulse-lighten-highlight): Inherit pulse-background, handle it being nil. diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 39ba13c..dea73a0 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -131,25 +131,28 @@ Return t if there is more drift to do, nil if completed." (if (>= (get 'pulse-highlight-face :iteration) pulse-iterations) nil (let* ((frame (color-values (face-background 'default))) - (start (color-values (face-background - (get 'pulse-highlight-face - :startface) - nil t))) - (frac (list (/ (- (nth 0 frame) (nth 0 start)) pulse-iterations) - (/ (- (nth 1 frame) (nth 1 start)) pulse-iterations) - (/ (- (nth 2 frame) (nth 2 start)) pulse-iterations))) - (it (get 'pulse-highlight-face :iteration)) - ) - (set-face-background 'pulse-highlight-face - (pulse-color-values-to-hex - (list - (+ (nth 0 start) (* (nth 0 frac) it)) - (+ (nth 1 start) (* (nth 1 frac) it)) - (+ (nth 2 start) (* (nth 2 frac) it))))) - (put 'pulse-highlight-face :iteration (1+ it)) - (if (>= (1+ it) pulse-iterations) - nil - t)))) + (pulse-background (face-background + (get 'pulse-highlight-face + :startface) + nil t)));; can be nil + (when pulse-background + (let* ((start (color-values pulse-background)) + (frac (list (/ (- (nth 0 frame) (nth 0 start)) pulse-iterations) + (/ (- (nth 1 frame) (nth 1 start)) pulse-iterations) + (/ (- (nth 2 frame) (nth 2 start)) pulse-iterations))) + (it (get 'pulse-highlight-face :iteration)) + ) + (set-face-background 'pulse-highlight-face + (pulse-color-values-to-hex + (list + (+ (nth 0 start) (* (nth 0 frac) it)) + (+ (nth 1 start) (* (nth 1 frac) it)) + (+ (nth 2 start) (* (nth 2 frac) it))))) + (put 'pulse-highlight-face :iteration (1+ it)) + (if (>= (1+ it) pulse-iterations) + nil + t))) + ))) (defun pulse-reset-face (&optional face) "Reset the pulse highlighting FACE." commit 692cf1013b8354f9f7a17ebb5e6e39b76ddce414 Author: Paul Eggert Date: Sat Aug 15 08:35:02 2015 -0700 Fix "\`" confusion in Lisp strings * admin/authors.el (authors-canonical-author-name): Fix typo by using "\\`" not "\`" in string RE. * lisp/obsolete/complete.el (PC-complete-as-file-name): * lisp/obsolete/vi.el (vi-backward-blank-delimited-word): * lisp/progmodes/verilog-mode.el (verilog-mode-map): Use plain "`", not the equivalent-but-confusing "\`", in strings. * lisp/textmodes/texinfmt.el: Fix comment likewise. diff --git a/admin/authors.el b/admin/authors.el index c7ec3bc..547e046 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -1154,7 +1154,7 @@ it is found in `authors-fixed-case'." (setq regexps (cdr regexps)))))) (when author (setq author (replace-regexp-in-string "[ \t]*[(<].*$" "" author)) - (setq author (replace-regexp-in-string "\`[ \t]+" "" author)) + (setq author (replace-regexp-in-string "\\`[ \t]+" "" author)) (setq author (replace-regexp-in-string "[ \t]+$" "" author)) (setq author (replace-regexp-in-string "[ \t]+" " " author)) (unless (string-match "[-, \t]" author) diff --git a/lisp/obsolete/complete.el b/lisp/obsolete/complete.el index 7c7582f..87dedac 100644 --- a/lisp/obsolete/complete.el +++ b/lisp/obsolete/complete.el @@ -963,7 +963,7 @@ or properties are considered." Environment vars are converted to their values." (interactive) (let* ((end (point)) - (beg (if (re-search-backward "[^\\][ \t\n\"\`\'][^ \t\n\"\`\']" + (beg (if (re-search-backward "[^\\][ \t\n\"`'][^ \t\n\"`']" (point-min) t) (+ (point) 2) (point-min))) diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el index fbdf7a1..c5dc0ef 100644 --- a/lisp/obsolete/vi.el +++ b/lisp/obsolete/vi.el @@ -1213,7 +1213,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)." (defun vi-backward-blank-delimited-word (count) "Backward COUNT blank-delimited words." (interactive "p") - (if (re-search-backward "[ \t\n\`][^ \t\n\`]+" nil t count) + (if (re-search-backward "[ \t\n`][^ \t\n`]+" nil t count) (if (not (bobp)) (forward-char 1)))) (defun vi-forward-blank-delimited-word (count) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 4fc4b03..93572d9 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -1336,7 +1336,7 @@ If set will become buffer local.") (define-key map [(control 59)] 'electric-verilog-semi-with-comment) (define-key map ":" 'electric-verilog-colon) ;;(define-key map "=" 'electric-verilog-equal) - (define-key map "\`" 'electric-verilog-tick) + (define-key map "`" 'electric-verilog-tick) (define-key map "\t" 'electric-verilog-tab) (define-key map "\r" 'electric-verilog-terminate-line) ;; backspace/delete key bindings @@ -1350,9 +1350,9 @@ If set will become buffer local.") (define-key map "\M-\t" 'verilog-complete-word) (define-key map "\M-?" 'verilog-show-completions) ;; Note \C-c and letter are reserved for users - (define-key map "\C-c\`" 'verilog-lint-off) - (define-key map "\C-c\*" 'verilog-delete-auto-star-implicit) - (define-key map "\C-c\?" 'verilog-diff-auto) + (define-key map "\C-c`" 'verilog-lint-off) + (define-key map "\C-c*" 'verilog-delete-auto-star-implicit) + (define-key map "\C-c?" 'verilog-diff-auto) (define-key map "\C-c\C-r" 'verilog-label-be) (define-key map "\C-c\C-i" 'verilog-pretty-declarations) (define-key map "\C-c=" 'verilog-pretty-expr) diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index e1259ff..8e4a7e9 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -3127,7 +3127,7 @@ Default is to leave paragraph indentation as is." ;; (put '\` 'texinfo-format 'texinfo-format-grave-accent) ;; (defun texinfo-format-grave-accent () ;; (texinfo-discard-command) -;; (insert "\`")) +;; (insert "`")) ;; ;; @' ==> ' acute accent ;; (put '\' 'texinfo-format 'texinfo-format-acute-accent) commit 2f30f8efb8e311c5fcd6c9d896bad5b6f703c3f1 Author: Dani Moncayo Date: Sat Aug 15 15:36:08 2015 +0200 Remove 'nt/zipdist.bat' (no longer used) * nt/zipdist.bat: Remove - no longer used. diff --git a/nt/zipdist.bat b/nt/zipdist.bat deleted file mode 100644 index 55ba9ae..0000000 --- a/nt/zipdist.bat +++ /dev/null @@ -1,43 +0,0 @@ -@echo off -rem Copyright (C) 2001-2015 Free Software Foundation, Inc. - -rem Author: Christoph Scholtes cschol2112 at gmail.com - -rem This file is part of GNU Emacs. - -rem GNU Emacs is free software: you can redistribute it and/or modify -rem it under the terms of the GNU General Public License as published by -rem the Free Software Foundation, either version 3 of the License, or -rem (at your option) any later version. - -rem GNU Emacs is distributed in the hope that it will be useful, -rem but WITHOUT ANY WARRANTY; without even the implied warranty of -rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -rem GNU General Public License for more details. - -rem You should have received a copy of the GNU General Public License -rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/. - -SETLOCAL -rem arg 1: Emacs version number -set EMACS_VER=%1 - -set TMP_DIST_DIR=emacs-%EMACS_VER% - -rem Check, if 7zip is installed and available on path -7z 1>NUL 2>NUL -if %ERRORLEVEL% NEQ 0 goto ZIP_ERROR -goto ZIP_DIST - -:ZIP_ERROR -echo. -echo ERROR: Make sure 7zip is installed and available on the Windows Path! -goto EXIT - -rem Build and verify the binary distribution -:ZIP_DIST -7z a -bd -tZIP -mx=9 -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-bin-i386.zip %TMP_DIST_DIR% -7z t emacs-%EMACS_VER%-bin-i386.zip -goto EXIT - -:EXIT commit 76fff113e4fe92fd2dfe16dd46d2d59f6187f2b7 Author: Michael Albinus Date: Sat Aug 15 13:09:41 2015 +0200 ; Fix ChangeLog entries diff --git a/ChangeLog.2 b/ChangeLog.2 index 3f31807..b4de90e 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -5,8 +5,8 @@ 2015-08-14 Michael Albinus - * tramp-sh.el (tramp-sh-handle-file-acl): Do not redirect stderr - to /dev/null, this is done in `tramp-send-command-and-check'. + * lisp/net/tramp-sh.el (tramp-sh-handle-file-acl): Do not redirect + stderr to /dev/null, this is done in `tramp-send-command-and-check'. 2015-08-14 Jürgen Hötzel @@ -45,6 +45,13 @@ (uniquify-ask-about-buffer-names-p): Remove, unused (bug#21037) * lisp/uniquify.el: Remove redundant `:group's. +2015-08-13 Jürgen Hötzel + + * lisp/net/tramp-adb.el + (tramp-adb-handle-directory-files-and-attributes): Make a copy of + result to prevent modification of the tramp-cache by side effects. + Use the correct cache key. + 2015-08-13 Paul Eggert Make add_to_log varargs @@ -234,6 +241,12 @@ (perform-replace): Move the description of the format of `replacements' from the body's comment to the docstring. +2015-08-11 Jürgen Hötzel + + * lisp/net/tramp-adb.el (tramp-adb-prompt): Match leading escape + sequence. Recent adb version send initial escape sequences, even + when terminal type is set to TERM=dumb. + 2015-08-10 Stephen Leake Rewrite elisp--xref-find-definitions to handle many more cases; add tests. @@ -455,7 +468,6 @@ added for these exceptional cases, as well as one non exceptional base case. - 2015-08-07 Jürgen Hötzel Improve error checking in tramp-adb.el commit 8b73aab8e14ae05ff9f4f94dfd2ba94f6b3f3696 Author: Michael Albinus Date: Sat Aug 15 13:00:01 2015 +0200 * lisp/net/tramp-sh.el (tramp-remote-selinux-p): Use "selinuxenabled" rather than "getenforce". (tramp-sh-handle-set-file-selinux-context): Do not cache SELinux context if not all context components are given. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 7f7558e..49d4c4a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1492,15 +1492,8 @@ be non-negative integers." (defun tramp-remote-selinux-p (vec) "Check, whether SELINUX is enabled on the remote host." - (with-tramp-connection-property - (tramp-get-connection-process vec) "selinux-p" - (let ((result (tramp-find-executable - vec "getenforce" (tramp-get-remote-path vec) t t))) - (and result - (string-equal - (tramp-send-command-and-read - vec (format "echo \\\"`%S`\\\"" result)) - "Enforcing"))))) + (with-tramp-connection-property (tramp-get-connection-process vec) "selinux-p" + (tramp-send-command-and-check vec "selinuxenabled"))) (defun tramp-sh-handle-file-selinux-context (filename) "Like `file-selinux-context' for Tramp files." @@ -1526,24 +1519,25 @@ be non-negative integers." (defun tramp-sh-handle-set-file-selinux-context (filename context) "Like `set-file-selinux-context' for Tramp files." (with-parsed-tramp-file-name filename nil - (if (and (consp context) - (tramp-remote-selinux-p v) - (tramp-send-command-and-check - v (format "chcon %s %s %s %s %s" - (if (stringp (nth 0 context)) - (format "--user=%s" (nth 0 context)) "") - (if (stringp (nth 1 context)) - (format "--role=%s" (nth 1 context)) "") - (if (stringp (nth 2 context)) - (format "--type=%s" (nth 2 context)) "") - (if (stringp (nth 3 context)) - (format "--range=%s" (nth 3 context)) "") - (tramp-shell-quote-argument localname)))) - (progn - (tramp-set-file-property v localname "file-selinux-context" context) - t) - (tramp-set-file-property v localname "file-selinux-context" 'undef) - nil))) + (when (and (consp context) + (tramp-remote-selinux-p v)) + (let ((user (and (stringp (nth 0 context)) (nth 0 context))) + (role (and (stringp (nth 1 context)) (nth 1 context))) + (type (and (stringp (nth 2 context)) (nth 2 context))) + (range (and (stringp (nth 3 context)) (nth 3 context)))) + (when (tramp-send-command-and-check + v (format "chcon %s %s %s %s %s" + (if user (format "--user=%s" user) "") + (if role (format "--role=%s" role) "") + (if type (format "--type=%s" type) "") + (if range (format "--range=%s" range) "") + (tramp-shell-quote-argument localname))) + (if (and user role type range) + (tramp-set-file-property + v localname "file-selinux-context" context) + (tramp-set-file-property + v localname "file-selinux-context" 'undef)) + t))))) (defun tramp-remote-acl-p (vec) "Check, whether ACL is enabled on the remote host." commit fd96e2d9c97fdde96bdab3ef24aa20aa3d8ed3d0 Author: Glenn Morris Date: Sat Aug 15 06:22:39 2015 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index db96e6e..70a7c5c 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -983,7 +983,7 @@ Optional argument GROUP is the sub-group of slots to display. ;;;*** -;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "694d44fcd869546592d35f3321f62667") +;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "56c2ecebf2f035fc4440dca87cfc14c8") ;;; Generated autoloads from eieio-opt.el (autoload 'eieio-browse "eieio-opt" "\