summaryrefslogtreecommitdiff
path: root/lib-src
Commit message (Collapse)AuthorAgeFilesLines
* Port flexible array members to GCC + valgrindPaul Eggert2016-09-071-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | These changes are needed to conform to the C standard's rule for allocating structs containing flexible array members. C11 says that malloc (offsetof (struct s, m) + n) does not suffice to allocate a struct with an n-byte tail; instead, malloc’s arg should be rounded up to the nearest multiple of alignof (struct s). Although this is arguably a defect in C11, gcc -O2 + valgrind sometimes complains when this rule is violated, and when debugging it’s better to keep valgrind happy. For details please see the thread containing the message at: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00416.html * lib-src/ebrowse.c, src/alloc.c, src/image.c, src/process.c: Include flexmember.h. * lib-src/ebrowse.c (add_sym, add_member, make_namespace) (register_namespace_alias): * src/alloc.c (SDATA_SIZE, allocate_string_data): * src/image.c (xpm_cache_color, imagemagick_create_cache): * src/process.c (Fmake_network_process): Use FLEXSIZEOF instead of offsetof and addition. * src/alloc.c (SDATA_SIZE, vector_alignment): Use FLEXALIGNOF instead of sizeof (ptrdiff_t). * src/lisp.h (ALIGNOF_STRUCT_LISP_VECTOR): Remove, as alloc.c can now calculate this on its own.
* * lib-src/etags.c (invalidate_nodes): Fix another thinko.Eli Zaretskii2016-08-311-1/+1
|
* Fix etags problems found by static checkingPaul Eggert2016-08-311-24/+22
| | | | | | | * lib-src/etags.c (invalidate_nodes, put_entry): Remove now-unnecessary tests for null pointers. Simplify. (put_entries): Rewrite to avoid GCC 6.2 warning about dereferencing null pointer.
* Fix a thinko in etags.cEli Zaretskii2016-08-311-1/+1
| | | | | * lib-src/etags.c (invalidate_nodes): Don't try to dereference a null pointer.
* Avoid recursive calls in etagsEli Zaretskii2016-08-311-64/+226
| | | | | | | * lib-src/etags.c (stack_entry): New struct. (push_node, pop_node, put_entry): New functions. (free_tree, add_node, invalidate_nodes, put_entries): Re-implement in a non-recursive way, to avoid stack overflow. (Bug#5847)
* Pacify --enable-gcc-warnings for lib-src/pop.cPaul Eggert2016-08-281-14/+17
| | | | | | | | * lib-src/pop.c: Include c-ctype.h. (socket_connection): Pacify --enable-gcc-warnings by rewriting to avoid 'if (v = E) ...'. Use c_tolower, instead of a combination of the (undeclared) isupper and tolower. Fix pointer constness problem.
* Fix compilation warning in the MinGW buildEli Zaretskii2016-07-222-13/+2
| | | | | | | | | | | * nt/inc/ms-w32.h: Include stdint.h. (_execvp, execve): Provide prototypes. * lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp, it is now in nt/inc/ms-w32.h. * lib-src/ntlib.c (getppid): Avoid compiler warnings due to format mismatch. (sys_ctime): Remove, not used.
* Replace IF_LINT by NONVOLATILE and UNINITPaul Eggert2016-06-081-1/+1
| | | | | | | Inspired by a suggestion from RMS in: http://bugs.gnu.org/23640#58 * .dir-locals.el (c-mode): Adjust to macro changes. * src/conf_post.h (NONVOLATILE, UNINIT): New macros (Bug#23640). (IF_LINT): Remove. All uses replaced by the new macros.
* Omit IF_LINT code that no longer seems neededPaul Eggert2016-05-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nowadays GCC is smarter, or the Emacs code has mutated, or both, and now is as good a time as any to remove uses of IF_LINT that now seem to be unnecessary. * lib-src/emacsclient.c (set_local_socket): * lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]: * src/buffer.c (fix_start_end_in_overlays, fix_overlays_before): * src/casefiddle.c (casify_region): * src/charset.c (load_charset_map): * src/coding.c (decode_coding_object, encode_coding_object): * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable) (cons_to_unsigned, cons_to_signed): * src/frame.c (make_frame, x_set_frame_parameters): * src/keyboard.c (read_event_from_main_queue): * src/regex.c (regex_compile): * src/syntax.c (back_comment): * src/window.c (Frecenter): * src/xfaces.c (Fx_list_fonts): Remove IF_LINT that no longer seems necessary. * src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT. * src/keyboard.c (read_char): Use IF_LINT (volatile) rather than a pragma dance to pacify GCC -Wclobbered. * src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT. * src/xterm.c (x_connection_closed): Now _Noreturn, which should mean we do not need IF_LINT any more. (x_io_error_quitter): Now _Noreturn. Put an 'assume (false)’ at the end, to forestall warnings from older compilers.
* Fix compiler warnings in the MinGW buildEli Zaretskii2016-05-214-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac [mingw32]: Don't add -Wpointer-sign, and add -Wno-pointer-sign, to keep the noise level down. * nt/mingw-cfg.site (gl_cv_warn_c__Wredundant_decls): Disable -Wredundant-decls, as that produces a lot of noise due to redeclaration of time-related functions by gnulib. * nt/runemacs.c (set_user_model_id): Fix argument type of 'SetCurrentProcessExplicitAppUserModelID'. * src/image.c (x_create_bitmap_from_file) [HAVE_NTGUI]: Don't declare 'dpyinfo', as it is unused. (xpm_load): Fix warnings about pointer signedness. * src/w32proc.c (IsValidLocale, init_winsock): Remove redundant prototypes. (sys_spawnve): Avoid warnings about discarding 'const' qualifier. (sys_select): Provide prototype. (g_b_init_compare_string_w): Move declaration to file scope. * src/w32heap.c (dumped_data_commit): Now static. (FREEABLE_P): Avoid warnings about pointer comparison with integer. (mmap_realloc): Cast to 'char *' for arithmetics on void pointers. * src/w32console.c (ctrl_c_handler, sys_tputs, sys_tgetstr) (evalcost, cmputc, cmcheckmagic, cmcostinit, cmgoto, Wcm_clear): Provide prototypes. * src/w32.c (globals_of_w32, conv_sockaddr_to_lisp): Remove redundant prototypes. (w32_get_internal_run_time, map_w32_filename): Provide prototype. (init_environment, sys_ctime): Avoid warnings about discarding 'const' qualifier. Include utimens.h. (sys_ctime, sys_chdir, sys_creat, sys_fopen, sys_mkdir) (sys_open, sys_rename, sys_rmdir, is_slow_fs, term_winsock) (sys_close, sys_dup2, sys_read, sys_write, sys_localtime): Provide prototypes. (sys_rename_replace): Use %d to avoid compiler warnings. (_wsa_errlist): Make the message text 'const char *', to avoid compilation warnings. (dynlib_reset_last_error): Move prototype to file scope. (w32_get_resource): First argument is now 'const char *'. * src/w32uniscribe.c (syms_of_w32uniscribe): Provide prototype. (otf_features): Second argument is no 'const char *'. * src/w32term.c (free_frame_menubar, x_wm_set_size_hint) (x_set_window_size): Remove redundant prototypes. (XChangeGC, XGetGCValues, w32_draw_underwave) (w32_draw_rectangle, w32_shift_glyphs_for_insert, x_mouse_leave) (x_calc_absolute_position, x_destroy_window): Now static. (menubar_selection_callback): Move prototype to file scope. * src/w32font.c (g_b_init_get_glyph_outline_w): Remove redundant declaration. (w32_to_x_charset): Fix warnings about discarding 'const' qualifier. (w32font_full_name): Fix warnings about implicit conversion of 'float' to 'double'. * src/w32reg.c (w32_get_rdb_resource): Fix warnings about discarding 'const' qualifier. * src/w32menu.c (syms_of_w32menu, globals_of_w32menu) (set_frame_menubar): Remove redundant prototypes. (menubar_selection_callback, w32_menu_display_help): Provide prototypes. (simple_dialog_show): Avoid warnings about discarding 'const' qualifier. * src/w32fns.c (syms_of_w32fns, globals_of_w32fns) (free_frame_menubar, w32_strerror, x_set_menu_bar_lines) (x_set_tool_bar_lines, x_set_internal_border_width): Remove redundant prototypes. (current_popup_menu): Remove redundant declaration. (colormap_t): Member 'name' is now 'const char *'. (add_system_logical_colors_to_map): Fix signed/unsigned warnings. (x_decode_color, x_set_border_pixel) (x_clear_under_internal_border, x_set_name, hook_w32_key) (reset_w32_kbdhook_state, deliver_wm_chars, w32_backtrace): Now static. (w32_load_cursor, w32_key_to_modifier, map_keypad_keys) (w32_msg_worker, w32_last_error): Provide prototypes. (funhook, lookup_vk_code): Avoid warnings about missing parentheses. (x_default_font_parameter, Fw32_notification_notify): Avoid warnings about discarding 'const' qualifier. (Fx_create_frame): Avoid warnings about empty body of 'else'. (x_screen_planes): Ifdef away unused function. (Fx_show_tip): Remove unused variables. (Fw32_battery_status): Avoid warnings about implicit promotion from float to double. (Fw32_notification_notify): Initialize 'timeout'. * src/profiler.c (profiler_cpu_running) [HAVE_ITIMERSPEC]: Only define the TIMER_SETTIME_RUNNING value if it will be used. * src/w32notify.c (send_notifications): Ifdef away an empty if clause. Remove unused variable. (watch_end, watch_completion): Provide prototypes. * src/sound.c (sound_warning) [WINDOWSNT]: Don't define: unused. * src/callproc.c (child_setup, getenv_internal_1) [WINDOWSNT]: Fix warning with pointer signedness. * src/gnutls.c (gnutls_x509_crt_get_signature) (gnutls_alert_send_appropriate) [WINDOWSNT]: Don't define, and don't load them from the GnuTLS library, as they are no longer used. * src/process.c (DATAGRAM_CHAN_P) [!DATAGRAM_SOCKETS]: Don't define, as it's unused. * src/unexw32.c (open_input_file, open_output_file) (close_file_data): Remove redundant prototypes. (_start): provide prototype. (mainCRTStartup): Move prototype to file level. (find_section): Use type-cast to shut up compiler warnings. (offset_to_section, relocate_offset): Now static. (find_section): First argument is now a 'const char *'. (offset_to_section): Ifdef away, as it's unused. * src/w32heap.h (find_section): Adjust prototype. * src/dynlib.c (dynlib_reset_last_error): Provide prototype. * src/dired.c (directory_files_internal_w32_unwind): Avoid warnings about missing prototypes. (is_slow_fs) [WINDOWSNT]: Provide prototype at file level. (directory_files_internal) [WINDOWSNT]: Fix warnings about pointer signedness. * src/fileio.c (Ffile_writable_p, Ffile_regular_p) [WINDOWSNT]: Fix warnings about pointer signedness. * src/filelock.c (WTMP_FILE) [WINDOWSNT]: Don't define, it's unused. * src/sysdep.c (_getpid): Remove redundant prototype. (sys_subshell) [DOS_NT]: Don't define 'status', it's unused. [!MSDOS]: Don't define 'st', it's unused. (init_sys_modes) [DOS_NT]: Don't define 'terminal', it's unused. (str_collate) [WINDOWSNT]: Avoid warnings about pointer signedness. * src/keyboard.c (tty_read_avail_input) [WINDOWSNT]: Don't define n_to_read, as it is not used. (MAX_ENCODED_BYTES) [WINDOWSNT]: Don't define, as it's unused. * src/w32font.h (syms_of_w32font): Remove redundant prototype. * src/xfaces.c (x_display_info) [HAVE_NTGUI]: Remove unused macro. * src/term.c (init_tty) [DOS_NT]: Ifdef away variables that are not used by DOS_NT builds, to avoid compiler warnings. * src/menu.c (current_popup_menu) [HAVE_NTGUI]: Remove redundant declaration. * src/dispnew.c (init_display) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * src/w32term.h (x_set_window_size, x_get_focus_frame) (x_make_frame_visible, x_make_frame_invisible, x_iconify_frame) (x_set_frame_alpha, x_activate_menubar, x_bitmap_icon) (x_free_frame_resources, x_real_positions) (display_x_get_resource): Remove redundant prototypes. * lib-src/ntlib.c (sys_ctime, sys_fopen, sys_chdir, mkostemp) (sys_rename, gettimeofday): Provide prototypes. * lib-src/ntlib.h (getuid, geteuid, mkostemp): Remove redundant declarations. * lib-src/emacsclient.c (w32_getenv): Argument is now 'const char *'. (xstrdup, w32_get_resource, w32_window_app, w32_execvp, ttyname) (close_winsock, initialize_sockets, w32_set_user_model_id) (w32_find_emacs_process, w32_give_focus) [WINDOWSNT]: Add prototypes. (w32_get_resource) [WINDOWSNT]: Fix a warning about signedness difference. (w32_set_user_model_id): Update prototype of SetCurrentProcessExplicitAppUserModelID to avoid compiler warnings. (start_daemon_and_retry_set_socket) [WINDOWSNT]: Use type-cast to shut up compiler warnings. * lib-src/etags.c (MAXPATHLEN) [WINDOWSNT]: Remove unused macro.
* Port --enable-gcc-warnings to GCC 6.1Paul Eggert2016-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (WERROR_CFLAGS): Omit -Wunused-const-variable=2. * lib-src/etags.c (LOOKING_AT, LOOKING_AT_NOCASE): Omit test whether pointer plus a constant equals a null pointer. * src/alloc.c (compact_small_strings): Avoid pointer arithmetic on null pointers. * src/alloc.c (mark_face_cache): * src/fontset.c (free_realized_fontsets, Fset_fontset_font): * src/fringe.c (draw_fringe_bitmap_1) (Fset_fringe_bitmap_face): * src/macfont.m (macfont_draw): * src/msdos.c (IT_set_face, IT_clear_screen): * src/nsfont.m (nsfont_draw): * src/nsterm.h (FRAME_DEFAULT_FACE): * src/nsterm.m (ns_draw_window_cursor) (ns_draw_vertical_window_border, ns_draw_window_divider) (ns_dumpglyphs_box_or_relief) (ns_maybe_dumpglyphs_background, ns_dumpglyphs_image) (ns_dumpglyphs_stretch): * src/w32term.c (w32_draw_vertical_window_border) (w32_draw_window_divider, x_set_mouse_face_gc): * src/xdisp.c (estimate_mode_line_height, init_iterator) (handle_face_prop, handle_single_display_spec, pop_it) (CHAR_COMPOSED_P, get_next_display_element) (next_element_from_display_vector, extend_face_to_end_of_line) (fill_gstring_glyph_string,BUILD_COMPOSITE_GLYPH_STRING): * src/xfaces.c (Finternal_merge_in_global_face, Fface_font) (lookup_named_face): * src/xterm.c (x_draw_vertical_window_border) (x_draw_window_divider, x_set_mouse_face_gc): Prefer FACE_OPT_FROM_ID to FACE_FROM_ID when the result might be null. * src/xterm.c (try_window_id): Redo loop to convince GCC 6.1 that it is null pointer safe. (x_color_cells): Use eassume as necessary to pacify GCC 6.1. * src/dispextern.h (FACE_FROM_ID, IMAGE_FROM_ID): Now returns non-null. (FACE_OPT_FROM_ID, IMAGE_OPT_FROM_ID): New macro, with the old behavior of the non-_OPT macro, to be used when the result might be a null pointer. * src/dispnew.c (buffer_posn_from_coords, marginal_area_string) [HAVE_WINDOW_SYSTEM]: * src/intervals.h (INTERVAL_WRITABLE_P): * src/term.c (turn_off_face): * src/xdisp.c (get_glyph_face_and_encoding, fill_image_glyph_string) (produce_image_glyph, produce_xwidget_glyph): * src/xfaces.c (lookup_named_face): Remove unnecessary test for null pointer. * src/keyboard.c (read_char): Suppress bogus -Wclobbered warning. * src/process.c (would_block): New function. (server_accept_connection, wait_reading_process_output, send_process): Use it. * src/xdisp.c (get_window_cursor_type, note_mouse_highlight): Prefer IMAGE_OPT_FROM_ID to IMAGE_FROM_ID when the result might be null.
* Prefer grep -E/-F to egrep/fgrepPaul Eggert2016-05-071-2/+2
| | | | | | | | | | | | | | | | | | POSIX marked egrep and fgrep as legacy apps in SUSv2 (1997) and withdrew them in SUSv3 (2001), and these days grep -E and grep -F are probably more portable. * lib-src/etags.c (main): * lisp/eshell/em-unix.el (eshell-grep, eshell/egrep) (eshell/fgrep): * lisp/cedet/semantic/symref.el (semantic-symref-find-text): * lisp/eshell/esh-var.el (eshell-apply-indices): * lisp/progmodes/ada-xref.el (ada-xref-search-with-egrep) (ada-find-in-src-path): * lisp/textmodes/ispell.el (ispell-grep-command): (ispell-lookup-words): Use or document grep -E and grep -F instead of egrep and fgrep. * lisp/textmodes/ispell.el (ispell-grep-options): Use -Ei on all platforms, not just MS-Windows.
* Unhide the --no-line-directive option to 'etags'Eli Zaretskii2016-03-211-2/+1
| | | | | | | | | | | * lib-src/etags.c (print_help): Un-undocument the --no-line-directive option. (Bug#22306) * doc/man/etags.1: Document the --no-line-directive option. [This reapplies commit fee0526a189f43e8470d78e8374bd425890fbe6f, which was inadvertently lost by merge commit 7823745acbe9b87eea2db4ef434e379fc903ec35.]
* Merge from origin/emacs-25John Wiegley2016-03-1112-35/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | facb5e2 Update Emacs manual section related to character folding 4efea8e ; * etc/DEBUG: Fix a typo. (Bug#22984) f8df21b Update admin/notes/unicode 950be68 Add symref-filepattern entries for c?perl-mode 8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them. 985dacf ; NEWS update for the last change in etags 741a6f8 Sync with gnulib 7352c6c Rework C source files to avoid ^( a589e9a By default, etags produces unqualified Perl tag names 72c7438 Indent methods with keyword names correctly 28532a9 Propertize character literals and special global variables differently a7d6f39 ; Fix last change in NEWS 83b2a20 Change how /etc/NEWS presents character folding b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding off by default"" 711ca36 Properly handle lambda as read function (bug 22961) 1b9d616 Propertize operator symbol names with symbol syntax class 9b16bc2 Stop recognizing :#{} as symbol in ruby-mode 366ec77 Allow using the left shift operator without spaces on both sides 02bf7cc Properly handle unquoting in wdired (bug 22938) 16cf469 ; Spelling fix and tighten up comment f50bc04 Allow splat operator before percent literal 991c801 Don't apply the return value of goto-char as syntax class 6e63b3e Guard against nested percent literals 066f3bc Recognize iuwu-mod after an escaped newline 6f7a57c Fix symbolic mode string conversion for s and t 50b9826 Update 'ucs-names' database 993b2fb Improve doc string of 'shell-command' b71c717 Make the code in movemail_strftime more general cc057e4 Speed up redisplay of binary files with long series of nulls e51b27e Remove the highlighting support for quoting 'like this' inside Lisp docstrings b1abce1 Restore leading space in movemail pop output 98b8d44 Fix bidi-paragraph-direction in Rmail view buffer dc9d837 Don't misindent computed property generator methods 7923112 Fix mbox files produced by movemail on MS-Windows c45a1ca doc string file descriptor exhaustion fix 265141b Fix Bug#22814
| * Rework C source files to avoid ^(Paul Eggert2016-03-1012-29/+27
| | | | | | | | | | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
| * By default, etags produces unqualified Perl tag namesEli Zaretskii2016-03-101-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Perl_functions): Produce unqualified names, unless -Q was specified. (print_help): Update the description of -Q. * doc/man/etags.1: Update the documentation of -Q. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/CTAGS.good: Adapt the expected test results to the changed Perl functionality.
| * Make the code in movemail_strftime more generalEli Zaretskii2016-03-061-1/+28
| | | | | | | | | | | | * lib-src/movemail.c (movemail_strftime): Transform the format string passed by the caller instead of using a separate format string.
| * Restore leading space in movemail pop outputPaul Eggert2016-03-051-1/+19
| | | | | | | | | | | | | | | | | | * lib-src/movemail.c (movemail_strftime) [WINDOWSNT]: New function. (strftime) [WINDOWSNT]: New macro. (mbx_delimit_begin): Go back to previous version of this code, now that there’s a special-purpose WINDOWSNT implementation that should do the right thing. That way, the output continues to use leading space rather than leading zero for day of month.
| * Fix mbox files produced by movemail on MS-WindowsEli Zaretskii2016-03-051-1/+1
| | | | | | | | | | | | * lib-src/movemail.c (mbx_delimit_begin): Use portable strftime format specifiers, as at least the MS-Windows version of strftime doesn't support %e and %T.
* | Assume getaddrinfo in C codePaul Eggert2016-03-071-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/CPP-DEFINES, configure.ac: Remove HAVE_GETADDRINFO, HAVE_H_ERRNO. All uses removed. * doc/lispref/processes.texi (Network, Network Processes), etc/NEWS: Say that port numbers can be integer strings. * lib-src/pop.c (h_errno) [!WINDOWSNT && !HAVE_H_ERRNO]: Remove decl. (socket_connection): Assume HAVE_GETADDRINFO. * lisp/mpc.el (mpc--proc-connect): * lisp/net/network-stream.el (open-network-stream): It’s now OK to use integer strings as port numbers. * src/process.c (conv_numerical_to_lisp) [!HAVE_GETADDRINFO]: Remove. (Fmake_network_process): Assume HAVE_GETADDRINFO.
* | Implement getaddrinfo fallback for MS-WindowsEli Zaretskii2016-03-051-1/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html for more details. * nt/mingw-cfg.site (ac_cv_func_getaddrinfo) (ac_cv_func_gai_strerror): Set to "yes", as the configure script's test program is not smart enough to auto-detect these. * nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to sys_getaddrinfo and sys_freeaddrinfo. Provide prototypes for sys_getaddrinfo and sys_freeaddrinfo. * src/w32.c (init_winsock): Try loading getaddrinfo and freeaddrinfo from ws2_32.dll. (sys_getaddrinfo, sys_freeaddrinfo): New functions. * lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h, and also ws2tcpip.h. (getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to sys_getaddrinfo and sys_freeaddrinfo, respectively. (load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New functions.
* | Merge from origin/emacs-25John Wiegley2016-03-031-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b13cab6 Add a eww command to toggle paragraph direction 4e46128 * nextstep/WISHLIST: Merge into etc/TODO and remove. 9e078e5 Fix char signedness issue in bidi code 064adf6 * lib-src/pop.c (socket_connection): Fix format string. 14060a9 Avoid inflooping in thing-at-point-looking-at 098d47b * lisp/emacs-lisp/derived.el (define-derived-mode): Revert indent change. b5db8e0 etc/PROBLEMS: Mention problems with using file descriptors ec10ef9 * lisp/apropos.el (apropos-variable): Doc fix. (Bug#22813). d2dd614 Remove unneeded workaround in xftfont.c 9b7593c ; * etc/NEWS: Reflect latest changes in saveplace. fde0cd1 * lisp/saveplace.el (save-place-local-mode): New minor mode 06a872b Fix redisplay on a TTY after 'make-frame' 95f5a43 Make double-click-1 work with unbalanced parens in CC Mode. Fixes bug#5560. 7d206fc Input method polish-slash should not use keyboard translation 8be32cf Fix an assertion 040e0d6 Fix 'toggle-save-place' 5244db2 * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
| * * lib-src/pop.c (socket_connection): Fix format string.Andreas Schwab2016-02-271-1/+1
| |
* | Merge from origin/emacs-25John Wiegley2016-02-151-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dacde7e * etc/AUTHORS: Update the AUTHORS file 478ca5d ; fix changelog entries 2b7d006 ; make change-history-commit 851decb * lisp/dired-aux.el: Require cl-lib. (Bug#22613) 47896c8 ; Improve commentary in insdel.c 53ca1e1 Index tilde characters in names of backup files d97f522 Document deprecation of hi-lock-mode's 'C-x w' bindings b55f06d ; * etc/NEWS: Use double spaces to end a sentence. 28bb214 Announce that the `C-x w' bindings are deprecated 1c98f98 Suppress GNUstep hardening d82f24b Fix redisplay after a large insertion 85a2753 Revert "Fix gnus-group-get-new-news-this-group on group with closed server" e8e3db0 ; Improve merge documentation in CONTRIBUTE 5be9989 * lib-src/make-docfile.c: Include stdarg.h. c95ebbf Extend gpm-mouse-mode's doc string and doc to point out limitations.
| * * lib-src/make-docfile.c: Include stdarg.h.Paul Eggert2016-02-111-0/+1
| |
* | Merge from origin/emacs-25John Wiegley2016-02-151-144/+182
|\| | | | | | | | | | | | | | | | | | | | | | | f5d6b9b Revert "Support integer image rotation and respect EXIF rotations" afe7d1f Revert "Document EXIF image rotation" c6f377c Document OS X LANG default eb4a18c Set locale when run from OS X GUI 456c0a3 make-docfile cleanup for I/O, etc. 25ec995 Memory-management cleanup in make-docfile 02d925e Kevin Gallagher has new email address 4ef153b Improve doc strings of 'forward/backward-word-strictly' 3ad05a0 Describe Makefile test targets in test/README
| * make-docfile cleanup for I/O, etc.Paul Eggert2016-02-101-90/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/make-docfile.c (progname, generate_globals, num_globals) (num_globals_allocated, globals): Now static. (generate_globals, struct rcsoc_state, read_c_string_or_comment): (write_c_args, scan_c_stream, search_lisp_doc_at_eol, scan_lisp_file): Use bool for boolean. (verror): New function. (fatal, error): Use it. API is now like printf. All callers changed. (main): Remove err_count local that was always 0. (main, scan_c_stream, scan_lisp_file): Check for I/O error. (scan_file, scan_c_file, scan_c_stream, scan_lisp_file): Return void, not 0. (put_char, scan_keyword_or_put_char, scan_c_file): Use char for byte. (scan_keyword_or_put_char): Check for missing ( and unexpected EOF. (close_emacs_globals): Use ptrdiff_t for index, not int. (scan_c_file, scan_lisp_file): Exit with failure if file cannot be opened, rather than diagnosing but exiting with status 0. (search_lisp_doc_at_eol): Don't worry about ungetc of EOF; it's portable now.
| * Memory-management cleanup in make-docfilePaul Eggert2016-02-101-57/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I compiled it with -fsanitize=address and fixed the leaks it detected. Also, I changed it to prefer signed to unsigned integer types, and to check for integer overflow. * lib-src/make-docfile.c: Include <stddef.h>, <stdint.h>, <intprops.h>, <min-max.h>. (memory_exhausted): New function. (xmalloc, xrealloc): Use it. (xmalloc, xrealloc, scan_file, struct rcsoc_state, write_c_args) (uncompiled, scan_lisp_file): Prefer signed integer types to unsigned. (xstrdup): Remove. All uses removed. (num_globals, num_globals_allocated, write_globals, scan_c_stream): Use ptrdiff_t, not int, for indexes that in theory could exceed INT_MAX. (add_global): Use const to pacify --enable-gcc-warnings. Make a copy here, rather than relying on strdup calls later. (add_global, write_globals, scan_c_stream): Avoid integer overflow when calculating sizes. (write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak. (scan_c_stream): Check for add_global failure.
* | Merge from origin/emacs-25Paul Eggert2016-02-091-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ffe7dd * lisp/isearch.el (isearch-define-mode-toggle): Improve logic 16140f7 * lisp/menu-bar.el (menu-bar-options-menu): New search submenu 3db6adb * lisp/isearch.el (search-default-mode) 4ea1ea7 * lisp/isearch.el: Rename search-default-regexp-mode to search-default-mode c77ffc8 Use monitor's resolution for positioning tooltips 49e5749 Fix file-notify-test on MS-Windows be1d874 Fix issues found by auditing w32notify code 87ae218 Extend etags Ruby support for accessors aa35257 Update publicsuffix.txt. 6816bff Ensure that Gnus dribble handling allows removing entries 691feae Be consistent when using encoded strings in nnimap data 3ed423b Display the decoded Gnus group name 5428b5b Use completion-ignore-case instead of defining command
| * Extend etags Ruby support for accessorsEli Zaretskii2016-02-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Ruby_functions): Support accessors defined with parentheses. (Bug#22563) * test/etags/ruby-src/test1.ru (A::B): Add tests for accessors defined with parentheses. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests.
* | Merge from origin/emacs-25Paul Eggert2016-02-091-2/+3
|\| | | | | | | | | | | | | | | | | | | 2c117fc * etc/NEWS: Document new mpc.el features 71a0496 * lisp/custom.el (defface): Revert indentation change. (Bug#22524) 9dfece1 Correctly fontify C++ initializations which "look like" functions. 4485222 Improve newsticker-treeview-selection-face 4236944 Minor fix in tagging Ruby accessors by etags 35fc77d Spelling fixes 3dda110 Remove 'def X' from the example
| * Minor fix in tagging Ruby accessors by etagsEli Zaretskii2016-02-041-2/+3
| | | | | | | | | | * lib-src/etags.c (Ruby_functions): Don't tag accessors whose names are not literal symbols. (Bug#22241)
* | Merge from origin/emacs-25John Wiegley2016-02-031-8/+103
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ee73997 Make erc work better when encountering unknown prefix chars b99141d Make erc completion case-insensitive again 66c4620 Make complection in erc use consistent casing 8c562b2 Make /QUIT in erc more robust d93d2c5 Make tracking faces in Emacs work more reliably af6ab7e Make shr not bug out on images on non-graphical displays 3311f40 Fix bookmark display widths d90ab1e Fix typo in eww-make-unique-file-name 7f81825 Make it possible to TAB to input fields a43a1dc Insert complete alt texts when images are disabled 56ed4e1 Allow eww text fields to grow 66b315c Make erc work when subword-mode is switched on 255b68f Fix IMAP doc example 91557f5 Quoting fixes in doc strings and diagnostics 2c0dc9f Fix warning message in hack-local-variables 504696d Etags: yet another improvement in Ruby tags 8784ebf Fix x-popup-menu on TTYs without a mouse 8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro 6191003 Use pop-to-buffer-same-window in eww fe321fd * autogen.sh: Revert all recent changes. 74ebd4a * make-dist: Updates related to nt/. 737193a * make-dist: Add modules/. 3696bf2 * make-dist: Update for super-special file that can't live in etc/. a4278e2 Fix failure to compile ns-win.el in parallel builds 860da4d Fix names of tags generated for Ruby accessors f6213ce Fix file-name recognition in 'etags' e42e662 Change Ruby file names and extensions recognized by 'etags' 58bfb6a More improvements for Ruby support in 'etags' c04e911 Add --git-config option to autogen.sh 5713466 Fix editing undo changes in eww fields 51362d6 Allow the user more control of popping up the eww window ee0fbd8 Make eww-browse-url with new-window parameter work again 9c3142d Clean up eww code slightly cb035f3 Don't insert nil faces in shr 4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. 93f2153 Improve the custom type of some user options. 9f60d7e Mark some risky calendar variables. 1d07dcd Highlight two additional SCSS keywords ee8b466 Recommend enabling integrity-checking in git e639e10 Some corrections in Elisp manual d766ca8 Chatter when autogen.sh changes Git configuration 3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) 43cb9f8 Omit unnecessary history from Lisp intro 2fbd1da * etc/HISTORY: Add some more history, plus git tags. c90e1b4 Improve elisp “Security Considerations” doc cedd7ca autogen.sh now arranges for git to check hashes 86ce76b ; Fix ChangeLog.2 commit ID. 7b1d2b1 Fix (c & 040) typo in emergency escapes a8273da Fix display of overlay strings with 'display' and 'box' property fc48106 Fix imap-starttls-open cdecbed Fix return value of imap-starttls-open 20c7e34 ; * etc/NEWS: Fix renamed command name 98bdbdb Correct reference to DARWIN_OS preprocessor symbol b250d29 Spelling fix b920a0e Spelling fixes 93b144b Pacify GCC on C library without glibc API
| * Etags: yet another improvement in Ruby tagsEli Zaretskii2016-02-031-24/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Ruby_functions): Handle continuation lines in Ruby accessor definitions. (Bug#22241) * test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for accessors and multiline definitions. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags.
| * Fix names of tags generated for Ruby accessorsEli Zaretskii2016-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Ruby_functions): Don't include the leading colon ':' in tags for Ruby accessors and aliases. (Bug#22241) * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags.
| * Fix file-name recognition in 'etags'Eli Zaretskii2016-02-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (get_language_from_filename): If FILE includes a leading directory, compare only its basename to the known file names in lang_names[]. * test/etags/Makefile (RBSRC): Adapt to recent test1.ruby renaming. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby file names and to the results in Makefile due to the above etags.c fix.
| * Change Ruby file names and extensions recognized by 'etags'Eli Zaretskii2016-02-021-2/+4
| | | | | | | | | | | | | | | | | | * lib-src/etags.c <Ruby_filenames>: New variable, holds names of Ruby files. <Ruby_suffixes>: Treat .rb, .ru, and .rbw as Ruby extensions. <lang_names>: Add Ruby_filenames to the Ruby entry. * test/etags/ruby-src/test1.ru: Renamed from test1.ruby. (Bug#22241)
| * More improvements for Ruby support in 'etags'Eli Zaretskii2016-02-021-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Ruby_functions): Tag Ruby accessors and alias_method. Identify constants even if the assignment is not followed by whitespace. (Bug#22241) * test/etags/ruby-src/test1.ruby: Add tests for constants, accessors, and alias_method. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests.
* | -Paul Eggert2016-01-301-5/+128
|\|
| * Support Go language in 'etags'lu4nx2016-01-301-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c <Ruby_help>: Fix documentation of Ruby tags. <Go_help>: New help. <Go_suffixes>: New variable. (Go_functions): New function. <lang_names>: Add entry for Go. (Bug#22370) * doc/emacs/maintaining.texi (Tag Syntax): Document Go support. * doc/man/etags.1: Mention Go support. * etc/NEWS: Mention Go support. * test/etags/go-src/test.go: * test/etags/go-src/test1.go: New test files. * test/etags/Makefile (GOSRC): New variable. (SRCS): Add $(GOSRC). * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to addition of Go tests.
| * Improve Ruby support in 'etags'Eli Zaretskii2016-01-301-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/etags.c (Ruby_functions): Tag constants. Don't tag singleton classes. Remove class qualifiers from tags generated for method and constant names. (Bug#22241) * doc/emacs/maintaining.texi (Tag Syntax): Mention that constants are tagged by etags in Ruby. * etc/NEWS: Mention that constants are tagged by etags in Ruby. * test/etags/ruby-src/test1.ruby: Add more tests. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to the changes in etags and in Ruby tests.
* | -Paul Eggert2016-01-301-2/+2
|\|
| * Port "$@" to OpenIndiana ksh93Paul Eggert2016-01-241-2/+2
| | | | | | | | | | | | | | | | | | In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh (derived from ksh 93t+ 2010-03-05). ${1+"$@"} works around an ancient bug in long-dead shells, so remove the workaround. * admin/check-doc-strings, configure.ac, lib-src/rcs2log: Use plain "$@" rather than ${1+"$@"}.
| * Unhide the --no-line-directive option to 'etags'Eli Zaretskii2016-01-151-2/+1
| | | | | | | | | | | | | | * lib-src/etags.c (print_help): Un-undocument the --no-line-directive option. (Bug#22306) * doc/man/etags.1: Document the --no-line-directive option.
* | Merge from origin/emacs-25John Wiegley2016-01-1115-16/+16
|\| | | | | | | | | | | ef33bc7 Spelling and grammar fixes 9c3dbab Fix copyright years by hand 0e96320 Update copyright year to 2016
| * Fix copyright years by handPaul Eggert2016-01-011-1/+1
| | | | | | | | | | These are dates that admin/update-copyright did not update, or updated incorrectly.
| * Update copyright year to 2016Paul Eggert2016-01-0115-15/+15
| | | | | | | | Run admin/update-copyright.
* | Build tweaks related to tags files.Glenn Morris2016-01-061-2/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/Makefile.in (tagsfiles): New variable. (TAGS): Also depend on the source files. Use our own etags program. * lisp/Makefile.in (ETAGS): Add EXEEXT. (lisptagsfiles1, lisptagsfiles2, lisptagsfiles3, lisptagsfiles4): Remove. (tagsfiles): New, replacing lisptagsfiles1 etc. Remove irrelevant source files here rather than in the TAGS rule. (${ETAGS}): New rule. (TAGS): Also depend on the etags executable. * lwlib/Makefile.in (EXEEXT): New, set by configure. (ETAGS): Add EXEEXT. (${ETAGS}): New rule. (ctagsfiles): Use "wildcard". (TAGS): Also depend on the etags executable. * nt/Makefile.in (ETAGS, tagsfiles): New variables. (${ETAGS}): New rule. (TAGS): Fix dependencies. * oldXMenu/Makefile.in (EXEEXT): New, set by configure. (ETAGS): New variable, replacing $TAGS. Use our own etags program. Remove "-t" argument. (${ETAGS}): New rule. (tagsfiles): New variable. (TAGS): New rule, with proper dependencies. * src/Makefile.in (ETAGS): Add EXEEXT. Add a build rule. (ctagsfiles1, ctagsfiles2): Use "wildcard". (ctagsfiles3): Remove. (TAGS): Depend on etags. (../lisp/TAGS, $(lwlibdir)/TAGS): Let the rules in the relevant directories decide if updates are needed.
* Remove SunOS 4.x cruftPaul Eggert2015-12-181-4/+0
| | | | | | Support for SunOS 4.x was removed in Emacs 23 but some cruft was left behind. * lib-src/pop.c [sun]: Remove no-longer-needed include. * lwlib/xlwmenu.c (SUNSO41): Remove.
* Improve Lua support in etagsEli Zaretskii2015-12-111-0/+1
| | | | | | | | | | | | | | | | | * lib-src/etags.c (Lua_functions): Skip spaces before looking for "function". * etc/NEWS: Mention improved Lua support by 'etags'. * test/etags/lua-src/test.lua (test): Add tests for indented function definitions. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to the modified Lua tests.