1. 11 Jun, 2015 1 commit
  2. 09 Jun, 2015 1 commit
    • Eli Zaretskii's avatar
      Improve font selection for punctuation and other symbols · e0707282
      Eli Zaretskii authored
      * src/fontset.c (face_for_char): If the character's script is
      'symbol', and the font used for ASCII face has a glyph for it, use
      the font for the ASCII face instead of searching the fontsets.
      This comes instead of NS-specific code that used the current
      face's font instead, which is now disabled due to undesirable
      consequences.  (Bug#20727)
      e0707282
  3. 08 Jun, 2015 2 commits
  4. 07 Jun, 2015 3 commits
  5. 06 Jun, 2015 2 commits
  6. 05 Jun, 2015 2 commits
  7. 04 Jun, 2015 2 commits
    • NicolasPetton's avatar
      Add new function string-greaterp · 41a929c5
      NicolasPetton authored
      * lisp/subr.el (string-greaterp): New function.  Also aliased to
      `string>'.
      * test/automated/subr-tests.el (string-comparison-test): Add unit
      tests for `string>'and `string<'.
      * src/fns.c (string-lessp): Better docstring.
      41a929c5
    • Eli Zaretskii's avatar
      Fix timezone-related functions on MS-Windows · 285260fc
      Eli Zaretskii authored
      * src/editfns.c (set_time_zone_rule) [WINDOWSNT]: Always call
      'xputenv', even if no reallocation of tzvalbuf was necessary.
      This fixes a bug in timezone-related functions on MS-Windows.
      Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
      285260fc
  8. 03 Jun, 2015 2 commits
  9. 01 Jun, 2015 3 commits
    • Eli Zaretskii's avatar
      NS equivalents of xterm.c and w32term.c changes · 957cbfd7
      Eli Zaretskii authored
      * src/nsterm.m (ns_maybe_dumpglyphs_background): Force redraw of
      glyph string background also when the font in use claims
      preposterously large global height value.  Helps to remove
      artifacts left from previous displays when glyphless characters
      are displayed as hex code in a box.
      (x_new_font): Call get_font_ascent_descent to obtain a reasonable
      value for FRAME_LINE_HEIGHT, even when a font claims very large
      value for its height.
      957cbfd7
    • Paul Eggert's avatar
      Avoid grave accent quoting in stderr diagnostics · 2c656f7d
      Paul Eggert authored
      A few Emacs diagnostics go directly to stderr, and so can't easily
      contain curved quotes (as non-UTF-8 locales might mishandle them).
      Instead of bothering to add support for this rarity, reword the
      diagnostics so that they don't use grave accent to quote.
      * src/alloc.c (mark_memory): Fix comment.
      * src/buffer.c (init_buffer):
      * src/dispnew.c (init_display):
      * src/emacs.c (main, sort_args):
      * src/lread.c (dir_warning):
      * src/term.c (init_tty):
      * src/unexmacosx.c (unexec):
      * src/xfns.c (select_visual):
      * src/xterm.c (cvt_string_to_pixel, x_io_error_quitter):
      Reword stderr diagnostics to avoid quoting `like this'.
      * src/unexmacosx.c: Include errno.h.
      * src/xfns.c (select_visual): Encode value for locale.
      2c656f7d
    • Paul Eggert's avatar
      Treat batch stdout/stderr like standard display · 467af178
      Paul Eggert authored
      Calls like (print FOO) could generate improperly encoded or
      hard-to-read output if FOO contains characters outside the system
      locale.  Fix this by treating batch stdout and stderr like
      interactive standard display, when it comes to transliterating and
      encoding characters (Bug#20545).
      * doc/emacs/mule.texi (Communication Coding):
      * doc/lispref/display.texi (Active Display Table):
      * doc/lispref/nonascii.texi (Locales):
      * etc/NEWS:
      * src/coding.c (syms_of_coding):
      * src/dispnew.c (syms_of_display):
      Document this.
      * src/print.c: Include disptab.h.
      (printchar_to_stream): New function, with much of the guts of the
      old Fexternal_debugging_output, except this one also uses the
      standard display table.
      (printchar, strout, Fexternal_debugging_output): Use it.
      467af178
  10. 31 May, 2015 3 commits
    • Glenn Morris's avatar
    • Paul Eggert's avatar
      Remove unused DEFSYMs · 0c2a3cf6
      Paul Eggert authored
      Remove DEFSYMs that aren't used at the C level.  Also:
      * src/decompress.c (Qzlib_dll):
      * src/font.c (Qunicode_sip):
      * src/frame.c (Qtip_frame):
      * src/ftfont.c (Qserif):
      * src/gnutls.c (Qgnutls_dll):
      * src/xml.c (Qlibxml2_dll):
      Move from here ...
      * src/w32fns.c (syms_of_w32fns): ... to here,
      as these are used only on MS-Windows.
      0c2a3cf6
    • Eli Zaretskii's avatar
      Attempt to fix crashes due to accesses beyond glyph matrix end · cab645a6
      Eli Zaretskii authored
      * src/xdisp.c (x_produce_glyphs): When it->ascent and it->descent
      are determined from per-character metrics, don't let the
      max_ascent and max_descent become smaller than values returned by
      normal_char_ascent_descent, to avoid unpleasant dynamic resizing
      of screen line heights when text changes.
      
      * src/xterm.c (x_new_font)
      * src/w32term.c (x_new_font): Call get_font_ascent_descent to
      obtain a reasonable value for FRAME_LINE_HEIGHT, even when a font
      claims very large value for its height.
      
      * src/font.c (font_open_entity): Call get_font_ascent_descent to
      obtain a reasonable value for FRAME_SMALLEST_FONT_HEIGHT, even
      when a font claims very large value for its height.
      cab645a6
  11. 30 May, 2015 5 commits
    • Paul Eggert's avatar
      Remove format2 · d90a3b18
      Paul Eggert authored
      * src/editfns.c, src/lisp.h (format2): Remove.
      It is more trouble than it's worth, now that we have CALLN.
      This is just a minor refactoring.
      * src/buffer.c (Fkill_buffer):
      * src/dbusbind.c (XD_OBJECT_TO_STRING):
      * src/fileio.c (barf_or_query_if_file_exists):
      Adjust to format2 going away.
      d90a3b18
    • Paul Eggert's avatar
      Don't misencode C-generated messages · 75f8653b
      Paul Eggert authored
      Also, be more consistent about calls to 'Fmessage' vs 'message'.
      * src/alloc.c (Fgc_status):
      Prefer AUTO_STRING to build_string for Fmessage call.
      * src/data.c (Fmake_variable_buffer_local)
      (Fmake_local_variable, Fmake_variable_frame_local):
      * src/doc.c (store_function_docstring):
      Use Fmessage, not message, since the argument can contain
      non-ASCII characters, and this can cause the resulting message
      to be incorrectly encoded for the current environment.
      * src/fns.c (maybe_resize_hash_table):
      * src/xselect.c (x_clipboard_manager_save_all):
      Use message, not Fmessage, since Fmessage's power isn't needed here.
      * src/process.c (Fmake_network_process): Reword message to avoid %s.
      * src/xdisp.c (vmessage): Document restrictions on message contents.
      (message_nolog) [false]: Remove unused code.
      75f8653b
    • Eli Zaretskii's avatar
      Fix display of composite characters with large fonts · 643470ff
      Eli Zaretskii authored
      * src/xdisp.c (x_produce_glyphs): Call normal_char_ascent_descent
      for reasonable values of font ascent and descent.
      (get_font_ascent_descent): New function.
      
      * src/composite.c (composition_gstring_width): Call
      get_font_ascent_descent for reasonable values of font ascent and
      descent.
      
      * dispextern.h: Add prototype for get_font_ascent_descent.
      643470ff
    • Eli Zaretskii's avatar
      Fix display of cursor at end of empty lines · ba5f83df
      Eli Zaretskii authored
      * src/xdisp.c (normal_char_ascent_descent): Accept additional
      argument: the character to use for metrics in case the font
      declares too large ascent and descent values.  Add 1 pixel to
      ascent and descent values.
      (normal_char_height): Accept additional argument: the character to
      use for metrics in case the font declares too large height value.
      Call normal_char_ascent_descent instead of doing calculations for
      a different default character.
      (estimate_mode_line_height, handle_single_display_spec)
      (calc_pixel_width_or_height, produce_stretch_glyph)
      (calc_line_height_property, produce_glyphless_glyph): All callers
      changed.
      (append_space_for_newline): Make sure the space glyph produced at
      end of line has correct ascent and descent values, and the glyph
      row has correct height, even when it's empty.
      ba5f83df
    • Paul Eggert's avatar
      copy-file now truncates output after writing · 2c3dde9f
      Paul Eggert authored
      * src/fileio.c (Fcopy_file): Truncate output after writing rather
      than before.  This is more likely to work than truncation before
      writing, if the file system is out of space or the user is over
      disk quota (Bug#20595).  Also, check for read errors.
      2c3dde9f
  12. 29 May, 2015 4 commits
  13. 28 May, 2015 3 commits
    • Eli Zaretskii's avatar
      Fix display of glyphless characters with problematic fonts · c76605fa
      Eli Zaretskii authored
      * src/w32term.c (x_draw_glyph_string_background): Force redraw of
      glyph string background also when the font in use claims
      preposterously large global height value.  Helps to remove
      artifacts left from previous displays when glyphless characters
      are displayed as hex code in a box.
      * src/xterm.c (x_draw_glyph_string_background): Force redraw of
      glyph string background also when the font in use claims
      preposterously large global height value.  Helps to remove
      artifacts left from previous displays when glyphless characters
      are displayed as hex code in a box.
      * src/w32font.c (w32font_draw): Fix background drawing for
      glyphless characters that display as acronyms or hex codes in a
      box.
      * src/xftfont.c (xftfont_draw): Fix background drawing for
      glyphless characters that display as acronyms or hex codes in a
      box.
      * src/xdisp.c (produce_glyphless_glyph): Compute reasonable values
      for it->ascent and it->descent when the font claims preposterously
      large global values.
      (FONT_TOO_HIGH): Move from here...
      * src/dispextern.h (FONT_TOO_HIGH): ...to here.
      c76605fa
    • Paul Eggert's avatar
      substitute-command-keys now curves quotes · 11b2744f
      Paul Eggert authored
      So, for example, it turns "`abc'" into "‘abc’" (Bug#20385).
      * doc/lispref/help.texi (Keys in Documentation):
      * etc/NEWS: Document this.
      * src/doc.c (Fsubstitute_command_keys): Implement it.
      11b2744f
    • Stefan Monnier's avatar
      f655987d
  14. 27 May, 2015 2 commits
    • Stefan Monnier's avatar
      Change inhibit-point-motion-hooks to t · d090be14
      Stefan Monnier authored
      * src/textprop.c (syms_of_textprop): Default Vinhibit_point_motion_hooks
      to t and document it as obsolete.
      d090be14
    • Eli Zaretskii's avatar
      Avoid very high screen lines with some fonts · 1d87cb3c
      Eli Zaretskii authored
      * src/xdisp.c (get_phys_cursor_geometry): Adjust the height of the
      cursor to avoid weird-looking hollow cursor with fonts that have
      large ascent values for some glyphs.  This avoids having the
      hollow cursor start too low.
      (append_space_for_newline): Adjust the ascent value of the newline
      glyph, so that the hollow cursor at end of line displays
      correctly.
      (FONT_TOO_HIGH): New macro.
      (x_produce_glyphs): Use it to detect fonts that claim a
      preposterously large height, in which case we use per-glyph ascent
      and descent values.  (Bug#20628)
      1d87cb3c
  15. 26 May, 2015 1 commit
    • Eli Zaretskii's avatar
      Teach MS-Windows font back-end return per-glyph ascent/descent · 53bedd3a
      Eli Zaretskii authored
      * src/w32font.h (struct w32_metric_cache): Add ascent and descent
      values.
      
      * src/w32font.c (w32font_text_extents): Compute, cache, and
      accumulate per-glyph ascent and descent values, instead of copying
      global values from the font.  If the values are not available from
      the font data, i.e., non-TTF fonts, fall back on font-global values.
      (compute_metrics): Compute and return per-glyph ascent and descent
      values, if returned by GetGlyphOutlineW, falling back on
      font-global values.  (Bug#20628)
      
      * src/w32term.c (w32_draw_rectangle): Add 1 pixel to width and
      height of rectangle to be drawn, to be compatible with
      XDrawRectangle.  Fixes glyphless-char display as hex codes in a
      box, when per-glyph ascent/descent values are used.
      53bedd3a
  16. 23 May, 2015 4 commits
    • Glenn Morris's avatar
      Remove charset map files from repository, generate in first bootstrap · 9f89ea1f
      Glenn Morris authored
      * admin/charsets/Makefile.in (${srcdir}/charsets.stamp): New.
      (all): Create the stamp file.
      (extraclean): Delete the stamp file.
      * src/Makefile.in (lispintdir, charsets): New variables.
      (${lispintdir}/cp51932.el, ${lispintdir}/eucjp-ms.el, ${charsets}):
      New rules.
      (emacs$(EXEEXT), temacs$(EXEEXT)): Depend on $charsets.
      * lisp/international/cp51932.el, lisp/international/eucjp-ms.el:
      * etc/charsets/*.map: Remove from repository.
      ; * admin/charsets/mapconv: Fix typo in output comment.
      ; * etc/charsets/README: Small update.
      ; * .gitignore: Update for charset changes.
      9f89ea1f
    • Paul Eggert's avatar
      Put default action first in src/Makefile · fa658b2e
      Paul Eggert authored
      * src/Makefile.in (all): Put this rule before lisp.mk.
      That way, plain 'make' works in the src directory again.
      fa658b2e
    • Eli Zaretskii's avatar
      Avoid compiler warning in image.c on MS-Windows · 85d94d65
      Eli Zaretskii authored
      * src/w32term.h (x_query_color): Add prototype, to avoid compiler
      warning in image.c.
      85d94d65
    • Glenn Morris's avatar
      Fix --without-toolkit-scroll-bars builds. · 238e8b66
      Glenn Morris authored
      * src/xterm.c (x_scroll_bar_set_handle) [!USE_TOOLKIT_SCROLL_BARS]:
      Add new argument to x_clear_area1.
      (XTset_horizontal_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
      Update x_clear_area arguments.
      238e8b66