1. 05 Nov, 2013 2 commits
    • Paul Eggert's avatar
      Fix recent gnutls changes. · 69369809
      Paul Eggert authored
      * gnutls.c (Fgnutls_boot): Don't assume C99.
      * process.c (wait_reading_process_output): Fix typo in recent change.
      69369809
    • Ted Zlatanov's avatar
      Several GnuTLS fixes for log level and initialization. · 194b4d9f
      Ted Zlatanov authored
      * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
      (Fgnutls_boot): Set process gnutls_p later, after initialization.
      
      * process.c (wait_reading_process_output, read_process_output)
      (send_process): Check gnutls_state is not NULL.
      194b4d9f
  2. 04 Nov, 2013 5 commits
    • Jan Djärv's avatar
      Fix memory leaks in NS version. · c8b09927
      Jan Djärv authored
      * src/macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
      (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
      (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
      
      * src/nsfns.m (Fx_create_frame): Fix memory leak.
      
      * src/nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
      OSX >= 10.9.
      
      * src/nsterm.m (init, run, stop:): New methods in EmacsApp for
      OSX >= 10.9 to prevent memory leak of GCD dispatch source.
      c8b09927
    • Eli Zaretskii's avatar
      be80645a
    • Eli Zaretskii's avatar
      Fix bug #15260 with building and installing Emacs in non-ASCII directories. · d0065ff1
      Eli Zaretskii authored
       src/xdisp.c (message3_nolog, message_with_string): Encode the string
       before writing it to the terminal in a non-interactive session.
       src/lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
       sure we concatenate them into a unibyte string.
       src/fileio.c (make_temp_name): Encode PREFIX, and decode the
       resulting temporary name before returning it to the caller.
       (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
       is a unibyte string, convert NAME to a unibyte string to ensure
       that the result is also a unibyte string.
       src/emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
       create unibyte strings from default paths and directory/file
       names.
       src/coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
       string.
       src/callproc.c (init_callproc): Use build_unibyte_string to make
       sure we create unibyte strings from default paths and
       directory/file names.
       src/buffer.c (init_buffer): Don't store default-directory of
       *scratch* in multibyte form.  The original problem which led to
       that is described in
       http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
       but it was solved long ago.
      
       lisp/startup.el (normal-top-level): Move setting eol-mnemonic-unix,
       eol-mnemonic-mac, eol-mnemonic-dos, and also setup of the locale
       environment and decoding all of the default-directory's to here
       from command-line.
       (command-line): Decode also argv[0].
       lisp/loadup.el: Error out if default-directory is a multibyte string
       when we are dumping.
       lisp/Makefile.in (emacs): Don't set LC_ALL=C.
      
       leim/Makefile.in (RUN_EMACS): Don't set LC_ALL=C.
      
       configure.ac: Don't disallow builds in non-ASCII directories.
      d0065ff1
    • Paul Eggert's avatar
      Port to stricter C99 platforms. · 91f2d272
      Paul Eggert authored
      Especially, C99 prohibits nesting a struct X inside struct Y if
      struct X has a flexible array member.
      Also, merge from gnulib, incorporating:
      2013-11-03 intprops: port to Oracle Studio c99
      * lib/intprops.h: Update from gnulib.
      * src/alloc.c (struct sdata): New type.
      (sdata): Implement in terms of struct sdata.
      Remove u member; all uses replaced by next_vector, set_next_vector.
      (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
      (SDATA_DATA_OFFSET): Now a constant, not a macro.
      (struct sblock): Rename first_data member to data, which is now
      a flexible array member.  All uses changed.
      (next_vector, set_next_vector, large_vector_vec): New functions.
      (vector_alignment): New constant.
      (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
      (struct large-vector): Now merely a NEXT member, since the old approach
      ran afoul of stricter C99.  All uses changed to use
      large_vector_vec or large_vector_offset.
      (large_vector_offset): New constant.
      * src/dispnew.c: Include tparam.h, for tgetent.
      Do not include term.h; no longer needed.
      * src/gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
      * src/lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
      (struct Lisp_Vector): Use a flexible array member for contents,
      instead of a union with a member that is an array of size 1.
      All uses changed.
      (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
      fact that the struct no longer contains a union.
      (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
      (struct Lisp_Save_Value, struct Lisp_Free):
      Use unsigned, not int, for spacers, to avoid c99 warning.
      (union specbinding): Use unsigned, not bool, for bitfield, as
      bool is not portable to pre-C99 hosts.
      91f2d272
    • Glenn Morris's avatar
  3. 02 Nov, 2013 7 commits
    • Glenn Morris's avatar
      * src/Makefile.in (bootstrap_exe): Use relative filename. · fca2fccb
      Glenn Morris authored
      (abs_builddir): Remove.
      fca2fccb
    • Glenn Morris's avatar
      Use relative filenames in TAGS files. · c617f3d0
      Glenn Morris authored
      * src/Makefile.in (abs_srcdir): Remove it again.
      (.PHONY): Remove frc.
      (maintainer-clean): No more TAGS-LISP file.
      (TAGS): Pass relative file names to etags.
      (../lisp/TAGS): Rename from TAGS-LISP.  Work in ../lisp.
      
      * lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
      (lisptagsfiles4, TAGS): Use relative file names.
      (TAGS-LISP): Remove.
      (maintainer-clean): No more TAGS-LISP file.
      
      * lwlib/Makefile.in (abs_srcdir): Remove it again.
      (ctagsfiles, TAGS): Use relative filenames.
      
      * .bzrignore: Remove TAGS-LISP.
      c617f3d0
    • Glenn Morris's avatar
      * src/Makefile.in (lispdir): Remove. · 739f57cd
      Glenn Morris authored
      (TAGS-LISP): Replace lispdir with its expansion.
      739f57cd
    • Glenn Morris's avatar
      Small Makefile cleanup mainly related to tags file generation · b0b9e592
      Glenn Morris authored
      * src/Makefile.in (abs_srcdir): New, set by configure.
      (maintainer-clean): Remove pointless echo.  That should be in the
      top-level Makefile, if anywhere.  Delete TAGS-LISP.
      (extraclean): No s/ and m/ directories for some time.
      (TAGS): Remove no-longer-defined S_FILE.
      Pass absolute filenames to etags once more.
      (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
      ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
      
      * lisp/Makefile.in (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3)
      (lisptagsfiles4): Use absolute filenames again.
      (TAGS, TAGS-LISP): Not everything needs to run in one line.
      Remove all *loaddefs files, not just the first.  Remove esh-groups.
      (maintainer-clean): Delete TAGS, TAGS-LISP.
      
      * lwlib/Makefile.in (abs_srcdir): New, set by configure.
      (ETAGS, ctagsfiles): New variables.
      (TAGS): Use ETAGS, ctagsfiles.  Use absolute filenames again.
      b0b9e592
    • Jan Djärv's avatar
    • Jan Djärv's avatar
      * xfaces.c (check_lface_attrs, realize_default_face): Add · 0c21fa44
      Jan Djärv authored
      LFACE_DISTANT_FOREGROUND_INDEX.
      
      Fixes: debbugs:15788
      0c21fa44
    • Paul Eggert's avatar
      * emacs.c (original_pwd): Remove global var by making it local. · a90e5a33
      Paul Eggert authored
      (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
      a90e5a33
  4. 01 Nov, 2013 4 commits
    • Jan Djärv's avatar
      Add :distant-foreground to faces. · 3c334c14
      Jan Djärv authored
      * doc/lispref/display.texi (Face Attributes): Document :distant-foreground.
      
      * etc/NEWS: Mention :distant-foreground.
      
      * lisp/faces.el (face-x-resources): Add :distant-foreground.
      (region): Use :distant-foreground for gtk and ns.
      
      * src/dispextern.h (lface_attribute_index): Add
      LFACE_DISTANT_FOREGROUND_INDEX.
      
      * src/xfaces.c: Declare color_distance.
      (QCdistant_foreground): New variable.
      (NEAR_SAME_COLOR_THRESHOLD): New define.
      (load_color2): New function.
      (load_color): Call load_color2.
      (load_face_colors): Call load_color2 and if distant-color is specified
      calculate distant and use distant-color if colors are near.
      (LFACE_DISTANT_FOREGROUND): New define.
      (merge_face_ref, Finternal_set_lisp_face_attribute)
      (Finternal_get_lisp_face_attribute)
      (x_supports_face_attributes_p): Handle distant-foreground similar to
      foreground.
      (syms_of_xfaces): DEFSYM QCdistant_foreground.
      3c334c14
    • Claudio Bley's avatar
      Fix ChangeLog entry of last commit. · a814bc10
      Claudio Bley authored
      a814bc10
    • Claudio Bley's avatar
      Fix handling of comments in NetPBM image files. · 0e7690de
      Claudio Bley authored
       src/image.c (pbm_next_char): New function.
       (pbm_scan_number): Use it.
      
       lisp/image.el (image-type-header-regexps): Fix the 'pbm' part to
       allow comments in pbm files.
      0e7690de
    • Claudio Bley's avatar
      Support newer versions of libjpeg on MS-Windows. · d14c81ee
      Claudio Bley authored
       src/image.c (Qlibjpeg_version): New variable.
       (syms_of_image): DEFSYM and initialize it.
      
       lisp/term/w32-win.el (dynamic-library-alist): Support newer versions
       of libjpeg starting with v7: look only for the DLL from the
       version against which Emacs was built.
      d14c81ee
  5. 31 Oct, 2013 2 commits
  6. 29 Oct, 2013 6 commits
    • Stefan Monnier's avatar
      * src/keyboard.c (command_loop_1): If command is nil, call `undefined'. · 4c9797cb
      Stefan Monnier authored
      * lisp/subr.el (undefined): Add missing behavior from the C code for
      unbound keys.
      4c9797cb
    • Paul Eggert's avatar
      * insdel.c: Fix minor problems found by static checking. · dcd163ac
      Paul Eggert authored
      (Qregion_extract_function): Now static.
      (prepare_to_modify_buffer_1): Remove unused locals.
      dcd163ac
    • Stefan Monnier's avatar
      Add pre-redisplay-function and rectangular region · 3472b6c6
      Stefan Monnier authored
      * lisp/rect.el: Use lexical-binding.  Add new rectangular region support.
      (rectangle-mark): New command.
      (rectangle--region): New var.
      (deactivate-mark-hook): Reset rectangle--region.
      (rectangle--extract-region, rectangle--insert-for-yank)
      (rectangle--highlight-for-redisplay)
      (rectangle--unhighlight-for-redisplay): New functions.
      (region-extract-function, redisplay-unhighlight-region-function)
      (redisplay-highlight-region-function): Use them to handle
      rectangular region.
      * lisp/simple.el (region-extract-function): New var.
      (delete-backward-char, delete-forward-char, deactivate-mark): Use it.
      (kill-new, kill-append): Remove obsolete `yank-handler' argument.
      (kill-region): Replace obsolete `yank-handler' arg with `region'.
      (copy-region-as-kill, kill-ring-save): Add `region' argument.
      (redisplay-unhighlight-region-function)
      (redisplay-highlight-region-function): New vars.
      (redisplay--update-region-highlight): New function.
      (pre-redisplay-function): Use it.
      (exchange-point-and-mark): Don't deactivate the mark before
      reactivate-it anyway.
      * lisp/comint.el (comint-kill-region): Remove yank-handler argument.
      * lisp/delsel.el (delete-backward-char, backward-delete-char-untabify)
      (delete-char): Remove property, since it's now part of their
      default behavior.
      (self-insert-iso): Remove property since this command doesn't exist.
      
      * src/xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
      (syms_of_xdisp): Declare pre-redisplay-function.
      (markpos_of_region): Remove function.
      (init_iterator, compute_stop_pos, handle_face_prop)
      (face_before_or_after_it_pos, reseat_to_string)
      (get_next_display_element, window_buffer_changed)
      (redisplay_internal, try_cursor_movement, redisplay_window)
      (try_window_reusing_current_matrix, try_window_id, display_line)
      (note_mode_line_or_margin_highlight, note_mouse_highlight)
      (display_string, mouse_face_from_buffer_pos): Remove region handling.
      * src/window.h (struct window): Remove field `region_showing'.
      * src/dispextern.h (struct it): Remove region_beg/end_charpos.
      (face_at_buffer_position, face_for_overlay_string)
      (face_at_string_position): Update prototypes.
      * src/xfaces.c (face_at_buffer_position, face_for_overlay_string)
      (face_at_string_position): Remove `region_beg' and `region_end' args.
      * src/fontset.c (Finternal_char_font):
      * src/font.c (font_at, font_range): Adjust calls accordingly.
      * src/insdel.c (Qregion_extract_function): New var.
      (syms_of_insdel): Initialize it.
      (prepare_to_modify_buffer_1): Use it.
      3472b6c6
    • Dmitry Antipov's avatar
      Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. · 2d9783e0
      Dmitry Antipov authored
      * ftxfont.c (ftxfont_get_gcs):
      * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
      * xfaces.c (x_free_colors, x_free_dpy_colors)
      (x_create_gc, unload_color):
      * xselect.c (x_property_data_to_lisp):
      * xsettings.c (parse_settings):
      * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
      (get_bits_and_offset): Adjust definition.
      * frame.c (XParseGeometry): Adjust locals.
      * lisp.h (toplevel): Adjust EMACS_UINT type definition.
      * regex.h (toplevel): Likewise for reg_syntax_t.
      2d9783e0
    • Stefan Monnier's avatar
      * src/eval.c (run_hook_with_args): Use FUNCTIONP. · dee4ba59
      Stefan Monnier authored
      * test/indent/css-mode.css (.x2): Test alignement inside braces.
      * test/indent/prolog.prolog: Test alignment of ->; with operator at bol.
      dee4ba59
    • Dmitry Antipov's avatar
      * xterm.h (struct x_output): For 'black_relief' and 'white_relief' · 0085b9be
      Dmitry Antipov authored
      fields, drop 'allocated_p' member and use -1 for uninitialized value.
      * w32term.h (struct w32_output): Similarly but do not use -1 because...
      * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
      on MS-Windows anyway.
      (free_face_colors): Define only if HAVE_X_WINDOWS and...
      (free_realized_face): ...adjust user.
      * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
      white relief pixels to -1.
      * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
      * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
      * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
      0085b9be
  7. 28 Oct, 2013 2 commits
  8. 27 Oct, 2013 1 commit
  9. 26 Oct, 2013 2 commits
  10. 25 Oct, 2013 4 commits
  11. 24 Oct, 2013 2 commits
    • Glenn Morris's avatar
      ChangeLog fixes · 9698f11c
      Glenn Morris authored
      9698f11c
    • Glenn Morris's avatar
      Attempt at a fix for mingw CPPFLAGS · eb9a3661
      Glenn Morris authored
      * configure.ac (CPPFLAGS) [mingw32]: Use abs_top_srcdir.
      
      * Makefile.in (abs_top_srcdir):
      * lib-src/Makefile.in (abs_top_srcdir):
      * lwlib/Makefile.in (abs_top_srcdir):
      * nt/Makefile.in (abs_top_srcdir):
      * oldXMenu/Makefile.in (abs_top_srcdir):
      * src/Makefile.in (abs_top_srcdir):
      New, set by configure.
      eb9a3661
  12. 23 Oct, 2013 3 commits
    • Dmitry Antipov's avatar
      Fix ChangeLog entry. · 66b238df
      Dmitry Antipov authored
      66b238df
    • Dmitry Antipov's avatar
      Tweak last font-related changes to fix bug#15686. · df24a230
      Dmitry Antipov authored
      * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
      is a live window system frame, mark it's default font too.
      df24a230
    • Glenn Morris's avatar
      Make building in directories with whitespace possible · b8e3b0a9
      Glenn Morris authored
      Make has trouble with targets containing whitespace, 
      http://savannah.gnu.org/bugs/?712, so the general approach is
      to use relative paths where possible.  It's generally only Emacs
      itself that needs absolute paths, eg in src/epaths.h.
      
      * configure.ac (srcdir): Don't make it absolute - abs_srcdir exists.
      
      * Makefile.in (abs_srcdir): New, set by configure.
      (buildlisppath): Use abs_srcdir.
      (install-arch-indep, install-etcdoc, install-info, install-man)
      (install-etc): Quote entities that might contain whitespace.
      
      * admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
      Quote entities that might contain whitespace.
      
      * leim/Makefile.in (abs_srcdir): New, set by configure.
      (buildlisppath): Use abs_srcdir.
      (RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
      ($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
      Quote entities that might contain whitespace.
      
      * lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
      Quote entities that might contain whitespace.
      
      * lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
      (emacs, compile, compile-always):
      Quote entities that might contain whitespace.
      (custom-deps, finder-data, autoloads): Use abs_lisp.
      ($(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): Manually expand target file name.
      
      * nextstep/Makefile.in (${ns_check_file} ${ns_appdir}):
      Quote entities that might contain whitespace.
      
      * nt/Makefile.in ($(DESTDIR)${archlibdir}):
      Quote entities that might contain whitespace.
      
      * src/Makefile.in (RUN_TEMACS): Make relative (again).
      ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
      (bootstrap-emacs$(EXEEXT)):
      Quote entities that might contain whitespace.
      
      * test/automated/Makefile.in (abs_top_srcdir, top_builddir):
      New, set by configure.
      (top_srcdir): Remove.
      (abs_test, abs_lispsrc): New.
      (lisp): No longer absolute.
      (emacs, lisp-compile, compile, compile-always):
      Quote entities that might contain whitespace.
      
      Fixes: debbugs:15675
      b8e3b0a9