* lisp/net/net-utils.el (iwconfig-program): Add iw(8).
(iwconfig-program-options): Add "dev" argument for iw. Another useful
option is "phy"; beyond that one needs to know the interface name.
(netstat-program): Add ss(8).
(route-program): Add ip(8).
(route-program-options): Add "route" argument for ip.
This fixes bug #23827.
* src/buffer.c (set-buffer-major-mode): Run `fundamental-mode' when the buffer
gets set to that mode, so that `run-mode-hooks', and thus
`hack-local-variables' get run.
* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): insert
c-before-after-change-digit-quote into the C++ value.
(c-before-font-lock-functions): Insert c-depropertize-new-text into the values
for all languages. Insert c-before-after-change-digit-quote into the C++
value.
* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Wrap the function in
c-save-buffer-state.
(c-depropertize-new-text, c-before-after-change-digit-quote): New functions.
This incorporates:
2016-06-24 intprops: port better to GCC 7
2016-06-13 xalloc-oversized: port to GCC 7; fewer warnings
* doc/misc/texinfo.tex, lib/xalloc-oversized.h, lib/intprops.h:
Copy from gnulib.
* src/dispextern.h (FACE_OPT_FROM_ID): Don’t use FACE_FROM_ID,
since it is intended to be used only when it returns a non-null
pointer, and here the pointer might be null.
(IMAGE_OPT_FROM_ID): Don’t use IMAGE_FROM_ID, for similar reasons.
* lisp/international/characters.el (standard-case-table): Swap the
order of some lines, to have 'upcase' return the upper-case
variant, not the title-case, for some characters whose lower-case
map to the same codepoints. (Bug#23833)
* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-state-pp-to-literal):
Put `save-match-data' around calls to `looking-at' to enable the use of the
match data in higher level functions.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations)
(c-font-lock-cut-off-declarators): Use `limit' rather than `(point-max)' as a
limit to speed up handling of C++ raw strings.
* src/minibuf.c (Fassoc_string): Clarify how CASE-FOLD affects the
string comparison. (Bug#23833)
* src/fns.c (Fcompare_strings): Fix the description of how
IGNORE-CASE affects the comparison.
* doc/lispref/strings.texi (Text Comparison): Clarify how
CASE-FOLD affects the string comparison in 'assoc-string'. Fix
the description of how IGNORE-CASE affects the comparison in
'compare-strings'.
* lisp/url/url-http.el (url-http-create-request): Check the
constructed request in the end to verify that it does not contain
multibyte characters (bug#23750).
* src/lread.c (Fload): Don't overwrite the last character of the
file name in FOUND with 'c', unless the file name ended in ".elc"
to begin with. Don't treat empty files as byte-compiled. See
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00463.html
for more details of the problem this caused.
* src/fileio.c (maybe_move_gap): New function to move the gap to
the end of a buffer, if it isn't there already.
(Finsert_file_contents): Call 'maybe_move_gap' before using
conversion_buffer's text as a C 'char' array. (Bug#23659)
* src/coding.c (decode_eol): Compute the byte increment before
calling del_range_2, because the latter can invalidate the pointer
to buffer text.
* src/composite.c (autocmp_chars):
* src/conf_post.h (DebPrint) [HAVE_NTGUI && !DebPrint && !EMACSDEBUG]:
Use simpler ((void) 0) for no-op expression returning void.
* src/dispextern.h [HAVE_WINDOW_SYSTEM]:
Include fontset.h, for face_for_char.
(FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_FOR_CHAR):
Now inline functions instead of macros. This avoids the need for
all those casts to void.
(FACE_SUITABLE_FOR_ASCII_CHAR_P): Omit 2nd (unused) arg.
All uses changed.
* src/frame.c (Ficonify_frame, Fset_frame_position):
* src/xdisp.c (Fmove_point_visually, show_mouse_face):
* src/xdisp.c (note_mode_line_or_margin_highlight)
(note_mouse_highlight):
Assume HAVE_WINDOW_SYSTEM for simplicity, since the code should
now work either way without generating warnings.
* src/frame.c (display_available) [HAVE_WINDOW_SYSTEM]: New function.
(window_system_available) [HAVE_WINDOW_SYSTEM]: Move to frame.h.
(decode_window_system_frame): Use check_window_system instead of
rolling the code ourself. Return needed only if HAVE_WINDOW_SYSTEM.
(decode_window_system_frame, check_window_system):
Merge the HAVE_WINDOW_SYSTEM and !HAVE_WINDOW_SYSTEM versions into one.
* src/frame.c (Ficonify_frame, Fset_frame_position):
* src/xdisp.c (show_mouse_face, define_frame_cursor1)
(note_mouse_highlight):
Narrow the scope of the HAVE_WINDOW_SYSTEM #ifdef;
this is a better way to pacify GCC.
* src/xdisp.c (x_set_left_fringe, x_set_right_fringe)
(x_set_right_divider_width, x_set_bottom_divider_width):
* src/xfns.c (x_set_internal_border_width):
Don’t use what are now function calls as lvalues.
* src/frame.h (WINDOW_SYSTEM_RETURN): New macro.
(decode_window_system_frame, check_window_system):
Use it, to avoid the need for duplicate declarations.
(window_system_available): Now an inline function.
(display_available): New decl.
(frame_dimension): New inline function.
(FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH)
(FRAME_RIGHT_FRINGE_WIDTH, FRAME_TOTAL_FRINGE_WIDTH)
(FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH)
(FRAME_BOTTOM_DIVIDER_WIDTH):
Use it, to avoid the need for duplicate definitions.
Now inline functions instead of macros.
* src/gnutls.c (gnutls_log_function2i): Remove.
* src/gnutls.h (GNUTLS_LOG2i): Use ‘message’ directly.
This avoids complaints about gnutls_log_function2i being defined
and not used on older platforms that do not need to call GNUTLS_LOG2i.
* src/image.c (DefaultDepthOfScreen) [0]: Remove unused macro.
* src/lisp.h (AUTO_STRING_WITH_LEN): Revert change from ‘type id =
expr’ to ‘type id; id = expr’, as this would suppress valid
jump-misses-init diagnostics. Let’s find a better way to address
the problem.
* src/vm-limit.c (__MALLOC_HOOK_VOLATILE):
Define only if needed.
* src/xdisp.c (handle_single_display_spec):
Simplify fringe_bitmap computation.
(define_frame_cursor1): Do nothing unless in a window system.
All callers changed and simplified.
* src/xfaces.c (realize_default_face):
Use a simpler way to pacify GCC when a return value is not used
on some platforms.
* lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after
every command whether it (apparently) changes the buffer or not.
See Bug#23785 for discussion.
* src/xdisp.c (move_it_in_display_line_to): Reset the iterator's
'constrain_row_ascent_descent_p' flag after processing the
newline, similar to what 'display_line' does. Without this, the
flag remains set once set by x_produce_glyphs, and causes the
vertical layout calculations to go awry, because Emacs thinks the
screen lines have zero height. (Bug#23850)
* src/conf_post.h (DebPrint) [!EMACSDEBUG]: Add empty do-while
loop to avoid compiler warnings about empty body of 'if'
statement.
* src/image.c [HAVE_NTGUI] (DefaultDepthOfScreen): Disable unused
macro.
(x_create_bitmap_from_data): Declare 'frame'.
(x_create_bitmap_from_file): Don't declare unused variable
'dpyinfo'.
* src/lisp.h (AUTO_STRING_WITH_LEN): Avoid initialization to
prevent "jump-misses-init" compiler warnings.
* src/w32fns.c (check_w32_winkey_state): Define and use only if
WINDOWSNT.
(Fx_show_tip): Declare 'f'.
(Fx_file_dialog): Declare 'filter_a' only if not NTGUI_UNICODE.
(w32_strerror): Use format specifier %d for sprintf argument of
type int.
(emacs_abort): Cast sprintf argument of type DWORD to unsigned
int, and use format specifier %x, for compatibility with Cygwin.
(unicode_append_menu) [NTGUI_UNICODE]:
* src/w32menu.c [NTGUI_UNICODE] (get_menu_item_info)
(set_menu_item_info, unicode_append_menu)
(unicode_message_box):
* src/menu.c [NTGUI_UNICODE] (unicode_append_menu): Define as
functions rather than macros to avoid "address will always
evaluate as true" compiler warnings.
* src/w32font.c (w32_to_x_charset): Use format specifier %d for
sprintf argument of type int.
* src/w32term.c (x_draw_glyphless_glyph_string_foreground): Cast
sprintf argument of type int to unsigned int to match %X format
specifier.
(w32_scroll_bar_handle_click):
(w32_horizontal_scroll_bar_handle_click): Declare 'f'.
* src/w32term.h (FRAME_DISPLAY_INFO): Explicitly discard unused
argument.
* src/composite.c (autocmp_chars): Declare and set 'f' only if
HAVE_WINDOW_SYSTEM.
* src/dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P)
(FACE_FOR_CHAR): Explicitly discard unused arguments.
* src/font.c (font_open_entity): Declare 'min_width' where it is
first set, and only if HAVE_WINDOW_SYSTEM.
* src/frame.c [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame):
Define _Noreturn version to avoid "suggest attribute noreturn"
compiler warning.
(check_window_system): Declare as _Noreturn.
(Ficonify_frame):
(Fset_frame_position): Don’t declare and set 'f'.
* src/frame.h [!HAVE_WINDOW_SYSTEM] (decode_window_system_frame)
(check_window_system): Add _Noreturn prototypes.
(FRAME_FRINGE_COLS, FRAME_TOTAL_FRINGE_WIDTH)
(FRAME_LEFT_FRINGE_WIDTH, FRAME_RIGHT_FRINGE_WIDTH)
(FRAME_INTERNAL_BORDER_WIDTH, FRAME_RIGHT_DIVIDER_WIDTH)
(FRAME_BOTTOM_DIVIDER_WIDTH): Explicitly discard unused argument.
* src/xdisp.c (handle_single_display_spec): Declare
'fringe_bitmap' only if HAVE_WINDOW_SYSTEM.
(append_space_for_newline): Declare 'g' where it is first set.
(Fmove_point_visually): Declare and set 'target_is_eol_p' only if
HAVE_WINDOW_SYSTEM.
(show_mouse_face): Declare and set 'f' and 'phys_cursor_on_p' only
if HAVE_WINDOW_SYSTEM.
(note_mode_line_or_margin_highlight):
(note_mouse_highlight): Declare and set 'cursor' and 'pointer'
only if HAVE_WINDOW_SYSTEM.
* src/xfaces.c (realize_default_face): Declare and set 'face' only
if HAVE_X_WINDOWS. Remove redundant #ifdef.
* test/lisp/filenotify-tests.el (file-notify--test-with-events):
Fix thinko in test.
(file-notify-test02-events, file-notify-test04-file-validity)
(file-notify-test07-backup)
(file-notify-test08-watched-file-in-watched-dir): Make test
conditions more weak. (Bug#23618)
* src/alloc.c (ABLOCKS_BUSY): Rename arg to avoid potential clash
with member ‘abase’ in definiens.
(lisp_align_malloc, lisp_align_free): Use bool for boolean.
Avoid compiler warning with fewer casts.
(lisp_align_free): Check busy-field values; this can help the
compiler a bit when optimizing, too.
It didn't work anyway, but this makes any such errors more obvious
by catching them earlier.
* lisp/url/url-http.el (url-http-create-request):
Use string-to-unibyte (bug#23750).
* src/chartab.c (char_table_set_range): Start the loop from the
first character of the block to which FROM belongs. (Bug#23797)
* test/src/chartab-tests.el: New test file.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Recognize
"bar (gnu);" as a declarator only when the construct is directly inside a
class (etc.) called "bar".
(c-directly-in-class-called-p): New function.
Also add display of point-min to the c-parse-state debugging output.
* lisp/progmodes/cc-engine.el (c-renarrow-state-cache): When the new
point is inside an old recorded brace pair, clear the cache.
(c-debug-parse-state): Output the value of point-min.
d1efbaf Fix documentation of completion functions
65c96cc Clarify documentation of 'font-lock-maximum-decoration'
2ad3d01 * doc/misc/cl.texi (Usage): Add some more details.
b49cb0a Fbackward_prefix_chars: stay within buffer bounds