Now on revision 114148. ------------------------------------------------------------ revno: 114148 fixes bug: http://debbugs.gnu.org/15275 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-09-05 21:38:45 -0400 message: * lisp/replace.el (replace-string): Doc fix re start/end. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-05 13:05:01 +0000 +++ lisp/ChangeLog 2013-09-06 01:38:45 +0000 @@ -1,3 +1,7 @@ +2013-09-06 Glenn Morris + + * replace.el (replace-string): Doc fix re start/end. (Bug#15275) + 2013-09-05 Dmitry Gutov * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish === modified file 'lisp/replace.el' --- lisp/replace.el 2013-08-05 18:05:46 +0000 +++ lisp/replace.el 2013-09-06 01:38:45 +0000 @@ -490,12 +490,13 @@ to be replaced will match a sequence of whitespace chars defined by the regexp in `search-whitespace-regexp'. -In Transient Mark mode, if the mark is active, operate on the contents -of the region. Otherwise, operate from point to the end of the buffer. - Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches surrounded by word boundaries. -Fourth and fifth arg START and END specify the region to operate on. + +Operates on the region between START and END (if both are nil, from point +to the end of the buffer). Interactively, if Transient Mark mode is +enabled and the mark is active, operates on the contents of the region; +otherwise from point to the end of the buffer. Use \\\\[next-history-element] \ to pull the last incremental search string to the minibuffer ------------------------------------------------------------ revno: 114147 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-09-05 20:25:20 +0400 message: Cache current header and mode line height for each window. * window.h (struct window): New fields mode_line_height and header_line_height. * window.c (make_window): Initialize them. * dispextern.h (CURRENT_MODE_LINE_HEIGHT) (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment. (current_mode_line_height, current_header_line_height): Remove declaration. * xdisp.c (current_mode_line_height, current_header_line_height): Remove. (pos_visible_p, init_xdisp): Adjust user. (redisplay_window): Invalidate mode_line_height and header_line_height if current and desired matrices do not agree. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-05 12:08:50 +0000 +++ src/ChangeLog 2013-09-05 16:25:20 +0000 @@ -1,5 +1,21 @@ 2013-09-05 Dmitry Antipov + Cache current header and mode line height for each window. + * window.h (struct window): New fields mode_line_height + and header_line_height. + * window.c (make_window): Initialize them. + * dispextern.h (CURRENT_MODE_LINE_HEIGHT) + (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment. + (current_mode_line_height, current_header_line_height): + Remove declaration. + * xdisp.c (current_mode_line_height, current_header_line_height): + Remove. + (pos_visible_p, init_xdisp): Adjust user. + (redisplay_window): Invalidate mode_line_height and + header_line_height if current and desired matrices do not agree. + +2013-09-05 Dmitry Antipov + * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER. * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-09-01 16:21:48 +0000 +++ src/dispextern.h 2013-09-05 16:25:20 +0000 @@ -1428,31 +1428,31 @@ #define CURRENT_MODE_LINE_FACE_ID(W) \ (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W))) -/* Return the current height of the mode line of window W. If not - known from current_mode_line_height, look at W's current glyph - matrix, or return a default based on the height of the font of the - face `mode-line'. */ - -#define CURRENT_MODE_LINE_HEIGHT(W) \ - (current_mode_line_height >= 0 \ - ? current_mode_line_height \ - : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ - ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ - : estimate_mode_line_height (XFRAME ((W)->frame), \ - CURRENT_MODE_LINE_FACE_ID (W)))) - -/* Return the current height of the header line of window W. If not - known from current_header_line_height, look at W's current glyph - matrix, or return an estimation based on the height of the font of - the face `header-line'. */ +/* Return the current height of the mode line of window W. If not known + from W->mode_line_height, look at W's current glyph matrix, or return + a default based on the height of the font of the face `mode-line'. */ + +#define CURRENT_MODE_LINE_HEIGHT(W) \ + (W->mode_line_height >= 0 \ + ? W->mode_line_height \ + : (W->mode_line_height \ + = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \ + ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \ + : estimate_mode_line_height \ + (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W))))) + +/* Return the current height of the header line of window W. If not known + from W->header_line_height, look at W's current glyph matrix, or return + an estimation based on the height of the font of the face `header-line'. */ #define CURRENT_HEADER_LINE_HEIGHT(W) \ - (current_header_line_height >= 0 \ - ? current_header_line_height \ - : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ - ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ - : estimate_mode_line_height (XFRAME ((W)->frame), \ - HEADER_LINE_FACE_ID))) + (W->header_line_height >= 0 \ + ? W->header_line_height \ + : (W->header_line_height \ + = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \ + ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \ + : estimate_mode_line_height \ + (XFRAME (W->frame), HEADER_LINE_FACE_ID)))) /* Return the height of the desired mode line of window W. */ @@ -3201,7 +3201,6 @@ extern Lisp_Object Qtool_bar; extern bool redisplaying_p; extern int help_echo_showing_p; -extern int current_mode_line_height, current_header_line_height; extern Lisp_Object help_echo_string, help_echo_window; extern Lisp_Object help_echo_object, previous_help_echo_string; extern ptrdiff_t help_echo_pos; === modified file 'src/window.c' --- src/window.c 2013-09-05 12:08:50 +0000 +++ src/window.c 2013-09-05 16:25:20 +0000 @@ -3419,6 +3419,7 @@ non-Lisp data, so do it only for slots which should not be zero. */ w->nrows_scale_factor = w->ncols_scale_factor = 1; w->left_fringe_width = w->right_fringe_width = -1; + w->mode_line_height = w->header_line_height = -1; w->phys_cursor_type = -1; w->phys_cursor_width = -1; w->scroll_bar_width = -1; === modified file 'src/window.h' --- src/window.h 2013-09-02 06:12:26 +0000 +++ src/window.h 2013-09-05 16:25:20 +0000 @@ -264,6 +264,12 @@ A value of -1 means use frame values. */ int scroll_bar_width; + /* Effective height of the mode line, or -1 if not known. */ + int mode_line_height; + + /* Effective height of the header line, or -1 if not known. */ + int header_line_height; + /* Z - the buffer position of the last glyph in the current matrix of W. Only valid if window_end_valid is nonzero. */ ptrdiff_t window_end_pos; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-05 12:08:50 +0000 +++ src/xdisp.c 2013-09-05 16:25:20 +0000 @@ -573,12 +573,6 @@ int help_echo_showing_p; -/* If >= 0, computed, exact values of mode-line and header-line height - to use in the macros CURRENT_MODE_LINE_HEIGHT and - CURRENT_HEADER_LINE_HEIGHT. */ - -int current_mode_line_height, current_header_line_height; - /* The maximum distance to look ahead for text properties. Values that are too small let us call compute_char_face and similar functions too often which is expensive. Values that are too large @@ -1349,12 +1343,12 @@ /* Compute exact mode line heights. */ if (WINDOW_WANTS_MODELINE_P (w)) - current_mode_line_height + w->mode_line_height = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), BVAR (current_buffer, mode_line_format)); if (WINDOW_WANTS_HEADER_LINE_P (w)) - current_header_line_height + w->header_line_height = display_mode_line (w, HEADER_LINE_FACE_ID, BVAR (current_buffer, header_line_format)); @@ -1647,8 +1641,6 @@ if (old_buffer) set_buffer_internal_1 (old_buffer); - current_header_line_height = current_mode_line_height = -1; - if (visible_p && w->hscroll > 0) *x -= window_hscroll_limited (w, WINDOW_XFRAME (w)) @@ -16107,6 +16099,7 @@ && CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w)) { fonts_changed_p = 1; + w->mode_line_height = -1; MATRIX_MODE_LINE_ROW (w->current_matrix)->height = DESIRED_MODE_LINE_HEIGHT (w); } @@ -16117,6 +16110,7 @@ && CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w)) { fonts_changed_p = 1; + w->header_line_height = -1; MATRIX_HEADER_LINE_ROW (w->current_matrix)->height = DESIRED_HEADER_LINE_HEIGHT (w); } @@ -29686,8 +29680,6 @@ void init_xdisp (void) { - current_header_line_height = current_mode_line_height = -1; - CHARPOS (this_line_start_pos) = 0; if (!noninteractive) ------------------------------------------------------------ revno: 114146 fixes bug: http://debbugs.gnu.org/15270 committer: Dmitry Gutov branch nick: trunk timestamp: Thu 2013-09-05 16:05:01 +0300 message: * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish keywords" below "here-doc beginnings". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-05 12:33:37 +0000 +++ lisp/ChangeLog 2013-09-05 13:05:01 +0000 @@ -1,3 +1,8 @@ +2013-09-05 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish + keywords" below "here-doc beginnings" (Bug#15270). + 2013-09-05 Stefan Monnier * subr.el (pop): Use `car-safe'. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-09-03 00:29:10 +0000 +++ lisp/progmodes/ruby-mode.el 2013-09-05 13:05:01 +0000 @@ -1862,11 +1862,11 @@ "using") 'symbols)) 1 'font-lock-builtin-face) - ;; Perl-ish keywords - "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" ;; here-doc beginnings `(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0)) 'font-lock-string-face)) + ;; Perl-ish keywords + "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" ;; variables `(,(concat ruby-font-lock-keyword-beg-re "\\_<\\(nil\\|self\\|true\\|false\\)\\>") ------------------------------------------------------------ revno: 114145 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-09-05 08:33:37 -0400 message: Add missing ChangeLog entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-05 03:46:34 +0000 +++ lisp/ChangeLog 2013-09-05 12:33:37 +0000 @@ -59,6 +59,30 @@ 2013-09-04 Stefan Monnier + * vc/vc-dispatcher.el (vc-run-delayed): New macro. + (vc-do-command, vc-set-async-update): + * vc/vc-mtn.el (vc-mtn-dir-status): + * vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files) + (vc-hg-pull, vc-hg-merge-branch): + * vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull) + (vc-git-merge-branch): + * vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status) + (vc-cvs-dir-status-files): + * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status) + (vc-bzr-dir-status-files): + * vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed. + * vc/vc-annotate.el: Use lexical-binding. + (vc-annotate-display-select, vc-annotate): Use vc-run-delayed. + (vc-sentinel-movepoint): Declare. + (vc-annotate): Don't use `goto-line'. + * vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...). + (vc-diff-internal, vc-log-internal-common): Use vc-run-delayed. + (vc-sentinel-movepoint): Declare. + * vc/vc-svn.el: Use lexical-binding. + (vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed. + * vc/vc-sccs.el: + * vc/vc-rcs.el: Use lexical-binding. + * autorevert.el (auto-revert-notify-handler): Explicitly ignore `deleted'. Don't drop errors silently. ------------------------------------------------------------ revno: 114144 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-09-05 16:08:50 +0400 message: * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER. * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-05 06:25:12 +0000 +++ src/ChangeLog 2013-09-05 12:08:50 +0000 @@ -1,5 +1,10 @@ 2013-09-05 Dmitry Antipov + * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER. + * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice. + +2013-09-05 Dmitry Antipov + Make --without-x compatible with --enable-gcc-warnings. * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM. * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap === modified file 'src/fontset.c' --- src/fontset.c 2013-09-01 09:59:19 +0000 +++ src/fontset.c 2013-09-05 12:08:50 +0000 @@ -39,17 +39,10 @@ #include "intervals.h" #include "fontset.h" #include "window.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ #include "termhooks.h" - #include "font.h" /* FONTSET === modified file 'src/window.c' --- src/window.c 2013-09-01 16:21:48 +0000 +++ src/window.c 2013-09-05 12:08:50 +0000 @@ -39,19 +39,12 @@ #include "blockinput.h" #include "intervals.h" #include "termhooks.h" /* For FRAME_TERMINAL. */ - -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif /* HAVE_X_WINDOWS */ -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ #ifdef MSDOS #include "msdos.h" #endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif Lisp_Object Qwindowp, Qwindow_live_p; static Lisp_Object Qwindow_valid_p; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-05 06:25:12 +0000 +++ src/xdisp.c 2013-09-05 12:08:50 +0000 @@ -299,19 +299,9 @@ #include "font.h" #include "fontset.h" #include "blockinput.h" - -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif -#ifdef USE_GTK -#include "gtkutil.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ #ifndef FRAME_X_OUTPUT #define FRAME_X_OUTPUT(f) ((f)->output_data.x) === modified file 'src/xfaces.c' --- src/xfaces.c 2013-09-05 06:25:12 +0000 +++ src/xfaces.c 2013-09-05 12:08:50 +0000 @@ -211,13 +211,10 @@ #include "frame.h" #include "termhooks.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" #ifdef USE_MOTIF #include #include #endif /* USE_MOTIF */ -#endif /* HAVE_X_WINDOWS */ #ifdef MSDOS #include "dosfns.h" ------------------------------------------------------------ revno: 114143 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-09-05 06:21:43 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2013-08-10 15:17:29 +0000 +++ lisp/dired.el 2013-09-05 10:21:43 +0000 @@ -4352,7 +4352,7 @@ ;;;*** -;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c") +;;;### (autoloads nil "dired-x" "dired-x.el" "130484d4c94bb9929c210774f9e475f5") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ ------------------------------------------------------------ revno: 114142 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-09-05 06:17:39 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-09-02 10:17:37 +0000 +++ autogen/configure 2013-09-05 10:17:39 +0000 @@ -10340,6 +10340,118 @@ ## $window_system is now set to the window system we will ## ultimately use. +if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then + # Too many warnings for now. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5 +$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; } +if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_unused_variable=yes +else + gl_cv_warn_c__Wno_unused_variable=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5 +$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; } +if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-unused-variable" +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5 +$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; } +if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_unused_but_set_variable=yes +else + gl_cv_warn_c__Wno_unused_but_set_variable=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5 +$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; } +if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable" +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5 +$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; } +if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_unused_but_set_parameter=yes +else + gl_cv_warn_c__Wno_unused_but_set_parameter=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5 +$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; } +if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter" +fi + + +fi + term_header= HAVE_X_WINDOWS=no HAVE_X11=no ------------------------------------------------------------ revno: 114141 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-09-05 10:25:12 +0400 message: Make --without-x compatible with --enable-gcc-warnings. * configure.ac: If both --without-x and --enable-gcc-warnings are specified, use -Wno-unused-variable, -Wno-unused-but-set-variable and -Wno-unused-but-set-parameter. * src/font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM. * src/font.h (struct font_driver): Move draw, get_bitmap and free_bitmap members under HAVE_WINDOW_SYSTEM. * src/keyboard.c (make_lispy_focus_out): Likewise. (record_menu_key): Move under HAVE_MENUS. * src/xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM. (syms_of_xdisp): Adjust user. (window_box_edges): Define only if HAVE_WINDOW_SYSTEM. (start_hourglass, cancel_hourglass): * src/xfaces.c (toplevel): Likewise with PT_PER_INCH, clear_font_table_count, CLEAR_FONT_TABLE_COUNT and CLEAR_FONT_TABLE_NFONTS. (set_font_frame_param, clear_face_gcs, realize_non_ascii_face): Declare only if HAVE_WINDOW_SYSTEM. (lface_same_font_attributes_p, clear_face_gcs): Define only if HAVE_WINDOW_SYSTEM. diff: === modified file 'ChangeLog' --- ChangeLog 2013-09-04 06:45:44 +0000 +++ ChangeLog 2013-09-05 06:25:12 +0000 @@ -1,3 +1,10 @@ +2013-09-05 Dmitry Antipov + + Make --without-x compatible with --enable-gcc-warnings. + * configure.ac: If both --without-x and --enable-gcc-warnings are + specified, use -Wno-unused-variable, -Wno-unused-but-set-variable + and -Wno-unused-but-set-parameter. + 2013-09-04 Paul Eggert Makefile improvements. === modified file 'configure.ac' --- configure.ac 2013-09-02 07:01:53 +0000 +++ configure.ac 2013-09-05 06:25:12 +0000 @@ -1775,6 +1775,13 @@ ## $window_system is now set to the window system we will ## ultimately use. +if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then + # Too many warnings for now. + gl_WARN_ADD([-Wno-unused-variable]) + gl_WARN_ADD([-Wno-unused-but-set-variable]) + gl_WARN_ADD([-Wno-unused-but-set-parameter]) +fi + term_header= HAVE_X_WINDOWS=no HAVE_X11=no === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-05 03:51:37 +0000 +++ src/ChangeLog 2013-09-05 06:25:12 +0000 @@ -1,5 +1,26 @@ 2013-09-05 Dmitry Antipov + Make --without-x compatible with --enable-gcc-warnings. + * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM. + * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap + members under HAVE_WINDOW_SYSTEM. + * keyboard.c (make_lispy_focus_out): Likewise. + (record_menu_key): Move under HAVE_MENUS. + * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and + THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM. + (syms_of_xdisp): Adjust user. + (window_box_edges): Define only if HAVE_WINDOW_SYSTEM. + (start_hourglass, cancel_hourglass): + * xfaces.c (toplevel): Likewise with PT_PER_INCH, + clear_font_table_count, CLEAR_FONT_TABLE_COUNT + and CLEAR_FONT_TABLE_NFONTS. + (set_font_frame_param, clear_face_gcs, realize_non_ascii_face): + Declare only if HAVE_WINDOW_SYSTEM. + (lface_same_font_attributes_p, clear_face_gcs): Define only + if HAVE_WINDOW_SYSTEM. + +2013-09-05 Dmitry Antipov + * frame.c (check_minibuf_window): Update 'frame' with frame pointer. * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]: Don't pass C integer to XINT (tiny fix for 2013-09-03 change). === modified file 'src/font.c' --- src/font.c 2013-08-13 08:18:11 +0000 +++ src/font.c 2013-09-05 06:25:12 +0000 @@ -3379,9 +3379,11 @@ struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; struct font_driver_list *prev, *list; +#ifdef HAVE_WINDOW_SYSTEM if (f && ! driver->draw) error ("Unusable font driver for a frame: %s", SDATA (SYMBOL_NAME (driver->type))); +#endif /* HAVE_WINDOW_SYSTEM */ for (prev = NULL, list = root; list; prev = list, list = list->next) if (EQ (list->driver->type, driver->type)) === modified file 'src/font.h' --- src/font.h 2013-08-30 12:17:44 +0000 +++ src/font.h 2013-09-05 06:25:12 +0000 @@ -575,6 +575,8 @@ unsigned *code, int nglyphs, struct font_metrics *metrics); +#ifdef HAVE_WINDOW_SYSTEM + /* Optional. Draw glyphs between FROM and TO of S->char2b at (X Y) pixel position of frame F with S->FACE and S->GC. If WITH_BACKGROUND, @@ -595,6 +597,8 @@ Free bitmap data in BITMAP. */ void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap); +#endif /* HAVE_WINDOW_SYSTEM */ + /* Optional. Return an outline data for glyph-code CODE of FONT. The format of the outline data depends on the font-driver. */ === modified file 'src/keyboard.c' --- src/keyboard.c 2013-09-04 20:32:22 +0000 +++ src/keyboard.c 2013-09-05 06:25:12 +0000 @@ -422,7 +422,9 @@ Lisp_Object *, ptrdiff_t); static Lisp_Object make_lispy_switch_frame (Lisp_Object); static Lisp_Object make_lispy_focus_in (Lisp_Object); +#ifdef HAVE_WINDOW_SYSTEM static Lisp_Object make_lispy_focus_out (Lisp_Object); +#endif /* HAVE_WINDOW_SYSTEM */ static bool help_char_p (Lisp_Object); static void save_getcjmp (sys_jmp_buf); static void restore_getcjmp (sys_jmp_buf); @@ -3210,6 +3212,8 @@ RETURN_UNGCPRO (c); } +#ifdef HAVE_MENUS + /* Record a key that came from a mouse menu. Record it for echoing, for this-command-keys, and so on. */ @@ -3245,6 +3249,8 @@ num_input_events++; } +#endif /* HAVE_MENUS */ + /* Return true if should recognize C as "the help character". */ static bool @@ -6069,12 +6075,17 @@ { return list2 (Qfocus_in, frame); } + +#ifdef HAVE_WINDOW_SYSTEM + static Lisp_Object make_lispy_focus_out (Lisp_Object frame) { return list2 (Qfocus_out, frame); } - + +#endif /* HAVE_WINDOW_SYSTEM */ + /* Manipulating modifiers. */ /* Parse the name of SYMBOL, and return the set of modifiers it contains. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-01 16:21:48 +0000 +++ src/xdisp.c 2013-09-05 06:25:12 +0000 @@ -760,6 +760,8 @@ /* Platform-independent portion of hourglass implementation. */ +#ifdef HAVE_WINDOW_SYSTEM + /* Non-zero means an hourglass cursor is currently shown. */ int hourglass_shown_p; @@ -767,6 +769,8 @@ an hourglass cursor on all frames. */ struct atimer *hourglass_atimer; +#endif /* HAVE_WINDOW_SYSTEM */ + /* Name of the face used to display glyphless characters. */ Lisp_Object Qglyphless_char; @@ -776,14 +780,17 @@ /* Method symbols for Vglyphless_char_display. */ static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; -/* Default pixel width of `thin-space' display method. */ -#define THIN_SPACE_WIDTH 1 - /* Default number of seconds to wait before displaying an hourglass cursor. */ #define DEFAULT_HOURGLASS_DELAY 1 - +#ifdef HAVE_WINDOW_SYSTEM + +/* Default pixel width of `thin-space' display method. */ +#define THIN_SPACE_WIDTH 1 + +#endif /* HAVE_WINDOW_SYSTEM */ + /* Function prototypes. */ static void setup_for_ellipsis (struct it *, int); @@ -1145,6 +1152,7 @@ } } +#ifdef HAVE_WINDOW_SYSTEM /* Get the bounding box of the display area AREA of window W, without mode lines and both fringes of the window. Return in *TOP_LEFT_X @@ -1163,8 +1171,8 @@ *bottom_right_y += *top_left_y; } +#endif /* HAVE_WINDOW_SYSTEM */ - /*********************************************************************** Utilities ***********************************************************************/ @@ -29643,8 +29651,10 @@ doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */); Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); +#ifdef HAVE_WINDOW_SYSTEM hourglass_atimer = NULL; hourglass_shown_p = 0; +#endif /* HAVE_WINDOW_SYSTEM */ DEFSYM (Qglyphless_char, "glyphless-char"); DEFSYM (Qhex_code, "hex-code"); @@ -29731,13 +29741,14 @@ help_echo_showing_p = 0; } +#ifdef HAVE_WINDOW_SYSTEM + /* Platform-independent portion of hourglass implementation. */ /* Cancel a currently active hourglass timer, and start a new one. */ void start_hourglass (void) { -#if defined (HAVE_WINDOW_SYSTEM) struct timespec delay; cancel_hourglass (); @@ -29762,7 +29773,6 @@ hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, show_hourglass, NULL); -#endif } @@ -29771,7 +29781,6 @@ void cancel_hourglass (void) { -#if defined (HAVE_WINDOW_SYSTEM) if (hourglass_atimer) { cancel_atimer (hourglass_atimer); @@ -29780,5 +29789,6 @@ if (hourglass_shown_p) hide_hourglass (); -#endif } + +#endif /* HAVE_WINDOW_SYSTEM */ === modified file 'src/xfaces.c' --- src/xfaces.c 2013-08-26 21:31:50 +0000 +++ src/xfaces.c 2013-09-05 06:25:12 +0000 @@ -238,6 +238,11 @@ #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO #define GCGraphicsExposures 0 #endif /* HAVE_NS */ + +/* Number of pt per inch (from the TeXbook). */ + +#define PT_PER_INCH 72.27 + #endif /* HAVE_WINDOW_SYSTEM */ #include "buffer.h" @@ -272,10 +277,6 @@ #include -/* Number of pt per inch (from the TeXbook). */ - -#define PT_PER_INCH 72.27 - /* Non-zero if face attribute ATTR is unspecified. */ #define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified) @@ -396,6 +397,8 @@ static Lisp_Object Qtty_color_alist; +#ifdef HAVE_WINDOW_SYSTEM + /* Counter for calls to clear_face_cache. If this counter reaches CLEAR_FONT_TABLE_COUNT, and a frame has more than CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed. */ @@ -404,6 +407,8 @@ #define CLEAR_FONT_TABLE_COUNT 100 #define CLEAR_FONT_TABLE_NFONTS 10 +#endif /* HAVE_WINDOW_SYSTEM */ + /* Non-zero means face attributes have been changed since the last redisplay. Used in redisplay_internal. */ @@ -434,29 +439,27 @@ static int menu_face_changed_default; - -/* Function prototypes. */ - -struct table_entry; struct named_merge_point; -static void set_font_frame_param (Lisp_Object, Lisp_Object); static struct face *realize_face (struct face_cache *, Lisp_Object *, int); -static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, - struct face *); static struct face *realize_x_face (struct face_cache *, Lisp_Object *); static struct face *realize_tty_face (struct face_cache *, Lisp_Object *); static bool realize_basic_faces (struct frame *); static bool realize_default_face (struct frame *); static void realize_named_face (struct frame *, Lisp_Object, int); static struct face_cache *make_face_cache (struct frame *); -static void clear_face_gcs (struct face_cache *); static void free_face_cache (struct face_cache *); static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *, int, struct named_merge_point *); - +#ifdef HAVE_WINDOW_SYSTEM +static void set_font_frame_param (Lisp_Object, Lisp_Object); +static void clear_face_gcs (struct face_cache *); +static struct face *realize_non_ascii_face (struct frame *, Lisp_Object, + struct face *); +#endif /* HAVE_WINDOW_SYSTEM */ + /*********************************************************************** Utilities ***********************************************************************/ @@ -3983,6 +3986,7 @@ ^ XHASH (v[LFACE_HEIGHT_INDEX])); } +#ifdef HAVE_WINDOW_SYSTEM /* Return non-zero if LFACE1 and LFACE2 specify the same font (without considering charsets/registries). They do if they specify the same @@ -4011,8 +4015,8 @@ ); } +#endif /* HAVE_WINDOW_SYSTEM */ - /*********************************************************************** Realized Faces ***********************************************************************/ @@ -4171,6 +4175,7 @@ return c; } +#ifdef HAVE_WINDOW_SYSTEM /* Clear out all graphics contexts for all realized faces, except for the basic faces. This should be done from time to time just to avoid @@ -4181,7 +4186,6 @@ { if (c && FRAME_WINDOW_P (c->f)) { -#ifdef HAVE_WINDOW_SYSTEM int i; for (i = BASIC_FACE_ID_SENTINEL; i < c->used; ++i) { @@ -4196,10 +4200,10 @@ unblock_input (); } } -#endif /* HAVE_WINDOW_SYSTEM */ } } +#endif /* HAVE_WINDOW_SYSTEM */ /* Free all realized faces in face cache C, including basic faces. C may be null. If faces are freed, make sure the frame's current