1. 20 May, 2019 6 commits
    • Alexander Gramiak's avatar
      Replace XChar2b with unsigned in all font backends · a4fe9c70
      Alexander Gramiak authored
      The xfont backend using XChar2b in its API doesn't mean that we should
      use it everywhere else.
      
      * src/dispextern.h (glyph_string):
      * src/ftcrfont.c (ftcrfont_draw):
      * src/ftxfont.c (ftxfont_draw):
      * src/w32term.c (w32_draw_glyphless_glyph_string_foreground):
      * src/xdisp.c (init_glyph_string, get_char_face_and_encoding)
      (get_glyph_face_and_encoding, get_char_glyph_code)
      (fill_gstring_glyph_string, fill_stretch_glyph_string)
      (normal_char_ascent_descent, gui_get_glyph_overhangs)
      (compute_overhangs_and_x, gui_produce_glyphs):
      * src/xfont.c (xfont_get_pcm, xfont_chars_supported, xfont_open)
      (xfont_encode_char, xfont_text_extents, xfont_draw)
      * src/xftfont.c (xftfont_draw):
      * src/xterm.c (x_compute_glyph_string_overhangs)
      (x_draw_glyphless_glyph_string_foreground): Use unsigned over XChar2b.
      
      * src/nsgui.h:
      * src/w32gui.h:
      * src/xterm.h: Remove XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, and
      XCHAR2B_BYTE2 typedefs and macros.
      
      * src/font.h (font_driver):
      (ftfont_text_extents)
      * src/ftcrfont.c (ftcrfont_text_extents):
      * src/ftfont.c (ftfont_text_extents):
      * src/macfont.m (macfont_text_extents):
      * src/nsfont.m (nsfont_text_extents):
      * src/w32font.h (w32_font_text_extents):
      * src/font.c (xfont_text_extents):
      * src/xftfont.c (xftfont_text_extents): Make code parameter const.
      a4fe9c70
    • Alexander Gramiak's avatar
      Introduce Emacs_GC struct and typedef · b3d3c0da
      Alexander Gramiak authored
      * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_GC to XGCValues.
      [!HAVE_X_WINDOWS]: Define Emacs_GC, GCForeground, and GCBackground.
      
      * src/nsgui.h:
      * src/w32gui.h:Remove obsolete XGCValues, GC, GCForeground,
      GCBackground, and GCFont definitions.
      
      * src/w32fns.c (w32_make_gc): Do not set unused font field.
      
      * src/w32term.c: Use Emacs_GC over XGCValues. Do not set unused font
      field.
      
      * src/xfaces.c: Use Emacs_GC over XGCValues and GC.
      b3d3c0da
    • Alexander Gramiak's avatar
      Introduce Emacs_Rectangle struct and typedef · 462b1fd7
      Alexander Gramiak authored
      * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Rectangle to
      XRectangle.
      [!HAVE_X_WINDOWS]: Define Emacs_Rectangle struct.
      Use Emacs_Rectangle over XRectangle.
      
      * src/frame.h (MonitorInfo):
      * src/msdos.h:
      * src/w32term.c:
      * src/xdisp.c: Use Emacs_Rectangle over XRectangle.
      
      * src/nsgui.h:
      * src/w32gui.h: Remove old XRectangle structs.
      
      * src/xdisp.c:
      * src/nsgui.h:
      * src/w32gui.h: Rename CONVERT_FROM_XRECT and CONVERT_TO_XRECT to
      CONVERT_FROM_EMACS_RECT and CONVERT_TO_EMACS_RECT respectively.
      462b1fd7
    • Alexander Gramiak's avatar
      Introduce Emacs_Pixmap typedef · 44d57792
      Alexander Gramiak authored
      * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Pixmap to Pixmap.
      (image, x_kill_gs_process): Use Emacs_Pixmap over Pixmap.
      
      * src/image.c:
      
      * src/nsgui.h:
      * src/nsterm.m:
      * src/termhooks.h:
      * src/w32gui.h:
      * src/w32term.c:
      * src/w32term.h:
      * src/xterm.c (x_free_pixmap): Use Emacs_Pixmap over Pixmap.
      
      * src/w32gui.h: Remove unused typedef Bitmap.
      44d57792
    • Alexander Gramiak's avatar
      Introduce Emacs_Cursor typedef · 06db2a05
      Alexander Gramiak authored
      * src/dispextern.h [HAVE_X_WINDOWS]: Define Emacs_Cursor alias. Move
      the No_Cursor definition from xterm.h.
      (redisplay_interface): Use Emacs_Cursor over Cursor.
      
      * src/nsgui.h:
      * src/nsterm.h:
      * src/nsterm.m:
      * src/w32gui.h:
      * src/w32term.c:
      * src/xdisp.c:
      * src/xterm.c (x_define_frame_cursor): Use Emacs_Cursor over Cursor.
      06db2a05
    • Alexander Gramiak's avatar
      Introduce Emacs_Color struct and typedef · c0e146e4
      Alexander Gramiak authored
      This avoids clashing with the XColor struct from X.
      
      * src/dispextern [HAVE_X_WINDOWS]: Define Emacs_Color alias.
      [!HAVE_X_WINDOWS]: Rename XColor compatibility struct to
      Emacs_Color. Remove unused fields.
      
      * src/gtkutil.c:
      * src/gtkutil.h:
      * src/image.c:
      * src/nsterm.h:
      * src/nsterm.m:
      * src/termhooks.h:
      * src/w32fns.c:
      * src/w32term.c:
      * src/w32term.h:
      * src/xfaces.c:
      * src/xfns.c:
      * src/xterm.h: Use Emacs_Color over XColor outside of X-specific
      sections.
      c0e146e4
  2. 19 May, 2019 18 commits
  3. 18 May, 2019 16 commits
    • YAMAMOTO Mitsuharu's avatar
      Avoid triple buffering with Xdbe in cairo · b87e5eea
      YAMAMOTO Mitsuharu authored
      * src/xterm.h (struct x_output): Remove member cr_surface.
      Add members cr_surface_desired_width and cr_surface_desired_height.
      (x_cr_destroy_frame_context) [USE_CAIRO]: Add extern.
      
      * src/xterm.c (x_free_cr_resources): Remove function.
      (FRAME_CR_SURFACE) [USE_CAIRO]: Remove macro.
      (FRAME_CR_SURFACE_DESIRED_WIDTH, FRAME_CR_SURFACE_DESIRED_HEIGHT) [USE_CAIRO]:
      New macros.
      (x_cr_destroy_frame_context) [USE_CAIRO]: Rename from x_cr_destroy_surface.
      All Uses changed.  Don't use FRAME_CR_SURFACE.  Make non-static.
      (x_cr_update_surface_desired_size) [USE_CAIRO]: New function.
      (x_begin_cr_clip) [USE_CAIRO]: Create Xlib surface if Xdbe is in use.
      Use FRAME_CR_SURFACE_DESIRED_WIDTH and FRAME_CR_SURFACE_DESIRED_HEIGHT.
      (x_end_cr_clip) [USE_CAIRO]: Call x_mark_frame_dirty if Xdbe is in use.
      (x_cr_draw_frame, x_cr_export_frames) [USE_CAIRO]: Save and restore cairo
      context instead of freeing and clearing it.
      (x_update_begin) [USE_CAIRO]: Don't create cairo surface here.
      (show_back_buffer) [USE_CAIRO]: Call cairo_surface_flush before swapping.
      (x_update_end) [USE_CAIRO]: Don't copy image surface if Xdbe is in use.
      Get image surface by cairo_get_target instead of FRAME_CR_SURFACE.
      (x_scroll_run) [USE_CAIRO]: Use XCopyArea if Xdbe is in use.
      (handle_one_xevent) [USE_CAIRO] <ConfigureNotify>: Call
      x_cr_update_surface_desired_size instead of x_cr_destroy_surface.
      (x_free_frame_resources) [USE_CAIRO]: Call x_cr_destroy_frame_context instead
      of x_free_cr_resources.
      
      * src/xfns.c (set_up_x_back_buffer, tear_down_x_back_buffer) [USE_CAIRO]:
      Call x_cr_destroy_frame_context.
      b87e5eea
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/package.el: Fix decoding of downloaded files · 5f9671e5
      Stefan Monnier authored
      This is a different fix for bug#34909, which should also fix bug#35739.
      
      Our downloading code used to automatically decode the result according
      to the usual heuristics for files.  This caused problems when we later
      needed to save the data in a file that needed to be byte-for-byte
      equal to the original in order to pass the signature verification,
      especially because we didn't keep track of which coding-system was
      used to decode the data.
      
      (package--unless-error): New macro extracted from
      package--with-response-buffer-1, so that we can specify edebug and
      indent specs.
      (package--with-response-buffer-1): Use it.  More importantly, change
      code so it runs `body` in a unibyte buffer with undecoded data.
      (package--download-one-archive): Don't encode with utf-8 since the data
      is not decoded yet.
      (describe-package-1): Explicitly decode the readem.txt files here.
      
      * lisp/url/url-handlers.el (url-insert-file-contents): Use it.
      (url-insert): Don't decode if buffer is unibyte.
      
      * lisp/url/url-http.el (url-http--insert-file-helper): New function,
      extracted from url-insert-file-contents.
      5f9671e5
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/package.el: Reduce macrology in ...with-response-buffer · 2a570576
      Stefan Monnier authored
      (package--with-response-buffer-1): New function, extracted from
      package--with-response-buffer.
      (package--with-response-buffer): Use it.
      2a570576
    • Mattias Engdegård's avatar
      Fix broken logic in file-notify · 3dcacb09
      Mattias Engdegård authored
      * lisp/filenotify.el (file-notify-callback):
      Repair warped condition that didn't match rename-to/from events correctly.
      3dcacb09
    • Paul Eggert's avatar
    • Jean-Christophe Helary's avatar
      Bob Chassell passed away · d6e7b18d
      Jean-Christophe Helary authored
      * doc/lispintro/emacs-lisp-intro.texi (About the Author): Update.
      d6e7b18d
    • Paul Eggert's avatar
      Fix recent Tramp typo that broke the build · ae705679
      Paul Eggert authored
      ‘make bootstrap’ without this patch should reproduce the problem.
      * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
      Autoload zeroconf-init.
      ae705679
    • Basil L. Contovounesios's avatar
      Remove XEmacs audio checks from mm-decode.el · 63ffb613
      Basil L. Contovounesios authored
      For discussion, see the following threads:
      https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01087.html
      https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00584.html
      * lisp/gnus/mm-decode.el (mm-inline-media-tests): Remove no-op media
      tests for XEmacs features.
      63ffb613
    • Paul Eggert's avatar
      For SVG, 8192 is the new 256 · db9af103
      Paul Eggert authored
      Prefer librsvg for display of splash.svg
      When both librsvg and Imagemagick are available, Emacs should
      prefer librsvg to render SVG images.  However, Emacs was using
      Imagemagick to render its own splash.svg file because
      image-type-from-file-header returned nil for that file.
      * lisp/image.el (image-type-from-buffer)
      (image-type-from-file-header): Look at the first 8192 bytes of
      the image, not just the first 256.  For Emacs’s own splash.svg
      file, image-type-header-regexps needs to look at 939 bytes.
      8192 bytes is a reasonable number nowadays given typical file
      system design.
      * test/lisp/image-tests.el (image-tests--emacs-images-directory):
      New contant.
      (image-type-from-file-header-test): New test.
      db9af103
    • Michael Albinus's avatar
      5b8be580
    • Michael Albinus's avatar
      Bug#35769 · 16f14a4d
      Michael Albinus authored
      * lisp/net/tramp-sh.el: (tramp-maybe-open-connection):
      Arrange `process-environment' that it doesn't work for local
      processes.  (Bug#35769)
      16f14a4d
    • Alan Mackenzie's avatar
      CC Mode: Handle several consecutive noise macros in declaration contexts. · 95fb826d
      Alan Mackenzie authored
      In the bug scenario, the second and subsequent noise macros with parentheses
      were getting font-lock-type-face.
      
      * lisp/progmodes/cc-engine.el (c-end-of-token)
      (c-forward-noise-clause-not-macro-decl): New functions.
      (c-find-decl-prefix-search): Handle noise macros by skipping over them.
      (c-forward-decl-or-cast-1): In the loop checking for types, skip over all
      consecutive noise macros with parens, not just one.
      95fb826d
    • Eli Zaretskii's avatar
    • Bastien's avatar
      Fix missing declaration in gnus-sum.el · 9fcc9912
      Bastien authored
      * lisp/gnus/gnus-sum.el (gnus-tmp-name): Declare var.
      9fcc9912
    • Eli Zaretskii's avatar
      Fix display of images on MS-Windows broken by a recent commit · 721c520f
      Eli Zaretskii authored
      * src/image.c (initialize_image_type): Test if the type is in
      Vlibrary_cache up front, and return true without calling the
      'init' method if the type was already initialized.
      721c520f
    • Michael Albinus's avatar
      Suppress compiler warnings for older Emacsen in tramp-tests.el · b0a0705a
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
      Add error name to test.
      (tramp-test30-make-process, tramp-test45-unload):
      Suppress compiler warnings from older Emacsen.
      b0a0705a