1. 08 Jan, 2015 9 commits
    • Eli Zaretskii's avatar
      Fix line-move-visual's following of column in R2L lines. · 5fbd17e3
      Eli Zaretskii authored
       src/simple.el (line-move-visual): When converting X pixel coordinate
       to temporary-goal-column, adjust the value for right-to-left
       screen lines.  This fixes vertical-motion, next/prev-line, etc.
      
       src/dispnew.c (buffer_posn_from_coords): Fix the value of the column
       returned for right-to-left screen lines.  (Before the change on
       2014-12-30, the incorrectly-computed X pixel coordinate concealed
       this bug.)
      5fbd17e3
    • Eli Zaretskii's avatar
      Fix GDB accesses to the 'nil's name. · ad83cdac
      Eli Zaretskii authored
       src/.gdbinit (xsymname): New subroutine.
       (xprintsym, initial-tbreak): Use it to access the name of a symbol
       in a way that doesn't cause GDB to barf when it tries to
       dereference a NULL pointer.
      ad83cdac
    • Eli Zaretskii's avatar
      Fix fallout from "Qnil is zero" change in the display engine. (Bug#19535) · daa18b5e
      Eli Zaretskii authored
       src/xdisp.c (next_element_from_c_string): Use Lisp integer zero as
       the object.
       (set_cursor_from_row, try_cursor_movement, dump_glyph)
       (insert_left_trunc_glyphs, append_space_for_newline)
       (extend_face_to_end_of_line, highlight_trailing_whitespace)
       (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
       (Fbidi_resolved_levels, produce_special_glyphs)
       (rows_from_pos_range, mouse_face_from_buffer_pos)
       (note_mouse_highlight): Use nil as the object for glyphs inserted
       by the display engine, and test with NILP instead of INTEGERP.
       src/w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
       the display engine.
       src/xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
       the display engine.
       src/dispextern.h (struct glyph, struct it): Update comments for the
       OBJECT members.
      daa18b5e
    • Paul Eggert's avatar
      Port new Lisp symbol init to x86 --with-wide-int · 0002f31a
      Paul Eggert authored
      * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
      Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
      GCC (at least) does not allow a constant initializer to widen an
      address constant.
      0002f31a
    • Paul Eggert's avatar
      * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL. · 206333ee
      Paul Eggert authored
      This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
      Although clang doesn't need it, some other compiler might, and
      it's easy enough to be safe.
      206333ee
    • Paul Eggert's avatar
      * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0. · ce5c361c
      Paul Eggert authored
      Apparently clang removed support for the alloc_size attribute.
      ce5c361c
    • Paul Eggert's avatar
      Port Qnil==0 XUNTAG to clang · f6a27d26
      Paul Eggert authored
      clang has undefined behavior if the program subtracts an integer
      from (char *) 0.  Problem reported by YAMAMOTO Mitsuharu in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
      * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
      (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.
      f6a27d26
    • Glenn Morris's avatar
      # ChangeLog fixes · 9f654763
      Glenn Morris authored
      9f654763
    • Paul Eggert's avatar
      Port GFileMonitor * hack to Qnil==0 platforms · d71659fe
      Paul Eggert authored
      Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
      * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
      (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
      d71659fe
  2. 07 Jan, 2015 1 commit
  3. 06 Jan, 2015 1 commit
  4. 05 Jan, 2015 4 commits
    • Paul Eggert's avatar
      * lisp.h (XSYMBOL): Parenthesize id in forward decl. · 6e8fe3f8
      Paul Eggert authored
      Needed when neither optimizing nor inlining.
      Also, sort decls alphabetically.
      6e8fe3f8
    • Eli Zaretskii's avatar
      MS-Windows followup to previous commit · 5b5dab12
      Eli Zaretskii authored
       src/w32proc.c, src/w32.h, src/w32fns.c, src/w32font.c, src/w32menu.c:
       src/w32notify.c, src/w32proc.c, src/w32select.c, src/w32term.c:
       src/w32uniscribe.c: Remove declarations of Q* variables that
       represent symbols.
      5b5dab12
    • Paul Eggert's avatar
      Use 0 for Qnil · bc78ff26
      Paul Eggert authored
      Fixes Bug#15880.
      If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
      that NILP (x) is equivalent to testing whether x is 0 at the
      machine level.  The overall effects of this and the previous patch
      shrink the size of the text segment by 2.3% and speeds up
      compilation of all the .elc files by about 0.5% on my platform,
      which is Fedora 20 x86-64.
      * lib-src/make-docfile.c (compare_globals):
      * src/lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
      (make_lisp_symbol) [USE_LSB_TAG]:
      Symbols now tag the difference from lispsym, not the pointer.
      (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
      (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
      Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
      (XSYMBOL): New forward decl.
      (XUNTAGBASE): New function.
      (XUNTAG): Use it.
      bc78ff26
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef
  5. 04 Jan, 2015 4 commits
    • Paul Eggert's avatar
      'temacs -nw' should not call missing functions · bf90e9ac
      Paul Eggert authored
      Without this patch, "temacs -nw" fails with the diagnostic
      "emacs: Symbol's function definition is void: frame-windows-min-size"
      and messes up the tty's state.
      * lib-src/make-docfile.c (write_globals):
      Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too.  Sort.
      * src/frame.c (Fframe_windows_min_size): New placeholder function.
      (syms_of_frame): Define it.
      * src/window.c (Fwindow__sanitize_window_sizes): New placeholder.
      (syms_of_window): Define it.
      bf90e9ac
    • Glenn Morris's avatar
      # ChangeLog fixes · e82fc62b
      Glenn Morris authored
      e82fc62b
    • Paul Eggert's avatar
      Less 'make' chatter for lisp dir · ccb2d938
      Paul Eggert authored
      * lisp/Makefile.in (THEFILE): Define to be 'no-such-file' by default,
      to make it clearer that the caller must specify it.
      (compile-onefile): Remove, replacing by ...
      ($(THEFILE)c): ... new rule.  This lets us use AM_V_GEN here.
      ($(THEFILE)c, .el.elc, $(MH_E_DIR)/mh-loaddefs.el)
      ($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
      ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el):
      Use AM_V_GEN to lessen 'make' chatter.
      (.el.elc): Omit duplicate comment.
      * src/Makefile.in (%.elc): Adjust to compile-onefile change in
      ../lisp/Makefile.in.
      ccb2d938
    • Paul Eggert's avatar
      batch write-region no longer says "Wrote FOO" · d20f82e6
      Paul Eggert authored
      This cuts down on 'make' chatter a bit.
      * doc/lispref/files.texi (Writing to Files):
      * etc/NEWS: Document this.
      * src/fileio.c (Fwrite_region):
      Don't output "Wrote /whatever/foo.elc" if noninteractive.
      d20f82e6
  6. 03 Jan, 2015 3 commits
  7. 02 Jan, 2015 1 commit
  8. 01 Jan, 2015 1 commit
  9. 31 Dec, 2014 1 commit
    • Paul Eggert's avatar
      Simplify setfattr use by assuming GNU make · 25346768
      Paul Eggert authored
      * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
      (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
      Simplify by using GNU make rather than shell conditionals,
      by using ln -f rather than rm -f followed by ln,
      and by preferring $@ to spelling out the destination.
      25346768
  10. 30 Dec, 2014 1 commit
  11. 29 Dec, 2014 1 commit
  12. 28 Dec, 2014 4 commits
    • Eli Zaretskii's avatar
    • Paul Eggert's avatar
      Fix produce_composite_width typo · 20791069
      Paul Eggert authored
      * term.c (produce_composite_glyph):
      Fix typo that confused number of columns for pixel width.
      20791069
    • Paul Eggert's avatar
      Wrap dll functions more simply · e092accb
      Paul Eggert authored
      * decompress.c, gnutls.c, image.c, xml.c:
      If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
      rather than the inverse when not WINDOWSNT.  This isolates the
      fn_* business into the WINDOWSNT-specific section of the code,
      which makes it easier to maintain the generic code.
      * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
      * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
      * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
      * xml.c (DEF_XML2_FN, LOAD_XML2_FN):
      Remove.  All uses replaced by DEF_DLL_FN.
      * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
      e092accb
    • Paul Eggert's avatar
      Port memory-full checking to GnuTLS 3.3 · b54f5721
      Paul Eggert authored
      Instead of using gnutls_global_set_mem_functions, check every call
      to a GnuTLS function that might return an indication of memory
      exhaustion.  Suggested by Dmitry Antipov in:
      http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
      * src/gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
      (init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
      (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
      All uses removed.
      (check_memory_full): New function.
      (emacs_gnutls_handshake, emacs_gnutls_handle_error)
      (gnutls_make_error, Fgnutls_boot): Use it.
      (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
      b54f5721
  13. 27 Dec, 2014 2 commits
  14. 26 Dec, 2014 3 commits
    • Paul Eggert's avatar
      Use bool for boolean in xselect.c, xsettings.c · 7a305f8b
      Paul Eggert authored
      * xselect.c (x_get_local_selection, struct selection_data)
      (x_selection_request_lisp_error, struct prop_location)
      (x_handle_selection_request, x_convert_selection)
      (waiting_for_other_props_on_window, expect_property_change)
      (wait_for_property_change, x_handle_property_notify)
      (x_get_foreign_selection, x_get_window_property)
      (receive_incremental_selection)
      (x_get_window_property_as_lisp_data)
      (lisp_data_to_selection_data, Fx_get_selection_internal)
      (x_send_client_event):
      * xselect.c, xterm.h (x_handle_dnd_message):
      * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
      (apply_xft_settings, read_and_apply_settings)
      (xft_settings_event, init_gsettings, init_xsettings)
      (syms_of_xsettings):
      Use bool for boolean.
      * xselect.c (x_get_window_property): Omit last arg, which was an
      unused boolean.
      * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
      always true.  All callers changed.
      7a305f8b
    • Eli Zaretskii's avatar
      MS-Windows followup to stpcpy changes. · d6552628
      Eli Zaretskii authored
       src/w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
       of strcat.
       src/w32menu.c (add_menu_item): Use stpcpy instead of strcat.
       src/w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
       strcat.
      
       nt/gnulib.mk (stpcpy, string): Sync with the latest change in
       lib/gnulib.mk.
      d6552628
    • Paul Eggert's avatar
      Use bool for boolean in xsmfns.c · f7695664
      Paul Eggert authored
      * xsmfns.c, xterm.h (x_session_have_connection):
      * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
      Use bool for boolean.
      (x_session_initialize, Fhandle_save_session):
      Prefer NILP (x) to EQ (x, Qnil).
      f7695664
  15. 25 Dec, 2014 1 commit
    • Eli Zaretskii's avatar
      Fix rendering of composed caharacters on the mode line. (Bug#19435) · a41d07b3
      Eli Zaretskii authored
       src/xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
       composition_compute_stop_pos to the number of characters in the
       string.
       <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
       src/composite.c (composition_compute_stop_pos): If no composition
       was found in a string before ENDPOS, and ENDPOS is the string end,
       no need to back up to a safe point.
       src/dispextern.h (struct it) <end_charpos>: Improve commentary.
      a41d07b3
  16. 24 Dec, 2014 3 commits