Now on revision 114019. ------------------------------------------------------------ revno: 114019 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-08-26 23:58:08 -0700 message: * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) (maintainer-clean, check-declare): Remove pointless subshells. Check cd return value. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-26 22:17:31 +0000 +++ ChangeLog 2013-08-27 06:58:08 +0000 @@ -1,3 +1,9 @@ +2013-08-27 Glenn Morris + + * Makefile.in (mostlyclean, clean, distclean, bootstrap-clean) + (maintainer-clean, check-declare): Remove pointless subshells. + Check cd return value. + 2013-08-26 Paul Eggert Minor merge from gnulib (mostly just for texinfo.tex). === modified file 'Makefile.in' --- Makefile.in 2013-08-20 08:30:24 +0000 +++ Makefile.in 2013-08-27 06:58:08 +0000 @@ -797,17 +797,17 @@ ### target for GCC does not delete `libgcc.a', because recompiling it ### is rarely necessary and takes a lot of time. mostlyclean: FRC - (cd src; $(MAKE) $(MFLAGS) mostlyclean) - (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean) - (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean) - (cd lib; $(MAKE) $(MFLAGS) mostlyclean) - (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean) - (cd nt; $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean) - (cd leim; $(MAKE) $(MFLAGS) mostlyclean) + cd src && $(MAKE) $(MFLAGS) mostlyclean + cd oldXMenu && $(MAKE) $(MFLAGS) mostlyclean + cd lwlib && $(MAKE) $(MFLAGS) mostlyclean + cd lib && $(MAKE) $(MFLAGS) mostlyclean + cd lib-src && $(MAKE) $(MFLAGS) mostlyclean + cd nt && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean + -cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean + cd leim && $(MAKE) $(MFLAGS) mostlyclean ### `clean' ### Delete all files from the current directory that are normally @@ -819,18 +819,18 @@ ### Delete `.dvi' files here if they are not part of the distribution. clean: FRC -rm -f etc/emacs.tmpdesktop - (cd src; $(MAKE) $(MFLAGS) clean) - (cd oldXMenu; $(MAKE) $(MFLAGS) clean) - (cd lwlib; $(MAKE) $(MFLAGS) clean) - (cd lib; $(MAKE) $(MFLAGS) clean) - (cd lib-src; $(MAKE) $(MFLAGS) clean) - (cd nt; $(MAKE) $(MFLAGS) clean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) clean) - -(cd doc/misc && $(MAKE) $(MFLAGS) clean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) clean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean) - (cd leim; $(MAKE) $(MFLAGS) clean) - (cd nextstep && $(MAKE) $(MFLAGS) clean) + cd src && $(MAKE) $(MFLAGS) clean + cd oldXMenu && $(MAKE) $(MFLAGS) clean + cd lwlib && $(MAKE) $(MFLAGS) clean + cd lib && $(MAKE) $(MFLAGS) clean + cd lib-src && $(MAKE) $(MFLAGS) clean + cd nt && $(MAKE) $(MFLAGS) clean + -cd doc/emacs && $(MAKE) $(MFLAGS) clean + -cd doc/misc && $(MAKE) $(MFLAGS) clean + -cd doc/lispref && $(MAKE) $(MFLAGS) clean + -cd doc/lispintro && $(MAKE) $(MFLAGS) clean + cd leim && $(MAKE) $(MFLAGS) clean + cd nextstep && $(MAKE) $(MFLAGS) clean ### `bootclean' ### Delete all files that need to be remade for a clean bootstrap. @@ -846,19 +846,19 @@ ${top_bootclean}; \ rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES} distclean: FRC - (cd src; $(MAKE) $(MFLAGS) distclean) - (cd oldXMenu; $(MAKE) $(MFLAGS) distclean) - (cd lwlib; $(MAKE) $(MFLAGS) distclean) - (cd lib; $(MAKE) $(MFLAGS) distclean) - (cd lib-src; $(MAKE) $(MFLAGS) distclean) - (cd nt; $(MAKE) $(MFLAGS) distclean) - (cd doc/emacs && $(MAKE) $(MFLAGS) distclean) - (cd doc/misc && $(MAKE) $(MFLAGS) distclean) - (cd doc/lispref && $(MAKE) $(MFLAGS) distclean) - (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean) - (cd leim; $(MAKE) $(MFLAGS) distclean) - (cd lisp; $(MAKE) $(MFLAGS) distclean) - (cd nextstep && $(MAKE) $(MFLAGS) distclean) + cd src && $(MAKE) $(MFLAGS) distclean + cd oldXMenu && $(MAKE) $(MFLAGS) distclean + cd lwlib && $(MAKE) $(MFLAGS) distclean + cd lib && $(MAKE) $(MFLAGS) distclean + cd lib-src && $(MAKE) $(MFLAGS) distclean + cd nt && $(MAKE) $(MFLAGS) distclean + cd doc/emacs && $(MAKE) $(MFLAGS) distclean + cd doc/misc && $(MAKE) $(MFLAGS) distclean + cd doc/lispref && $(MAKE) $(MFLAGS) distclean + cd doc/lispintro && $(MAKE) $(MFLAGS) distclean + cd leim && $(MAKE) $(MFLAGS) distclean + cd lisp && $(MAKE) $(MFLAGS) distclean + cd nextstep && $(MAKE) $(MFLAGS) distclean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) distclean; \ } @@ -868,19 +868,19 @@ ### Delete everything that can be reconstructed by `make' and that ### needs to be deleted in order to force a bootstrap from a clean state. bootstrap-clean: FRC - (cd src; $(MAKE) $(MFLAGS) bootstrap-clean) - (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lib; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean) - (cd nt; $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean) - -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean) - (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) - (cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean) + cd src && $(MAKE) $(MFLAGS) bootstrap-clean + cd oldXMenu && $(MAKE) $(MFLAGS) maintainer-clean + cd lwlib && $(MAKE) $(MFLAGS) maintainer-clean + cd lib && $(MAKE) $(MFLAGS) maintainer-clean + cd lib-src && $(MAKE) $(MFLAGS) maintainer-clean + cd nt && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean + -cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean + cd leim && $(MAKE) $(MFLAGS) maintainer-clean + cd lisp && $(MAKE) $(MFLAGS) bootstrap-clean + cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) bootstrap-clean; \ } @@ -902,8 +902,8 @@ ${top_distclean}; \ rm -fr autom4te.cache maintainer-clean: bootstrap-clean FRC - (cd src; $(MAKE) $(MFLAGS) maintainer-clean) - (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) + cd src && $(MAKE) $(MFLAGS) maintainer-clean + cd lisp && $(MAKE) $(MFLAGS) maintainer-clean [ ! -d test/automated ] || { \ cd test/automated && $(MAKE) $(MFLAGS) maintainer-clean; \ } @@ -1067,5 +1067,5 @@ echo "You must build Emacs to use this command"; \ exit 1; \ fi - (cd leim; $(MAKE) $(MFLAGS) $@) - (cd lisp; $(MAKE) $(MFLAGS) $@) + cd leim && $(MAKE) $(MFLAGS) $@ + cd lisp && $(MAKE) $(MFLAGS) $@ ------------------------------------------------------------ revno: 114018 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-27 08:23:54 +0400 message: * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:) * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE): Remove the leftovers. * gtkutil.c (toplevel): Do not declare Qxft but include font.h to do so. * image.c (toplevel): Do not declare Vlibrary_cache because it's already done in lisp.h. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-27 03:52:21 +0000 +++ src/ChangeLog 2013-08-27 04:23:54 +0000 @@ -1,5 +1,15 @@ 2013-08-27 Dmitry Antipov + * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:) + * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE): + Remove the leftovers. + * gtkutil.c (toplevel): Do not declare Qxft but include + font.h to do so. + * image.c (toplevel): Do not declare Vlibrary_cache because + it's already done in lisp.h. + +2013-08-27 Dmitry Antipov + * lisp.h (Mouse_HLInfo): Move from here... * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h. (reset_mouse_highlight): New function. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-08-26 15:44:56 +0000 +++ src/gtkutil.c 2013-08-27 04:23:54 +0000 @@ -35,6 +35,8 @@ #include "keyboard.h" #include "charset.h" #include "coding.h" +#include "font.h" + #include #include "xsettings.h" @@ -2050,7 +2052,6 @@ static char *x_last_font_name; -extern Lisp_Object Qxft; /* Pop up a GTK font selector and return the name of the font the user selects, as a C string. The returned font name follows GTK's own === modified file 'src/image.c' --- src/image.c 2013-08-26 21:31:50 +0000 +++ src/image.c 2013-08-27 04:23:54 +0000 @@ -563,7 +563,6 @@ static void x_build_heuristic_mask (struct frame *, struct image *, Lisp_Object); #ifdef WINDOWSNT -extern Lisp_Object Vlibrary_cache; #define CACHE_IMAGE_TYPE(type, status) \ do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) #else === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-26 21:31:50 +0000 +++ src/nsterm.h 2013-08-27 04:23:54 +0000 @@ -752,8 +752,6 @@ (FRAME_NS_DISPLAY_INFO (f)->smallest_char_width) #define FRAME_SMALLEST_FONT_HEIGHT(f) \ (FRAME_NS_DISPLAY_INFO (f)->smallest_font_height) -#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 -#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset) #define BLACK_PIX_DEFAULT(f) 0x000000 #define WHITE_PIX_DEFAULT(f) 0xFFFFFF === modified file 'src/xterm.h' --- src/xterm.h 2013-08-27 03:52:21 +0000 +++ src/xterm.h 2013-08-27 04:23:54 +0000 @@ -1078,10 +1078,6 @@ #define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT(f)->explicit_parent != 0) - -#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 -#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 - #define STORE_XCHAR2B(chp, b1, b2) \ ((chp)->byte1 = (b1), (chp)->byte2 = (b2)) @@ -1091,7 +1087,6 @@ #define XCHAR2B_BYTE2(chp) \ ((chp)->byte2) - #define STORE_NATIVE_RECT(nr,rx,ry,rwidth,rheight) \ ((nr).x = (rx), \ (nr).y = (ry), \ ------------------------------------------------------------ revno: 114017 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-08-27 07:52:21 +0400 message: * lisp.h (Mouse_HLInfo): Move from here... * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h. (reset_mouse_highlight): New function. * msdos.c (dos_set_window_size, IT_update_begin) (internal_terminal_init): * nsterm.m (ns_update_window_end, x_free_frame_resources) (ns_initialize_display_info): * w32console.c (initialize_w32_display): * w32term.c (x_update_window_end, x_free_frame_resources) (w32_initialize_display_info): * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init): * window.c (Fdelete_other_windows_internal): * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it. * termchar.h (toplevel): * xterm.h (toplevel): Include dispextern.h. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 21:31:50 +0000 +++ src/ChangeLog 2013-08-27 03:52:21 +0000 @@ -1,3 +1,21 @@ +2013-08-27 Dmitry Antipov + + * lisp.h (Mouse_HLInfo): Move from here... + * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h. + (reset_mouse_highlight): New function. + * msdos.c (dos_set_window_size, IT_update_begin) + (internal_terminal_init): + * nsterm.m (ns_update_window_end, x_free_frame_resources) + (ns_initialize_display_info): + * w32console.c (initialize_w32_display): + * w32term.c (x_update_window_end, x_free_frame_resources) + (w32_initialize_display_info): + * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init): + * window.c (Fdelete_other_windows_internal): + * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it. + * termchar.h (toplevel): + * xterm.h (toplevel): Include dispextern.h. + 2013-08-26 Paul Eggert Fix minor problems found by static checking. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-08-23 04:03:25 +0000 +++ src/dispextern.h 2013-08-27 03:52:21 +0000 @@ -2667,8 +2667,57 @@ MOVE_TO_POS = 0x08 }; - - +/*********************************************************************** + Mouse Highlight + ***********************************************************************/ + +/* Structure to hold mouse highlight data. */ + +typedef struct { + /* These variables describe the range of text currently shown in its + mouse-face, together with the window they apply to. As long as + the mouse stays within this range, we need not redraw anything on + its account. Rows and columns are glyph matrix positions in + MOUSE_FACE_WINDOW. */ + int mouse_face_beg_row, mouse_face_beg_col, mouse_face_beg_x; + int mouse_face_end_row, mouse_face_end_col, mouse_face_end_x; + Lisp_Object mouse_face_window; + int mouse_face_face_id; + Lisp_Object mouse_face_overlay; + + /* FRAME and X, Y position of mouse when last checked for + highlighting. X and Y can be negative or out of range for the frame. */ + struct frame *mouse_face_mouse_frame; + int mouse_face_mouse_x, mouse_face_mouse_y; + + /* Nonzero if part of the text currently shown in + its mouse-face is beyond the window end. */ + unsigned mouse_face_past_end : 1; + + /* Nonzero means defer mouse-motion highlighting. */ + unsigned mouse_face_defer : 1; + + /* Nonzero means that the mouse highlight should not be shown. */ + unsigned mouse_face_hidden : 1; +} Mouse_HLInfo; + +DISPEXTERN_INLINE void +reset_mouse_highlight (Mouse_HLInfo *hlinfo) +{ + + hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; + hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; + hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0; + hlinfo->mouse_face_beg_x = hlinfo->mouse_face_end_x = 0; + hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; + hlinfo->mouse_face_mouse_frame = NULL; + hlinfo->mouse_face_window = Qnil; + hlinfo->mouse_face_overlay = Qnil; + hlinfo->mouse_face_past_end = 0; + hlinfo->mouse_face_hidden = 0; + hlinfo->mouse_face_defer = 0; +} + /*********************************************************************** Window-based redisplay interface ***********************************************************************/ === modified file 'src/lisp.h' --- src/lisp.h 2013-08-26 14:00:55 +0000 +++ src/lisp.h 2013-08-27 03:52:21 +0000 @@ -2164,36 +2164,6 @@ CHARACTERBITS = 22 }; -/* Structure to hold mouse highlight data. This is here because other - header files need it for defining struct x_output etc. */ -typedef struct { - /* These variables describe the range of text currently shown in its - mouse-face, together with the window they apply to. As long as - the mouse stays within this range, we need not redraw anything on - its account. Rows and columns are glyph matrix positions in - MOUSE_FACE_WINDOW. */ - int mouse_face_beg_row, mouse_face_beg_col, mouse_face_beg_x; - int mouse_face_end_row, mouse_face_end_col, mouse_face_end_x; - Lisp_Object mouse_face_window; - int mouse_face_face_id; - Lisp_Object mouse_face_overlay; - - /* FRAME and X, Y position of mouse when last checked for - highlighting. X and Y can be negative or out of range for the frame. */ - struct frame *mouse_face_mouse_frame; - int mouse_face_mouse_x, mouse_face_mouse_y; - - /* Nonzero if part of the text currently shown in - its mouse-face is beyond the window end. */ - unsigned mouse_face_past_end : 1; - - /* Nonzero means defer mouse-motion highlighting. */ - unsigned mouse_face_defer : 1; - - /* Nonzero means that the mouse highlight should not be shown. */ - unsigned mouse_face_hidden : 1; -} Mouse_HLInfo; - /* Data type checking. */ LISP_MACRO_DEFUN (NILP, bool, (Lisp_Object x), (x)) === modified file 'src/msdos.c' --- src/msdos.c 2013-08-03 03:29:03 +0000 +++ src/msdos.c 2013-08-27 03:52:21 +0000 @@ -602,11 +602,7 @@ Lisp_Object window = hlinfo->mouse_face_window; if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (hlinfo); } /* Enable bright background colors. */ @@ -1276,14 +1272,9 @@ } } else if (mouse_face_frame && !FRAME_LIVE_P (mouse_face_frame)) - { - /* If the frame with mouse highlight was deleted, invalidate the - highlight info. */ - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_mouse_frame = NULL; - } + /* If the frame with mouse highlight was deleted, invalidate the + highlight info. */ + reset_mouse_highlight (hlinfo); unblock_input (); } @@ -1843,17 +1834,8 @@ if (colors[1] >= 0 && colors[1] < 16) FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()) = colors[1]; } - the_only_display_info.mouse_highlight.mouse_face_mouse_frame = NULL; - the_only_display_info.mouse_highlight.mouse_face_beg_row = - the_only_display_info.mouse_highlight.mouse_face_beg_col = -1; - the_only_display_info.mouse_highlight.mouse_face_end_row = - the_only_display_info.mouse_highlight.mouse_face_end_col = -1; - the_only_display_info.mouse_highlight.mouse_face_face_id = DEFAULT_FACE_ID; - the_only_display_info.mouse_highlight.mouse_face_window = Qnil; - the_only_display_info.mouse_highlight.mouse_face_mouse_x = - the_only_display_info.mouse_highlight.mouse_face_mouse_y = 0; - the_only_display_info.mouse_highlight.mouse_face_defer = 0; - the_only_display_info.mouse_highlight.mouse_face_hidden = 0; + + reset_mouse_highlight (&the_only_display_info.mouse_highlight); if (have_mouse) /* detected in dos_ttraw, which see */ { === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-26 21:31:50 +0000 +++ src/nsterm.m 2013-08-27 03:52:21 +0000 @@ -749,8 +749,6 @@ external (RIF) call; for one window called before update_end -------------------------------------------------------------------------- */ { - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); - /* note: this fn is nearly identical in all terms */ if (!w->pseudo_window_p) { @@ -770,11 +768,7 @@ /* If a row with mouse-face was overwritten, arrange for frame_up_to_date to redisplay the mouse highlight. */ if (mouse_face_overwritten_p) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (MOUSE_HL_INFO (XFRAME (w->frame))); NSTRACE (update_window_end); } @@ -1183,12 +1177,7 @@ if (f == dpyinfo->x_highlight_frame) dpyinfo->x_highlight_frame = 0; if (f == hlinfo->mouse_face_mouse_frame) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_mouse_frame = 0; - } + reset_mouse_highlight (hlinfo); if (f->output_data.ns->miniimage != nil) [f->output_data.ns->miniimage release]; @@ -3951,7 +3940,6 @@ { NSScreen *screen = [NSScreen mainScreen]; NSWindowDepth depth = [screen depth]; - Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; dpyinfo->resx = 72.27; /* used 75.0, but this makes pt == pixel, expected */ dpyinfo->resy = 72.27; @@ -3964,22 +3952,12 @@ dpyinfo->color_table = xmalloc (sizeof *dpyinfo->color_table); dpyinfo->color_table->colors = NULL; dpyinfo->root_window = 42; /* a placeholder.. */ - - hlinfo->mouse_face_mouse_frame = NULL; - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; - hlinfo->mouse_face_window = hlinfo->mouse_face_overlay = Qnil; - hlinfo->mouse_face_hidden = 0; - - hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0; - hlinfo->mouse_face_defer = 0; - dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame = NULL; - dpyinfo->n_fonts = 0; dpyinfo->smallest_font_height = 1; dpyinfo->smallest_char_width = 1; + + reset_mouse_highlight (&dpyinfo->mouse_highlight); } === modified file 'src/termchar.h' --- src/termchar.h 2013-08-26 18:10:30 +0000 +++ src/termchar.h 2013-08-27 03:52:21 +0000 @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ +#include "dispextern.h" + /* Each termcap frame points to its own struct tty_output object in the output_data.tty field. The tty_output structure contains the information that is specific to termcap frames. */ === modified file 'src/w32console.c' --- src/w32console.c 2013-06-03 19:28:13 +0000 +++ src/w32console.c 2013-08-27 03:52:21 +0000 @@ -636,13 +636,7 @@ term->frame_up_to_date_hook = 0; /* Initialize the mouse-highlight data. */ - hlinfo = &term->display_info.tty->mouse_highlight; - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; - hlinfo->mouse_face_mouse_frame = NULL; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_hidden = 0; + reset_mouse_highlight (&term->display_info.tty->mouse_highlight); /* Initialize interrupt_handle. */ init_crit (); === modified file 'src/w32term.c' --- src/w32term.c 2013-08-23 04:03:25 +0000 +++ src/w32term.c 2013-08-27 03:52:21 +0000 @@ -678,8 +678,6 @@ x_update_window_end (struct window *w, bool cursor_on_p, bool mouse_face_overwritten_p) { - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); - if (!w->pseudo_window_p) { block_input (); @@ -698,11 +696,7 @@ /* If a row with mouse-face was overwritten, arrange for XTframe_up_to_date to redisplay the mouse highlight. */ if (mouse_face_overwritten_p) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (MOUSE_HL_INFO (XFRAME (w->frame))); /* Unhide the caret. This won't actually show the cursor, unless it was visible before the corresponding call to HideCaret in @@ -6156,16 +6150,8 @@ dpyinfo->w32_focus_event_frame = 0; if (f == dpyinfo->x_highlight_frame) dpyinfo->x_highlight_frame = 0; - if (f == hlinfo->mouse_face_mouse_frame) - { - hlinfo->mouse_face_beg_row - = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row - = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_mouse_frame = 0; - } + reset_mouse_highlight (hlinfo); unblock_input (); } @@ -6235,7 +6221,6 @@ w32_initialize_display_info (Lisp_Object display_name) { struct w32_display_info *dpyinfo = &one_w32_display_info; - Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; memset (dpyinfo, 0, sizeof (*dpyinfo)); @@ -6258,17 +6243,10 @@ dpyinfo->n_fonts = 0; dpyinfo->smallest_font_height = 1; dpyinfo->smallest_char_width = 1; - - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_overlay = Qnil; - hlinfo->mouse_face_hidden = 0; - dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); /* TODO: dpyinfo->gray */ + reset_mouse_highlight (&dpyinfo->mouse_highlight); } /* Create an xrdb-style database of resources to supersede registry settings. === modified file 'src/window.c' --- src/window.c 2013-08-26 09:33:37 +0000 +++ src/window.c 2013-08-27 03:52:21 +0000 @@ -2842,7 +2842,7 @@ block_input (); if (!FRAME_INITIAL_P (f)) { - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); + Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); /* We are going to free the glyph matrices of WINDOW, and with that we might lose any information about glyph rows that have @@ -2852,11 +2852,7 @@ frame's up-to-date hook that mouse highlight was overwritten, so that it will arrange for redisplaying the highlight. */ if (EQ (hlinfo->mouse_face_window, window)) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (hlinfo); } free_window_matrices (r); === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-26 14:00:55 +0000 +++ src/xdisp.c 2013-08-27 03:52:21 +0000 @@ -26795,10 +26795,7 @@ cleared = 1; } - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_overlay = Qnil; + reset_mouse_highlight (hlinfo); return cleared; } @@ -28586,11 +28583,7 @@ window = hlinfo->mouse_face_window; if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (hlinfo); } === modified file 'src/xterm.c' --- src/xterm.c 2013-08-23 04:03:25 +0000 +++ src/xterm.c 2013-08-27 03:52:21 +0000 @@ -613,8 +613,6 @@ x_update_window_end (struct window *w, bool cursor_on_p, bool mouse_face_overwritten_p) { - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); - if (!w->pseudo_window_p) { block_input (); @@ -633,11 +631,7 @@ /* If a row with mouse-face was overwritten, arrange for XTframe_up_to_date to redisplay the mouse highlight. */ if (mouse_face_overwritten_p) - { - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } + reset_mouse_highlight (MOUSE_HL_INFO (XFRAME (w->frame))); } @@ -9445,16 +9439,8 @@ dpyinfo->x_focus_event_frame = 0; if (f == dpyinfo->x_highlight_frame) dpyinfo->x_highlight_frame = 0; - if (f == hlinfo->mouse_face_mouse_frame) - { - hlinfo->mouse_face_beg_row - = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row - = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_mouse_frame = 0; - } + reset_mouse_highlight (hlinfo); unblock_input (); } @@ -9826,7 +9812,6 @@ struct terminal *terminal; struct x_display_info *dpyinfo; XrmDatabase xrdb; - Mouse_HLInfo *hlinfo; ptrdiff_t lim; block_input (); @@ -9967,8 +9952,6 @@ /* We have definitely succeeded. Record the new connection. */ dpyinfo = xzalloc (sizeof *dpyinfo); - hlinfo = &dpyinfo->mouse_highlight; - terminal = x_create_terminal (dpyinfo); { @@ -10082,13 +10065,10 @@ dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen); dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen); dpyinfo->icon_bitmap_id = -1; - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; - hlinfo->mouse_face_window = Qnil; - hlinfo->mouse_face_overlay = Qnil; dpyinfo->wm_type = X_WMTYPE_UNKNOWN; + reset_mouse_highlight (&dpyinfo->mouse_highlight); + /* See if we can construct pixel values from RGB values. */ if (dpyinfo->visual->class == TrueColor) { === modified file 'src/xterm.h' --- src/xterm.h 2013-08-13 15:29:25 +0000 +++ src/xterm.h 2013-08-27 03:52:21 +0000 @@ -20,6 +20,8 @@ #ifndef XTERM_H #define XTERM_H +#include "dispextern.h" + #include #include ------------------------------------------------------------ revno: 114016 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15161 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-08-26 22:41:41 -0400 message: * lisp/progmodes/python.el (python-font-lock-keywords): Don't return nil from a matcher-function unless there's no more matches. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-26 13:17:22 +0000 +++ lisp/ChangeLog 2013-08-27 02:41:41 +0000 @@ -1,3 +1,8 @@ +2013-08-27 Stefan Monnier + + * progmodes/python.el (python-font-lock-keywords): Don't return nil + from a matcher-function unless there's no more matches (bug#15161). + 2013-08-26 Michael Albinus * minibuffer.el: Revert change from 2013-08-20. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-08-16 05:15:51 +0000 +++ lisp/progmodes/python.el 2013-08-27 02:41:41 +0000 @@ -501,29 +501,24 @@ (,(lambda (limit) (let ((re (python-rx (group (+ (any word ?. ?_))) (? ?\[ (+ (not (any ?\]))) ?\]) (* space) - assignment-operator))) - (when (re-search-forward re limit t) - (while (and (python-syntax-context 'paren) - (re-search-forward re limit t))) - (if (not (or (python-syntax-context 'paren) - (equal (char-after (point-marker)) ?=))) - t - (set-match-data nil))))) + assignment-operator)) + (res nil)) + (while (and (setq res (re-search-forward re limit t)) + (or (python-syntax-context 'paren) + (equal (char-after (point-marker)) ?=)))) + res)) (1 font-lock-variable-name-face nil nil)) ;; support for a, b, c = (1, 2, 3) (,(lambda (limit) (let ((re (python-rx (group (+ (any word ?. ?_))) (* space) (* ?, (* space) (+ (any word ?. ?_)) (* space)) ?, (* space) (+ (any word ?. ?_)) (* space) - assignment-operator))) - (when (and (re-search-forward re limit t) - (goto-char (nth 3 (match-data)))) - (while (and (python-syntax-context 'paren) - (re-search-forward re limit t)) - (goto-char (nth 3 (match-data)))) - (if (not (python-syntax-context 'paren)) - t - (set-match-data nil))))) + assignment-operator)) + (res nil)) + (while (and (setq res (re-search-forward re limit t)) + (goto-char (match-end 1)) + (python-syntax-context 'paren))) + res)) (1 font-lock-variable-name-face nil nil)))) (defconst python-syntax-propertize-function ------------------------------------------------------------ revno: 114015 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-08-26 15:17:31 -0700 message: Minor merge from gnulib (mostly just for texinfo.tex). diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-22 17:35:00 +0000 +++ ChangeLog 2013-08-26 22:17:31 +0000 @@ -1,3 +1,7 @@ +2013-08-26 Paul Eggert + + Minor merge from gnulib (mostly just for texinfo.tex). + 2013-08-22 Paul Eggert * configure.ac (EMACS_CONFIG_OPTIONS): Quote systematically (Bug#13274). === modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2013-08-12 00:52:17 +0000 +++ doc/misc/texinfo.tex 2013-08-26 22:17:31 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2013-08-09.09} +\def\texinfoversion{2013-08-20.10} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -281,9 +281,9 @@ \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% - \the\toks0 \the\toks2 - \noexpand\or \the\toks4 \the\toks6 - \noexpand\else \the\toks8 + \the\toks0 \the\toks2 % 0: top marks (\last...) + \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) + \noexpand\else \the\toks8 % 2: color marks }% } % \topmark doesn't work for the very first chapter (after the title @@ -5909,7 +5909,7 @@ % % Now the second mark, after the heading break. No break points % between here and the heading. - \let\prevsectiondefs=\lastsectiondefs + \global\let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. === modified file 'm4/sha256.m4' --- m4/sha256.m4 2013-01-02 16:37:04 +0000 +++ m4/sha256.m4 2013-08-26 22:17:31 +0000 @@ -1,4 +1,4 @@ -# sha256.m4 serial 6 +# sha256.m4 serial 7 dnl Copyright (C) 2005, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,4 +8,5 @@ [ dnl Prerequisites of lib/sha256.c. AC_REQUIRE([gl_BIGENDIAN]) + : ]) === modified file 'm4/sha512.m4' --- m4/sha512.m4 2013-01-02 16:37:04 +0000 +++ m4/sha512.m4 2013-08-26 22:17:31 +0000 @@ -1,4 +1,4 @@ -# sha512.m4 serial 7 +# sha512.m4 serial 8 dnl Copyright (C) 2005-2006, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,4 +8,5 @@ [ dnl Prerequisites of lib/sha512.c. AC_REQUIRE([gl_BIGENDIAN]) + : ]) ------------------------------------------------------------ revno: 114014 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-08-26 14:31:50 -0700 message: Fix minor problems found by static checking. * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static. (expect): Avoid nested-if warning. (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning. * nsmenu.m (fillWithWidgetValue:): Avoid type warning. * nsterm.h, nsterm.m (ns_select): * xgselect.c, xgselect.h (xg_select): Adjust signature to better match pselect's. * nsterm.m (ns_select): Don't set *TIMEOUT, since pselect doesn't. * regex.c (whitespace_regexp): Now const_re_char *, to avoid diagnostic about assigning const char * to it. * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 20:33:21 +0000 +++ src/ChangeLog 2013-08-26 21:31:50 +0000 @@ -1,3 +1,19 @@ +2013-08-26 Paul Eggert + + Fix minor problems found by static checking. + * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static. + (expect): Avoid nested-if warning. + (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning. + * nsmenu.m (fillWithWidgetValue:): Avoid type warning. + * nsterm.h, nsterm.m (ns_select): + * xgselect.c, xgselect.h (xg_select): + Adjust signature to better match pselect's. + * nsterm.m (ns_select): + Don't set *TIMEOUT, since pselect doesn't. + * regex.c (whitespace_regexp): Now const_re_char *, to avoid + diagnostic about assigning const char * to it. + * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused. + 2013-08-26 Stefan Monnier * lread.c (substitute_object_recurse): Handle hash-tables as well === modified file 'src/image.c' --- src/image.c 2013-08-20 00:51:35 +0000 +++ src/image.c 2013-08-26 21:31:50 +0000 @@ -145,7 +145,7 @@ #ifdef HAVE_NS /* Use with images created by ns_image_for_XPM. */ -unsigned long +static unsigned long XGetPixel (XImagePtr ximage, int x, int y) { return ns_get_pixel (ximage, x, y); @@ -153,7 +153,7 @@ /* Use with images created by ns_image_for_XPM; alpha set to 1; pixel is assumed to be in RGB form. */ -void +static void XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) { ns_put_pixel (ximage, x, y, pixel); @@ -2713,10 +2713,13 @@ LA1 = xbm_scan (&s, end, buffer, &value) #define expect(TOKEN) \ - if (LA1 != (TOKEN)) \ - goto failure; \ - else \ - match () + do \ + { \ + if (LA1 != (TOKEN)) \ + goto failure; \ + match (); \ + } \ + while (0) #define expect_ident(IDENT) \ if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ @@ -3976,10 +3979,13 @@ LA1 = xpm_scan (&s, end, &beg, &len) #define expect(TOKEN) \ - if (LA1 != (TOKEN)) \ - goto failure; \ - else \ - match () + do \ + { \ + if (LA1 != (TOKEN)) \ + goto failure; \ + match (); \ + } \ + while (0) #define expect_ident(IDENT) \ if (LA1 == XPM_TK_IDENT \ @@ -4932,7 +4938,7 @@ int row_width; #endif /* HAVE_NTGUI */ int x, y; - bool rc, use_img_background; + bool use_img_background; unsigned long bg = 0; if (img->mask) @@ -4941,9 +4947,8 @@ #ifndef HAVE_NTGUI #ifndef HAVE_NS /* Create an image and pixmap serving as mask. */ - rc = image_create_x_image_and_pixmap (f, img, img->width, img->height, 1, - &mask_img, 1); - if (!rc) + if (! image_create_x_image_and_pixmap (f, img, img->width, img->height, 1, + &mask_img, 1)) return; #endif /* !HAVE_NS */ #else === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-08-15 17:36:45 +0000 +++ src/nsmenu.m 2013-08-26 21:31:50 +0000 @@ -730,7 +730,7 @@ - (void)fillWithWidgetValue: (void *)wvptr { - [self fillWithWidgetValue: wvptr frame:nil]; + [self fillWithWidgetValue: wvptr frame: (struct frame *)nil]; } - (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-13 15:39:14 +0000 +++ src/nsterm.h 2013-08-26 21:31:50 +0000 @@ -874,8 +874,8 @@ /* This in nsterm.m */ extern void x_destroy_window (struct frame *f); extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, EMACS_TIME *timeout, - sigset_t *sigmask); + fd_set *exceptfds, EMACS_TIME const *timeout, + sigset_t const *sigmask); extern unsigned long ns_get_rgb_color (struct frame *f, float r, float g, float b, float a); extern NSPoint last_mouse_motion_position; === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-23 04:03:25 +0000 +++ src/nsterm.m 2013-08-26 21:31:50 +0000 @@ -3540,7 +3540,8 @@ int ns_select (int nfds, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, EMACS_TIME *timeout, sigset_t *sigmask) + fd_set *exceptfds, EMACS_TIME const *timeout, + sigset_t const *sigmask) /* -------------------------------------------------------------------------- Replacement for select, checking for events -------------------------------------------------------------------------- */ @@ -3666,7 +3667,6 @@ pthread_mutex_lock (&select_mutex); if (readfds) *readfds = select_readfds; if (writefds) *writefds = select_writefds; - if (timeout) *timeout = select_timeout; pthread_mutex_unlock (&select_mutex); result = t; } === modified file 'src/regex.c' --- src/regex.c 2013-08-11 01:30:20 +0000 +++ src/regex.c 2013-08-26 21:31:50 +0000 @@ -1238,12 +1238,12 @@ WEAK_ALIAS (__re_set_syntax, re_set_syntax) /* Regexp to use to replace spaces, or NULL meaning don't. */ -static re_char *whitespace_regexp; +static const_re_char *whitespace_regexp; void re_set_whitespace_regexp (const char *regexp) { - whitespace_regexp = (re_char *) regexp; + whitespace_regexp = (const_re_char *) regexp; } WEAK_ALIAS (__re_set_syntax, re_set_syntax) === modified file 'src/xfaces.c' --- src/xfaces.c 2013-08-13 08:18:11 +0000 +++ src/xfaces.c 2013-08-26 21:31:50 +0000 @@ -236,7 +236,6 @@ #ifdef HAVE_NS #undef FRAME_X_DISPLAY_INFO #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO -#define x_display_info ns_display_info #define GCGraphicsExposures 0 #endif /* HAVE_NS */ #endif /* HAVE_WINDOW_SYSTEM */ === modified file 'src/xgselect.c' --- src/xgselect.c 2013-06-08 18:13:24 +0000 +++ src/xgselect.c 2013-08-26 21:31:50 +0000 @@ -29,10 +29,11 @@ int xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout, sigset_t *sigmask) + EMACS_TIME const *timeout, sigset_t const *sigmask) { SELECT_TYPE all_rfds, all_wfds; - EMACS_TIME tmo, *tmop = timeout; + EMACS_TIME tmo; + EMACS_TIME const *tmop = timeout; GMainContext *context; int have_wfds = wfds != NULL; === modified file 'src/xgselect.h' --- src/xgselect.h 2013-01-01 09:11:05 +0000 +++ src/xgselect.h 2013-08-26 21:31:50 +0000 @@ -28,7 +28,7 @@ SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout, - sigset_t *sigmask); + EMACS_TIME const *timeout, + sigset_t const *sigmask); #endif /* XGSELECT_H */ ------------------------------------------------------------ revno: 114013 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15190 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-08-26 16:33:21 -0400 message: * src/lread.c (substitute_object_recurse): Handle hash-tables as well. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 18:10:30 +0000 +++ src/ChangeLog 2013-08-26 20:33:21 +0000 @@ -1,3 +1,8 @@ +2013-08-26 Stefan Monnier + + * lread.c (substitute_object_recurse): Handle hash-tables as well + (bug#15190). + 2013-08-26 Paul Eggert Fix unlikely core dump in init_tty, and simplify terminfo case. @@ -31,8 +36,8 @@ 2013-08-26 Martin Rudalics * frame.c (check_minibuf_window): New function. - (delete_frame, Fmake_frame_invisible, Ficonify_frame): Call - check_minibuf_window (Bug#15183). + (delete_frame, Fmake_frame_invisible, Ficonify_frame): + Call check_minibuf_window (Bug#15183). 2013-08-26 Dmitry Antipov @@ -44,8 +49,8 @@ 2013-08-26 Dmitry Antipov - Fix recovering from possible decompression error. Since - insert_from_gap doesn't always move point, we can't use PT as + Fix recovering from possible decompression error. + Since insert_from_gap doesn't always move point, we can't use PT as the position where the partially decompressed data ends, and should count how many bytes was produced so far. * decompress.c (struct decompress_unwind_data): Add nbytes member. @@ -314,8 +319,8 @@ 2013-08-15 Eli Zaretskii - * xdisp.c (compute_window_start_on_continuation_line): When - WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines + * xdisp.c (compute_window_start_on_continuation_line): + When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines to make sure we end up setting the window start at the leftmost visible character of the display line. This avoids funky horizontal shifting because the window start is not kept on the @@ -543,8 +548,8 @@ Remove. (make_window): Initialize new integer fields to -1. (Fsplit_window_internal): Use direct assignment. - (Fset_window_configuration, save_window_save): Convert - Lisp_Object to integer and back where appropriate. + (Fset_window_configuration, save_window_save): + Convert Lisp_Object to integer and back where appropriate. (Fset_window_fringes): Adjust user. Return t if any fringe was actually changed, and mention this in docstring. @@ -608,8 +613,8 @@ New macros. (Fdecompress_gzipped_region, unwind_decompress): Use the fn_* macros instead of invoking the zlib functions directly. - (syms_of_decompress): DEFSYM Qzlib_dll. Staticpro - Szlib_available_p. + (syms_of_decompress): DEFSYM Qzlib_dll. + Staticpro Szlib_available_p. 2013-08-12 Dmitry Antipov @@ -731,7 +736,7 @@ * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame: (initWithTitle:): Initialize frame to 0. (fillWithWidgetValue:): Call fillWithWidgetValue:frame. - (fillWithWidgetValue:frame:): Renamed from + (fillWithWidgetValue:frame:): Rename from fillWithWidgetValue:setDelegate, call initWithTile:frame: if f. * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to @@ -973,8 +978,8 @@ * indent.c (width_run_cache_on_off): Adjust users. * bidi.c (bidi_paragraph_cache_on_off): New function. (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed. - * insdel.c (prepare_to_modify_buffer): Invalidate - bidi_paragraph_cache if enabled. + * insdel.c (prepare_to_modify_buffer): + Invalidate bidi_paragraph_cache if enabled. 2013-08-06 Dmitry Antipov @@ -1145,8 +1150,8 @@ Avoid redundant Lisp_Object <-> struct frame conversions in font API. * font.h (struct font_driver): Change list, match, and list_family functions to accept struct frame * as first arg. - * font.c (font_score, font_compare, font_sort_entities): Remove - prototypes. + * font.c (font_score, font_compare, font_sort_entities): + Remove prototypes. (font_sort_entities, font_list_entities, font_select_entity): (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to match font API change. @@ -1453,9 +1458,9 @@ or fscanf fails. (system_process_attributes): Prefer plain char to unsigned char when either will do. Clean up properly if interrupted or if - memory allocations fail. Don't assume sscanf succeeds. Remove - no-longer-needed workaround to stop GCC from whining. Read - command-line once, instead of multiple times. Check read status a + memory allocations fail. Don't assume sscanf succeeds. + Remove no-longer-needed workaround to stop GCC from whining. + Read command-line once, instead of multiple times. Check read status a bit more carefully. Fix obscure porting bug with varargs functions. @@ -1809,8 +1814,8 @@ of the old Fcall_process_region. Use Fcopy_sequence to create the temp file name, rather than alloca + build_string, for simplicity. Don't bother to block input around the temp file creation; - shouldn't be needed. Simplify use of mktemp. Use - record_unwind_protect immediately after creating the temp file; + shouldn't be needed. Simplify use of mktemp. + Use record_unwind_protect immediately after creating the temp file; this closes an unlikely race where the temp file was not removed. Use memcpy rather than an open-coded loop. (Fcall_process_region): Use the new function. If the input is @@ -2169,8 +2174,8 @@ (try_cursor_movement, redisplay_window, try_window) (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771) - * window.c (window_scroll_pixel_based): use - default_line_pixel_height. + * window.c (window_scroll_pixel_based): + use default_line_pixel_height. * dispextern.h (default_line_pixel_height): Add prototype. === modified file 'src/lread.c' --- src/lread.c 2013-07-20 14:21:25 +0000 +++ src/lread.c 2013-08-26 20:33:21 +0000 @@ -3229,7 +3229,7 @@ if (BOOL_VECTOR_P (subtree)) return subtree; /* No sub-objects anyway. */ else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree) - || COMPILEDP (subtree)) + || COMPILEDP (subtree) || HASH_TABLE_P (subtree)) length = ASIZE (subtree) & PSEUDOVECTOR_SIZE_MASK; else if (VECTORP (subtree)) length = ASIZE (subtree); ------------------------------------------------------------ revno: 114012 author: Paul Eggert committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-08-26 11:10:30 -0700 message: Fix unlikely core dump in init_tty, and simplify terminfo case. * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun. The old version incorrectly dumped core if malloc returned a buffer containing only non-NUL bytes. (init_tty): Do not allocate or free termcap buffers; the struct does that for us now. * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant. (struct tty_display_info): Define members termcap_term_buffer and termcap_strings_buffer only if !TERMINFO, since terminfo doesn't use them. Allocate them directly in struct rather than indirectly via a pointer, to simplify init_tty. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 17:31:00 +0000 +++ src/ChangeLog 2013-08-26 18:10:30 +0000 @@ -1,5 +1,17 @@ 2013-08-26 Paul Eggert + Fix unlikely core dump in init_tty, and simplify terminfo case. + * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun. + The old version incorrectly dumped core if malloc returned a + buffer containing only non-NUL bytes. + (init_tty): Do not allocate or free termcap buffers; the + struct does that for us now. + * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant. + (struct tty_display_info): Define members termcap_term_buffer and + termcap_strings_buffer only if !TERMINFO, since terminfo doesn't + use them. Allocate them directly in struct rather than indirectly + via a pointer, to simplify init_tty. + * frame.c (check_minibuf_window): Initialize 'window' properly, so that Emacs reliably aborts later if 'window' is not initialized. === modified file 'src/term.c' --- src/term.c 2013-08-15 05:23:40 +0000 +++ src/term.c 2013-08-26 18:10:30 +0000 @@ -2934,9 +2934,12 @@ struct terminal * init_tty (const char *name, const char *terminal_type, bool must_succeed) { - char *area = NULL; +#ifdef TERMINFO + char **address = 0; +#else + char *area; char **address = &area; - int buffer_size = 4096; +#endif int status; struct tty_display_info *tty = NULL; struct terminal *terminal = NULL; @@ -3024,12 +3027,16 @@ Wcm_clear (tty); - tty->termcap_term_buffer = xmalloc (buffer_size); - /* On some systems, tgetent tries to access the controlling terminal. */ block_tty_out_signal (); +#ifdef TERMINFO + status = tgetent (0, terminal_type); +#else status = tgetent (tty->termcap_term_buffer, terminal_type); + if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1]) + emacs_abort (); +#endif unblock_tty_out_signal (); if (status < 0) @@ -3061,11 +3068,8 @@ } #ifndef TERMINFO - if (strlen (tty->termcap_term_buffer) >= buffer_size) - emacs_abort (); - buffer_size = strlen (tty->termcap_term_buffer); + area = tty->termcap_strings_buffer; #endif - tty->termcap_strings_buffer = area = xmalloc (buffer_size); tty->TS_ins_line = tgetstr ("al", address); tty->TS_ins_multi_lines = tgetstr ("AL", address); tty->TS_bell = tgetstr ("bl", address); @@ -3481,9 +3485,6 @@ xfree (tty->old_tty); xfree (tty->Wcm); - xfree (tty->termcap_strings_buffer); - xfree (tty->termcap_term_buffer); - xfree (tty); } === modified file 'src/termchar.h' --- src/termchar.h 2013-01-02 16:13:04 +0000 +++ src/termchar.h 2013-08-26 18:10:30 +0000 @@ -28,6 +28,10 @@ /* There is nothing else here at the moment... */ }; +#ifndef TERMINFO +enum { TERMCAP_BUFFER_SIZE = 4096 }; +#endif + /* Parameters that are shared between frames on the same tty device. */ struct tty_display_info @@ -72,14 +76,15 @@ mouse-face. */ Mouse_HLInfo mouse_highlight; +#ifndef TERMINFO /* Buffer used internally by termcap (see tgetent in the Termcap - manual). Only init_tty and delete_tty should change this. */ - char *termcap_term_buffer; + manual). Only init_tty should use this. */ + char termcap_term_buffer[TERMCAP_BUFFER_SIZE]; /* Buffer storing terminal description strings (see tgetstr in the - Termcap manual). Only init_tty and delete_tty should change - this. */ - char *termcap_strings_buffer; + Termcap manual). Only init_tty should use this. */ + char termcap_strings_buffer[TERMCAP_BUFFER_SIZE]; +#endif /* Strings, numbers and flags taken from the termcap entry. */ ------------------------------------------------------------ revno: 114011 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-08-26 10:31:00 -0700 message: * frame.c (check_minibuf_window): Initialize 'window' properly, so that Emacs reliably aborts later if 'window' is not initialized. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 16:29:52 +0000 +++ src/ChangeLog 2013-08-26 17:31:00 +0000 @@ -1,3 +1,8 @@ +2013-08-26 Paul Eggert + + * frame.c (check_minibuf_window): Initialize 'window' properly, + so that Emacs reliably aborts later if 'window' is not initialized. + 2013-08-26 Jan Djärv * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead === modified file 'src/frame.c' --- src/frame.c 2013-08-26 12:39:08 +0000 +++ src/frame.c 2013-08-26 17:31:00 +0000 @@ -1122,7 +1122,7 @@ if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window)) { - Lisp_Object frames, this, window; + Lisp_Object frames, this, window = make_number (0); if (!EQ (frame, selected_frame) && FRAME_HAS_MINIBUF_P (XFRAME (selected_frame))) ------------------------------------------------------------ revno: 114010 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-26 20:29:52 +0400 message: Fix ChangeLog typo. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 15:44:56 +0000 +++ src/ChangeLog 2013-08-26 16:29:52 +0000 @@ -30,7 +30,7 @@ Fix recovering from possible decompression error. Since insert_from_gap doesn't always move point, we can't use PT as the position where the partially decompressed data ends, and - should count how may bytes was produced so far. + should count how many bytes was produced so far. * decompress.c (struct decompress_unwind_data): Add nbytes member. (unwind_decompress): Really delete partially uncompressed data. (Fzlib_decompress_region): Take decompressed data size into account. ------------------------------------------------------------ revno: 114009 fixes bug: http://debbugs.gnu.org/15154 committer: Jan D. branch nick: trunk timestamp: Mon 2013-08-26 17:44:56 +0200 message: * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead of VoidSymbol. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 14:00:55 +0000 +++ src/ChangeLog 2013-08-26 15:44:56 +0000 @@ -1,3 +1,8 @@ +2013-08-26 Jan Djärv + + * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead + of VoidSymbol (Bug#15154). + 2013-08-26 Dmitry Antipov * lisp.h (Mouse_HLInfo): Drop set-but-unused members === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-08-24 08:43:36 +0000 +++ src/gtkutil.c 2013-08-26 15:44:56 +0000 @@ -5044,10 +5044,10 @@ (gdk_display_get_default ())); /* Remove F10 as a menu accelerator, it does not mix well with Emacs key bindings. It doesn't seem to be any way to remove properties, - so we set it to VoidSymbol which in X means "no key". */ + so we set it to "" which in means "no key". */ gtk_settings_set_string_property (settings, "gtk-menu-bar-accel", - "VoidSymbol", + "", EMACS_CLASS); /* Make GTK text input widgets use Emacs style keybindings. This is ------------------------------------------------------------ revno: 114008 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-08-26 11:28:24 -0400 message: * lispref/variables.texi (File Local Variables): Don't recommend quoting! diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-20 14:49:09 +0000 +++ doc/lispref/ChangeLog 2013-08-26 15:28:24 +0000 @@ -1,3 +1,7 @@ +2013-08-26 Stefan Monnier + + * variables.texi (File Local Variables): Don't recommend quoting! Ever! + 2013-08-20 Eli Zaretskii * files.texi (Information about Files): Mention file names with === modified file 'doc/lispref/variables.texi' --- doc/lispref/variables.texi 2013-08-02 13:52:10 +0000 +++ doc/lispref/variables.texi 2013-08-26 15:28:24 +0000 @@ -1649,8 +1649,7 @@ variables have @code{safe-local-variable} properties; these include @code{fill-column}, @code{fill-prefix}, and @code{indent-tabs-mode}. For boolean-valued variables that are safe, use @code{booleanp} as the -property value. Lambda expressions should be quoted so that -@code{describe-variable} can display the predicate. +property value. When defining a user option using @code{defcustom}, you can set its @code{safe-local-variable} property by adding the arguments ------------------------------------------------------------ revno: 114007 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-26 18:00:55 +0400 message: * lisp.h (Mouse_HLInfo): Drop set-but-unused members mouse_face_beg_y and mouse_face_end_y. * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos) (mouse_face_from_string_pos, note_mode_line_or_margin_highlight): Adjust users and update comment where appropriate. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 12:39:08 +0000 +++ src/ChangeLog 2013-08-26 14:00:55 +0000 @@ -1,3 +1,11 @@ +2013-08-26 Dmitry Antipov + + * lisp.h (Mouse_HLInfo): Drop set-but-unused members + mouse_face_beg_y and mouse_face_end_y. + * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos) + (mouse_face_from_string_pos, note_mode_line_or_margin_highlight): + Adjust users and update comment where appropriate. + 2013-08-26 Martin Rudalics * frame.c (check_minibuf_window): New function. === modified file 'src/lisp.h' --- src/lisp.h 2013-08-22 18:29:51 +0000 +++ src/lisp.h 2013-08-26 14:00:55 +0000 @@ -2172,10 +2172,8 @@ the mouse stays within this range, we need not redraw anything on its account. Rows and columns are glyph matrix positions in MOUSE_FACE_WINDOW. */ - int mouse_face_beg_row, mouse_face_beg_col; - int mouse_face_beg_x, mouse_face_beg_y; - int mouse_face_end_row, mouse_face_end_col; - int mouse_face_end_x, mouse_face_end_y; + int mouse_face_beg_row, mouse_face_beg_col, mouse_face_beg_x; + int mouse_face_end_row, mouse_face_end_col, mouse_face_end_x; Lisp_Object mouse_face_window; int mouse_face_face_id; Lisp_Object mouse_face_overlay; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-26 09:33:37 +0000 +++ src/xdisp.c 2013-08-26 14:00:55 +0000 @@ -12384,13 +12384,11 @@ hlinfo->mouse_face_beg_col = hpos; hlinfo->mouse_face_beg_row = vpos; hlinfo->mouse_face_beg_x = x; - hlinfo->mouse_face_beg_y = row->y; hlinfo->mouse_face_past_end = 0; hlinfo->mouse_face_end_col = hpos + 1; hlinfo->mouse_face_end_row = vpos; hlinfo->mouse_face_end_x = x + glyph->pixel_width; - hlinfo->mouse_face_end_y = row->y; hlinfo->mouse_face_window = window; hlinfo->mouse_face_face_id = TOOL_BAR_FACE_ID; @@ -27113,9 +27111,7 @@ r1 = tem; } - hlinfo->mouse_face_beg_y = r1->y; hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r1, w->current_matrix); - hlinfo->mouse_face_end_y = r2->y; hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); /* For a bidi-reordered row, the positions of BEFORE_STRING, @@ -27479,7 +27475,6 @@ { hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_beg_y = r->y; hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; hlinfo->mouse_face_beg_x = gx; found = 1; @@ -27498,7 +27493,6 @@ { hlinfo->mouse_face_beg_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_beg_y = r->y; hlinfo->mouse_face_beg_col = g - r->glyphs[TEXT_AREA]; for (gx = r->x, g1 = r->glyphs[TEXT_AREA]; g1 < g; ++g1) gx += g1->pixel_width; @@ -27535,9 +27529,8 @@ /* The highlighted region ends on the previous row. */ r--; - /* Set the end row and its vertical pixel coordinate. */ + /* Set the end row. */ hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r, w->current_matrix); - hlinfo->mouse_face_end_y = r->y; /* Compute and set the end column and the end column's horizontal pixel coordinate. */ @@ -28035,8 +28028,6 @@ hlinfo->mouse_face_beg_row = vpos; hlinfo->mouse_face_end_row = hlinfo->mouse_face_beg_row; - hlinfo->mouse_face_beg_y = 0; - hlinfo->mouse_face_end_y = 0; hlinfo->mouse_face_past_end = 0; hlinfo->mouse_face_window = window; ------------------------------------------------------------ revno: 114006 committer: Michael Albinus branch nick: trunk timestamp: Mon 2013-08-26 15:17:22 +0200 message: * minibuffer.el: Revert change from 2013-08-20. * net/tramp.el (tramp-find-method, tramp-find-user): Mark result with text property `tramp-default', if appropriate. (tramp-check-proper-host): New defun. (tramp-dissect-file-name): Do not check hostname. Revert change of 2013-03-18. (tramp-backtrace): Make VEC-OR-PROC optional. * net/tramp-adb.el (tramp-adb-maybe-open-connection): * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): * net/tramp-sh.el (tramp-maybe-open-connection): * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply `tramp-check-proper-host'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-26 11:03:09 +0000 +++ lisp/ChangeLog 2013-08-26 13:17:22 +0000 @@ -1,3 +1,20 @@ +2013-08-26 Michael Albinus + + * minibuffer.el: Revert change from 2013-08-20. + + * net/tramp.el (tramp-find-method, tramp-find-user): Mark result + with text property `tramp-default', if appropriate. + (tramp-check-proper-host): New defun. + (tramp-dissect-file-name): Do not check hostname. Revert change + of 2013-03-18. + (tramp-backtrace): Make VEC-OR-PROC optional. + + * net/tramp-adb.el (tramp-adb-maybe-open-connection): + * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): + * net/tramp-sh.el (tramp-maybe-open-connection): + * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply + `tramp-check-proper-host'. + 2013-08-26 Tassilo Horn * epa-hook.el (epa-file-encrypt-to): Quote `safe-local-variable' === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2013-08-20 10:04:13 +0000 +++ lisp/minibuffer.el 2013-08-26 13:17:22 +0000 @@ -2246,8 +2246,7 @@ ;; - Cygwin (substitute-in-file-name "C:\bin") => "/usr/bin" ;; (substitute-in-file-name "C:\") => "/" ;; (substitute-in-file-name "C:\bi") => "/bi" - (let* ((non-essential t) - (ustr (substitute-in-file-name qstr)) + (let* ((ustr (substitute-in-file-name qstr)) (uprefix (substring ustr 0 upos)) qprefix) ;; Main assumption: nothing after qpos should affect the text before upos, === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp-adb.el 2013-08-26 13:17:22 +0000 @@ -1092,6 +1092,8 @@ "Maybe open a connection VEC. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." + (tramp-check-proper-host vec) + (let* ((buf (tramp-get-connection-buffer vec)) (p (get-buffer-process buf)) (host (tramp-file-name-host vec)) === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2013-08-15 17:02:09 +0000 +++ lisp/net/tramp-compat.el 2013-08-26 13:17:22 +0000 @@ -521,6 +521,7 @@ ;; `user-error' has been added to Emacs 24.3. (defun tramp-compat-user-error (format &rest args) "Signal a pilot error." +; (tramp-backtrace) (apply (if (fboundp 'user-error) 'user-error 'error) format args)) (add-hook 'tramp-unload-hook === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp-gvfs.el 2013-08-26 13:17:22 +0000 @@ -1469,6 +1469,7 @@ "Maybe open a connection VEC. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." + (tramp-check-proper-host vec) ;; We set the file name, in case there are incoming D-Bus signals or ;; D-Bus errors. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-08-26 06:59:53 +0000 +++ lisp/net/tramp-sh.el 2013-08-26 13:17:22 +0000 @@ -4326,6 +4326,8 @@ "Maybe open a connection VEC. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." + (tramp-check-proper-host vec) + (catch 'uname-changed (let ((p (tramp-get-connection-process vec)) (process-name (tramp-get-connection-property vec "process-name" nil)) === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2013-08-15 17:02:09 +0000 +++ lisp/net/tramp-smb.el 2013-08-26 13:17:22 +0000 @@ -1564,6 +1564,8 @@ connection if a previous connection has died for some reason. If ARGUMENT is non-nil, use it as argument for `tramp-smb-winexe-program', and suppress any checks." + (tramp-check-proper-host vec) + (let* ((share (tramp-smb-get-share vec)) (buf (tramp-get-connection-buffer vec)) (p (get-buffer-process buf))) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp.el 2013-08-26 13:17:22 +0000 @@ -1239,23 +1239,31 @@ ;; This works with the current set of `tramp-obsolete-methods'. ;; Must be improved, if their are more sophisticated replacements. (setq result (substring result 0 -1))) - result)) + ;; We must mark, whether a default value has been used. + (if (or method (null result)) + result + (propertize result 'tramp-default t)))) (defun tramp-find-user (method user host) "Return the right user string to use. This is USER, if non-nil. Otherwise, do a lookup in `tramp-default-user-alist'." - (or user - (let ((choices tramp-default-user-alist) - luser item) - (while choices - (setq item (pop choices)) - (when (and (string-match (or (nth 0 item) "") (or method "")) - (string-match (or (nth 1 item) "") (or host ""))) - (setq luser (nth 2 item)) - (setq choices nil))) - luser) - tramp-default-user)) + (let ((result + (or user + (let ((choices tramp-default-user-alist) + luser item) + (while choices + (setq item (pop choices)) + (when (and (string-match (or (nth 0 item) "") (or method "")) + (string-match (or (nth 1 item) "") (or host ""))) + (setq luser (nth 2 item)) + (setq choices nil))) + luser) + tramp-default-user))) + ;; We must mark, whether a default value has been used. + (if (or user (null result)) + result + (propertize result 'tramp-default t)))) (defun tramp-find-host (method user host) "Return the right host string to use. @@ -1272,6 +1280,18 @@ lhost) tramp-default-host)) +(defun tramp-check-proper-host (vec) + "Check host name of VEC." + (let ((method (tramp-file-name-method vec)) + (user (tramp-file-name-user vec)) + (host (tramp-file-name-host vec))) + (when (and (equal tramp-syntax 'ftp) host + (or (null method) (get-text-property 0 'tramp-default method)) + (or (null user) (get-text-property 0 'tramp-default user)) + (member host (mapcar 'car tramp-methods))) + (tramp-compat-user-error + "Host name must not match method `%s'" host)))) + (defun tramp-dissect-file-name (name &optional nodefault) "Return a `tramp-file-name' structure. The structure consists of remote method, remote user, remote host @@ -1290,12 +1310,7 @@ (when (string-match tramp-prefix-ipv6-regexp host) (setq host (replace-match "" nil t host))) (when (string-match tramp-postfix-ipv6-regexp host) - (setq host (replace-match "" nil t host))) - (when (and (equal tramp-syntax 'ftp) (null method) (null user) - (member host (mapcar 'car tramp-methods)) - (not (tramp-completion-mode-p))) - (tramp-compat-user-error - "Host name must not match method `%s'" host))) + (setq host (replace-match "" nil t host)))) (if nodefault (vector method user host localname hop) (vector @@ -1537,10 +1552,14 @@ (concat (format "(%d) # " level) fmt-string) arguments))))))) -(defsubst tramp-backtrace (vec-or-proc) +(defsubst tramp-backtrace (&optional vec-or-proc) "Dump a backtrace into the debug buffer. -This function is meant for debugging purposes." - (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))) +If VEC-OR-PROC is nil, the buffer *debug tramp* is used. This +function is meant for debugging purposes." + (if vec-or-proc + (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))) + (if (<= 10 tramp-verbose) + (with-output-to-temp-buffer "*debug tramp*" (backtrace))))) (defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments) "Emit an error. ------------------------------------------------------------ revno: 114005 committer: martin rudalics branch nick: trunk timestamp: Mon 2013-08-26 14:39:08 +0200 message: New function check_minibuf_window to fix bug#15183. * frame.c (check_minibuf_window): New function. (delete_frame, Fmake_frame_invisible, Ficonify_frame): Call check_minibuf_window (Bug#15183). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 09:33:37 +0000 +++ src/ChangeLog 2013-08-26 12:39:08 +0000 @@ -1,3 +1,9 @@ +2013-08-26 Martin Rudalics + + * frame.c (check_minibuf_window): New function. + (delete_frame, Fmake_frame_invisible, Ficonify_frame): Call + check_minibuf_window (Bug#15183). + 2013-08-26 Dmitry Antipov * window.h (struct window): Replace last_cursor with last_cursor_vpos === modified file 'src/frame.c' --- src/frame.c 2013-08-15 16:28:42 +0000 +++ src/frame.c 2013-08-26 12:39:08 +0000 @@ -1110,6 +1110,51 @@ return 0; } +/* Make sure that minibuf_window doesn't refer to FRAME's minibuffer + window. Preferably use the selected frame's minibuffer window + instead. If the selected frame doesn't have one, get some other + frame's minibuffer window. SELECT non-zero means select the new + minibuffer window. */ +static void +check_minibuf_window (Lisp_Object frame, int select) +{ + struct frame *f = decode_live_frame (frame); + + if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window)) + { + Lisp_Object frames, this, window; + + if (!EQ (frame, selected_frame) + && FRAME_HAS_MINIBUF_P (XFRAME (selected_frame))) + window = FRAME_MINIBUF_WINDOW (XFRAME (selected_frame)); + else + FOR_EACH_FRAME (frames, this) + { + if (!EQ (this, frame) && FRAME_HAS_MINIBUF_P (XFRAME (this))) + { + window = FRAME_MINIBUF_WINDOW (XFRAME (this)); + break; + } + } + + if (!WINDOWP (window)) + emacs_abort (); + else + { + /* Use set_window_buffer instead of Fset_window_buffer (see + discussion of bug#11984, bug#12025, bug#12026). */ + set_window_buffer (window, XWINDOW (minibuf_window)->contents, 0, 0); + minibuf_window = window; + + /* SELECT non-zero usually means that FRAME's minibuffer + window was selected; select the new one. */ + if (select) + Fselect_window (minibuf_window, Qnil); + } + } +} + + /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME unconditionally. x_connection_closed and delete_terminal use this. Any other value of FORCE implements the semantics @@ -1244,19 +1289,7 @@ } /* Don't allow minibuf_window to remain on a deleted frame. */ - if (EQ (f->minibuffer_window, minibuf_window)) - { - /* Use set_window_buffer instead of Fset_window_buffer (see - discussion of bug#11984, bug#12025, bug#12026). */ - set_window_buffer (sf->minibuffer_window, - XWINDOW (minibuf_window)->contents, 0, 0); - minibuf_window = sf->minibuffer_window; - - /* If the dying minibuffer window was selected, - select the new one. */ - if (minibuffer_selected) - Fselect_window (minibuf_window, Qnil); - } + check_minibuf_window (frame, minibuffer_selected); /* Don't let echo_area_window to remain on a deleted frame. */ if (EQ (f->minibuffer_window, echo_area_window)) @@ -1683,16 +1716,8 @@ if (NILP (force) && !other_visible_frames (f)) error ("Attempt to make invisible the sole visible or iconified frame"); - /* Don't allow minibuf_window to remain on a deleted frame. */ - if (EQ (f->minibuffer_window, minibuf_window)) - { - struct frame *sf = XFRAME (selected_frame); - /* Use set_window_buffer instead of Fset_window_buffer (see - discussion of bug#11984, bug#12025, bug#12026). */ - set_window_buffer (sf->minibuffer_window, - XWINDOW (minibuf_window)->contents, 0, 0); - minibuf_window = sf->minibuffer_window; - } + /* Don't allow minibuf_window to remain on an invisible frame. */ + check_minibuf_window (frame, EQ (minibuf_window, selected_window)); /* I think this should be done with a hook. */ #ifdef HAVE_WINDOW_SYSTEM @@ -1715,15 +1740,7 @@ struct frame *f = decode_live_frame (frame); /* Don't allow minibuf_window to remain on an iconified frame. */ - if (EQ (f->minibuffer_window, minibuf_window)) - { - struct frame *sf = XFRAME (selected_frame); - /* Use set_window_buffer instead of Fset_window_buffer (see - discussion of bug#11984, bug#12025, bug#12026). */ - set_window_buffer (sf->minibuffer_window, - XWINDOW (minibuf_window)->contents, 0, 0); - minibuf_window = sf->minibuffer_window; - } + check_minibuf_window (frame, EQ (minibuf_window, selected_window)); /* I think this should be done with a hook. */ #ifdef HAVE_WINDOW_SYSTEM ------------------------------------------------------------ revno: 114004 committer: Tassilo Horn branch nick: trunk timestamp: Mon 2013-08-26 13:03:09 +0200 message: * epa-hook.el (epa-file-encrypt-to): Quote `safe-local-variable' lambda expression in order to have `describe-variable' display it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-26 06:59:53 +0000 +++ lisp/ChangeLog 2013-08-26 11:03:09 +0000 @@ -1,3 +1,8 @@ +2013-08-26 Tassilo Horn + + * epa-hook.el (epa-file-encrypt-to): Quote `safe-local-variable' + lambda expression in order to have `describe-variable' display it. + 2013-08-26 Michael Albinus * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): === modified file 'lisp/epa-hook.el' --- lisp/epa-hook.el 2013-01-01 09:11:05 +0000 +++ lisp/epa-hook.el 2013-08-26 11:03:09 +0000 @@ -53,15 +53,15 @@ May either be a string or a list of strings.") (put 'epa-file-encrypt-to 'safe-local-variable - (lambda (val) - (or (stringp val) - (and (listp val) - (catch 'safe - (mapc (lambda (elt) - (unless (stringp elt) - (throw 'safe nil))) - val) - t))))) + #'(lambda (val) + (or (stringp val) + (and (listp val) + (catch 'safe + (mapc (lambda (elt) + (unless (stringp elt) + (throw 'safe nil))) + val) + t))))) (put 'epa-file-encrypt-to 'permanent-local t) ------------------------------------------------------------ revno: 114003 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-26 13:33:37 +0400 message: * window.h (struct window): Replace last_cursor with last_cursor_vpos because this is the only last cursor data we need to keep and consult. * window.c (replace_window, set_window_buffer, Fsplit_window_internal): * xdisp.c (mark_window_display_accurate_1, try_cursor_movement): Adjust users. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 05:32:47 +0000 +++ src/ChangeLog 2013-08-26 09:33:37 +0000 @@ -1,5 +1,13 @@ 2013-08-26 Dmitry Antipov + * window.h (struct window): Replace last_cursor with last_cursor_vpos + because this is the only last cursor data we need to keep and consult. + * window.c (replace_window, set_window_buffer, Fsplit_window_internal): + * xdisp.c (mark_window_display_accurate_1, try_cursor_movement): + Adjust users. + +2013-08-26 Dmitry Antipov + Fix recovering from possible decompression error. Since insert_from_gap doesn't always move point, we can't use PT as the position where the partially decompressed data ends, and === modified file 'src/window.c' --- src/window.c 2013-08-23 04:17:04 +0000 +++ src/window.c 2013-08-26 09:33:37 +0000 @@ -2027,8 +2027,8 @@ n->desired_matrix = n->current_matrix = 0; n->vscroll = 0; memset (&n->cursor, 0, sizeof (n->cursor)); - memset (&n->last_cursor, 0, sizeof (n->last_cursor)); memset (&n->phys_cursor, 0, sizeof (n->phys_cursor)); + n->last_cursor_vpos = 0; n->phys_cursor_type = -1; n->phys_cursor_width = -1; n->must_be_updated_p = 0; @@ -3172,7 +3172,7 @@ w->window_end_pos = 0; w->window_end_vpos = 0; - memset (&w->last_cursor, 0, sizeof w->last_cursor); + w->last_cursor_vpos = 0; if (!(keep_margins_p && samebuf)) { /* If we're not actually changing the buffer, don't reset hscroll and @@ -3911,7 +3911,7 @@ } n->window_end_valid = 0; - memset (&n->last_cursor, 0, sizeof n->last_cursor); + n->last_cursor_vpos = 0; /* Get special geometry settings from reference window. */ n->left_margin_cols = r->left_margin_cols; === modified file 'src/window.h' --- src/window.h 2013-08-14 07:05:54 +0000 +++ src/window.h 2013-08-26 09:33:37 +0000 @@ -229,10 +229,6 @@ as the normal may yield a matrix which is too small. */ int nrows_scale_factor, ncols_scale_factor; - /* Cursor position as of last update that completed without - pause. This is the position of last_point. */ - struct cursor_pos last_cursor; - /* Intended cursor position. This is a position within the glyph matrix. */ struct cursor_pos cursor; @@ -240,6 +236,10 @@ /* Where the cursor actually is. */ struct cursor_pos phys_cursor; + /* Vertical cursor position as of last update that completed + without pause. This is the position of last_point. */ + int last_cursor_vpos; + /* Cursor type and width of last cursor drawn on the window. Used for X and w32 frames; -1 initially. */ int phys_cursor_type, phys_cursor_width; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-26 05:20:59 +0000 +++ src/xdisp.c 2013-08-26 09:33:37 +0000 @@ -13743,7 +13743,7 @@ w->current_matrix->begv = BUF_BEGV (b); w->current_matrix->zv = BUF_ZV (b); - w->last_cursor = w->cursor; + w->last_cursor_vpos = w->cursor.vpos; w->last_cursor_off_p = w->cursor_off_p; if (w == XWINDOW (selected_window)) @@ -15087,12 +15087,12 @@ /* Start with the row the cursor was displayed during the last not paused redisplay. Give up if that row is not valid. */ - if (w->last_cursor.vpos < 0 - || w->last_cursor.vpos >= w->current_matrix->nrows) + if (w->last_cursor_vpos < 0 + || w->last_cursor_vpos >= w->current_matrix->nrows) rc = CURSOR_MOVEMENT_MUST_SCROLL; else { - row = MATRIX_ROW (w->current_matrix, w->last_cursor.vpos); + row = MATRIX_ROW (w->current_matrix, w->last_cursor_vpos); if (row->mode_line_p) ++row; if (!row->enabled_p) ------------------------------------------------------------ revno: 114002 committer: Michael Albinus branch nick: trunk timestamp: Mon 2013-08-26 08:59:53 +0200 message: * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): BUF can be optional. (Bug#15186) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-25 22:30:56 +0000 +++ lisp/ChangeLog 2013-08-26 06:59:53 +0000 @@ -1,3 +1,8 @@ +2013-08-26 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): + BUF can be optional. (Bug#15186) + 2013-08-25 Xue Fuqiao * progmodes/flymake.el (flymake-get-real-file-name-function): === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-08-17 10:20:15 +0000 +++ lisp/net/tramp-sh.el 2013-08-26 06:59:53 +0000 @@ -1234,14 +1234,14 @@ ;; This function makes the same assumption as ;; `tramp-sh-handle-set-visited-file-modtime'. -(defun tramp-sh-handle-verify-visited-file-modtime (buf) +(defun tramp-sh-handle-verify-visited-file-modtime (&optional buf) "Like `verify-visited-file-modtime' for Tramp files. At the time `verify-visited-file-modtime' calls this function, we already know that the buffer is visiting a file and that `visited-file-modtime' does not return 0. Do not call this function directly, unless those two cases are already taken care of." - (with-current-buffer buf + (with-current-buffer (or buf (current-buffer)) (let ((f (buffer-file-name))) ;; There is no file visiting the buffer, or the buffer has no ;; recorded last modification time, or there is no established ------------------------------------------------------------ revno: 114001 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2013-08-26 09:32:47 +0400 message: Fix recovering from possible decompression error. Since insert_from_gap doesn't always move point, we can't use PT as the position where the partially decompressed data ends, and should count how may bytes was produced so far. * decompress.c (struct decompress_unwind_data): Add nbytes member. (unwind_decompress): Really delete partially uncompressed data. (Fzlib_decompress_region): Take decompressed data size into account. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-26 05:20:59 +0000 +++ src/ChangeLog 2013-08-26 05:32:47 +0000 @@ -1,5 +1,15 @@ 2013-08-26 Dmitry Antipov + Fix recovering from possible decompression error. Since + insert_from_gap doesn't always move point, we can't use PT as + the position where the partially decompressed data ends, and + should count how may bytes was produced so far. + * decompress.c (struct decompress_unwind_data): Add nbytes member. + (unwind_decompress): Really delete partially uncompressed data. + (Fzlib_decompress_region): Take decompressed data size into account. + +2013-08-26 Dmitry Antipov + * syntax.c (init_syntax_once): Adjust comment and do an early initialization of Qchar_table_extra_slots just once... * casetab.c (init_casetab_once): === modified file 'src/decompress.c' --- src/decompress.c 2013-08-17 17:18:07 +0000 +++ src/decompress.c 2013-08-26 05:32:47 +0000 @@ -85,7 +85,7 @@ struct decompress_unwind_data { - ptrdiff_t old_point, start; + ptrdiff_t old_point, start, nbytes; z_stream *stream; }; @@ -97,7 +97,7 @@ /* Delete any uncompressed data already inserted on error. */ if (data->start) - del_range (data->start, PT); + del_range (data->start, data->start + data->nbytes); /* Put point where it was, or if the buffer has shrunk because the compressed data is bigger than the uncompressed, at @@ -173,7 +173,7 @@ unwind_data.start = iend; unwind_data.stream = &stream; unwind_data.old_point = PT; - + unwind_data.nbytes = 0; record_unwind_protect_ptr (unwind_decompress, &unwind_data); /* Insert the decompressed data at the end of the compressed data. */ @@ -201,6 +201,7 @@ pos_byte += avail_in - stream.avail_in; decompressed = avail_out - stream.avail_out; insert_from_gap (decompressed, decompressed, 0); + unwind_data.nbytes += decompressed; QUIT; } while (inflate_status == Z_OK);