Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103735. ------------------------------------------------------------ revno: 103735 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-03-24 03:30:26 +0100 message: src/w32term.c (x_set_glyph_string_clipping): Don't pass uninitialized region to CombineRgn. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-03-23 16:25:38 +0000 +++ src/ChangeLog 2011-03-24 02:30:26 +0000 @@ -1,3 +1,8 @@ +2011-03-24 Juanma Barranquero + + * w32term.c (x_set_glyph_string_clipping): + Don't pass uninitialized region to CombineRgn. + 2011-03-23 Juanma Barranquero * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. === modified file 'src/w32term.c' --- src/w32term.c 2011-03-23 16:25:38 +0000 +++ src/w32term.c 2011-03-24 02:30:26 +0000 @@ -1068,16 +1068,12 @@ w32_set_clip_rectangle (s->hdc, r); else if (n > 1) { - HRGN full_clip, clip1, clip2; - clip1 = CreateRectRgnIndirect (r); - clip2 = CreateRectRgnIndirect (r + 1); - if (CombineRgn (full_clip, clip1, clip2, RGN_OR) != ERROR) - { - SelectClipRgn (s->hdc, full_clip); - } + HRGN clip1 = CreateRectRgnIndirect (r); + HRGN clip2 = CreateRectRgnIndirect (r + 1); + if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR) + SelectClipRgn (s->hdc, clip1); DeleteObject (clip1); DeleteObject (clip2); - DeleteObject (full_clip); } s->num_clips = n; } ------------------------------------------------------------ revno: 103734 committer: Leo Liu branch nick: trunk timestamp: Thu 2011-03-24 02:11:15 +0800 message: Move abbrevlist.el to obsolete/abbrevlist.el diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-23 11:56:34 +0000 +++ lisp/ChangeLog 2011-03-23 18:11:15 +0000 @@ -1,5 +1,7 @@ 2011-03-23 Leo Liu + * abbrevlist.el: Move to obsolete/abbrevlist.el. + * help-mode.el (help-mode-finish): Tweak regexp. 2011-03-23 Glenn Morris === renamed file 'lisp/abbrevlist.el' => 'lisp/obsolete/abbrevlist.el' --- lisp/abbrevlist.el 2011-01-25 04:08:28 +0000 +++ lisp/obsolete/abbrevlist.el 2011-03-23 18:11:15 +0000 @@ -6,6 +6,7 @@ ;; Maintainer: FSF ;; Keywords: abbrev ;; Package: emacs +;; Obsolete-since: 24.1 ;; This file is part of GNU Emacs. ------------------------------------------------------------ revno: 103733 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2011-03-23 17:25:38 +0100 message: w32: Fix some warnings reported by -Wall -Wextra. * lib-src/ntlib.c: Include . * nt/cmdproxy.c: Include . (make_absolute): Remove unused variable `i'. * src/w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer. (Fx_close_connection): Remove unused variable `i'. * src/w32font.c (w32font_draw): Return number of glyphs. (w32font_open_internal): Remove unused variable `i'. (w32font_driver): Add missing initializer. * src/w32menu.c (utf8to16): Remove unused variable `utf16'. (fill_in_menu): Remove unused variable `items_added'. * src/w32term.c (last_mouse_press_frame): Remove static global variable. (w32_clip_to_row): Remove unused variable `f'. (x_delete_terminal): Remove unused variable `i'. * src/w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'. (NOTHING): Remove unused static global variable. (uniscribe_check_otf): Remove unused variable `table'. (uniscribe_font_driver): Add missing initializers. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-03-23 03:09:55 +0000 +++ lib-src/ChangeLog 2011-03-23 16:25:38 +0000 @@ -1,3 +1,7 @@ +2011-03-23 Juanma Barranquero + + * ntlib.c: Include . + 2011-03-23 Glenn Morris * Makefile.in ($(DESTDIR)${archlibdir}): === modified file 'lib-src/ntlib.c' --- lib-src/ntlib.c 2011-01-31 23:54:50 +0000 +++ lib-src/ntlib.c 2011-03-23 16:25:38 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #include "ntlib.h" === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-03-12 19:19:47 +0000 +++ nt/ChangeLog 2011-03-23 16:25:38 +0000 @@ -1,3 +1,8 @@ +2011-03-23 Juanma Barranquero + + * cmdproxy.c: Include . + (make_absolute): Remove unused variable `i'. + 2011-02-27 Eli Zaretskii * inc/unistd.h (readlink, symlink): Declare prototypes. === modified file 'nt/cmdproxy.c' --- nt/cmdproxy.c 2011-01-25 04:08:28 +0000 +++ nt/cmdproxy.c 2011-03-23 16:25:38 +0000 @@ -33,6 +33,7 @@ #include /* alloca */ #include /* getenv */ #include /* strlen */ +#include /* isspace, isalpha */ /* We don't want to include stdio.h because we are already duplicating lots of it here */ @@ -251,7 +252,6 @@ char curdir[MAX_PATH]; char *p, *path; const char *fname; - int i; /* At least partial absolute path specified; search there. */ if ((isalpha (prog[0]) && prog[1] == ':') || === modified file 'src/ChangeLog' --- src/ChangeLog 2011-03-23 10:06:57 +0000 +++ src/ChangeLog 2011-03-23 16:25:38 +0000 @@ -1,3 +1,25 @@ +2011-03-23 Juanma Barranquero + + * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'. + (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer. + (Fx_close_connection): Remove unused variable `i'. + + * w32font.c (w32font_draw): Return number of glyphs. + (w32font_open_internal): Remove unused variable `i'. + (w32font_driver): Add missing initializer. + + * w32menu.c (utf8to16): Remove unused variable `utf16'. + (fill_in_menu): Remove unused variable `items_added'. + + * w32term.c (last_mouse_press_frame): Remove static global variable. + (w32_clip_to_row): Remove unused variable `f'. + (x_delete_terminal): Remove unused variable `i'. + + * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'. + (NOTHING): Remove unused static global variable. + (uniscribe_check_otf): Remove unused variable `table'. + (uniscribe_font_driver): Add missing initializers. + 2011-03-23 Julien Danjou * term.c (Fsuspend_tty, Fresume_tty): === modified file 'src/w32fns.c' --- src/w32fns.c 2011-03-14 17:07:53 +0000 +++ src/w32fns.c 2011-03-23 16:25:38 +0000 @@ -1527,7 +1527,6 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { int nlines; - int olines = FRAME_MENU_BAR_LINES (f); /* Right now, menu bars don't work properly in minibuf-only frames; most of the commands try to apply themselves to the minibuffer @@ -2951,7 +2950,7 @@ HIMC context = get_ime_context_fn (hwnd); wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam); /* Get buffer size. */ - size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, 0); + size = get_composition_string_fn (context, GCS_RESULTSTR, NULL, 0); buffer = alloca (size); size = get_composition_string_fn (context, GCS_RESULTSTR, buffer, size); @@ -4820,7 +4819,6 @@ (Lisp_Object display) { struct w32_display_info *dpyinfo = check_x_display_info (display); - int i; if (dpyinfo->reference_count > 0) error ("Display still has frames on it"); === modified file 'src/w32font.c' --- src/w32font.c 2011-03-14 17:07:53 +0000 +++ src/w32font.c 2011-03-23 16:25:38 +0000 @@ -533,6 +533,7 @@ { UINT options; HRGN orig_clip = NULL; + int len = to - from; struct w32font_info *w32font = (struct w32font_info *) s->font; options = w32font->glyph_idx; @@ -581,14 +582,14 @@ if (s->padding_p) { - int len = to - from, i; + int i; for (i = 0; i < len; i++) ExtTextOutW (s->hdc, x + i, y, options, NULL, s->char2b + from + i, 1, NULL); } else - ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, to - from, NULL); + ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL); /* Restore clip region. */ if (s->num_clips > 0) @@ -596,6 +597,8 @@ if (orig_clip) DeleteObject (orig_clip); + + return len; } /* w32 implementation of free_entity for font backend. @@ -774,7 +777,7 @@ w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, int pixel_size, Lisp_Object font_object) { - int len, size, i; + int len, size; LOGFONT logfont; HDC dc; HFONT hfont, old_font; @@ -2418,6 +2421,7 @@ NULL, /* check */ NULL, /* get_variation_glyphs */ w32font_filter_properties, + NULL, /* cached_font_ok */ }; === modified file 'src/w32menu.c' --- src/w32menu.c 2011-03-14 17:07:53 +0000 +++ src/w32menu.c 2011-03-23 16:25:38 +0000 @@ -1320,7 +1320,6 @@ { while (len > 0) { - int utf16; if (*src < 0x80) { *dest = (WCHAR) *src; @@ -1546,8 +1545,6 @@ static int fill_in_menu (HMENU menu, widget_value *wv) { - int items_added = 0; - for ( ; wv != NULL; wv = wv->next) { if (wv->contents) === modified file 'src/w32term.c' --- src/w32term.c 2011-03-14 17:07:53 +0000 +++ src/w32term.c 2011-03-23 16:25:38 +0000 @@ -160,7 +160,6 @@ /* Where the mouse was last time we reported a mouse event. */ static RECT last_mouse_glyph; static FRAME_PTR last_mouse_glyph_frame; -static Lisp_Object last_mouse_press_frame; /* The scroll bar in which the last motion event occurred. @@ -4842,7 +4841,6 @@ static void w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) { - struct frame *f = XFRAME (WINDOW_FRAME (w)); RECT clip_rect; int window_x, window_y, window_width; @@ -6089,7 +6087,6 @@ x_delete_terminal (struct terminal *terminal) { struct w32_display_info *dpyinfo = terminal->display_info.w32; - int i; /* Protect against recursive calls. delete_frame in delete_terminal calls us back when it deletes our last frame. */ === modified file 'src/w32uniscribe.c' --- src/w32uniscribe.c 2011-03-14 17:07:53 +0000 +++ src/w32uniscribe.c 2011-03-23 16:25:38 +0000 @@ -320,7 +320,7 @@ } if (SUCCEEDED (result)) { - int j, nclusters, from, to; + int j, from, to; from = 0; to = from; @@ -629,8 +629,6 @@ STR[4] = '\0'; \ } while (0) -static char* NOTHING = " "; - #define SNAME(VAL) SDATA (SYMBOL_NAME (VAL)) /* Check if font supports the otf script/language/features specified. @@ -646,7 +644,6 @@ struct frame * f; HDC context; HFONT check_font, old_font; - DWORD table; int i, retval = 0; struct gcpro gcpro1; @@ -936,7 +933,11 @@ NULL, /* otf_drive - use shape instead. */ NULL, /* start_for_frame */ NULL, /* end_for_frame */ - uniscribe_shape + uniscribe_shape, + NULL, /* check */ + NULL, /* get_variation_glyphs */ + NULL, /* filter_properties */ + NULL, /* cached_font_ok */ }; /* Note that this should be called at every startup, not just when dumping, ------------------------------------------------------------ revno: 103732 committer: Leo Liu branch nick: trunk timestamp: Wed 2011-03-23 19:56:34 +0800 message: Tweak regexp in help-mode-finish Without this fix, "This special-form is advised." won't be correctly fontified. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-23 02:52:52 +0000 +++ lisp/ChangeLog 2011-03-23 11:56:34 +0000 @@ -1,3 +1,7 @@ +2011-03-23 Leo Liu + + * help-mode.el (help-mode-finish): Tweak regexp. + 2011-03-23 Glenn Morris * eshell/esh-opt.el (eshell-eval-using-options): === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2011-03-05 21:10:03 +0000 +++ lisp/help-mode.el 2011-03-23 11:56:34 +0000 @@ -330,7 +330,7 @@ (save-excursion (goto-char (point-min)) (let ((inhibit-read-only t)) - (when (re-search-forward "^This \\w+ is advised.$" nil t) + (when (re-search-forward "^This [^[:space:]]+ is advised.$" nil t) (put-text-property (match-beginning 0) (match-end 0) 'face 'font-lock-warning-face)))) ------------------------------------------------------------ revno: 103731 committer: Julien Danjou branch nick: trunk timestamp: Wed 2011-03-23 11:06:57 +0100 message: Use Frun_hooks rather than calling Vrun_hooks manually diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-03-23 03:32:55 +0000 +++ src/ChangeLog 2011-03-23 10:06:57 +0000 @@ -1,3 +1,21 @@ +2011-03-23 Julien Danjou + + * term.c (Fsuspend_tty, Fresume_tty): + * minibuf.c (read_minibuf, run_exit_minibuf_hook): + * window.c (temp_output_buffer_show): + * insdel.c (signal_before_change): + * frame.c (Fhandle_switch_frame): + * fileio.c (Fdo_auto_save): + * emacs.c (Fkill_emacs): + * editfns.c (save_excursion_restore): + * cmds.c (internal_self_insert): + * callint.c (Fcall_interactively): + * buffer.c (Fkill_all_local_variables): + * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): + Use Frun_hooks. + (command_loop_1): Use Frun_hooks. Call safe_run_hooks + unconditionnaly since it does the check itself. + 2011-03-23 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. === modified file 'src/buffer.c' --- src/buffer.c 2011-03-19 18:49:31 +0000 +++ src/buffer.c 2011-03-23 10:06:57 +0000 @@ -2520,8 +2520,7 @@ the normal hook `change-major-mode-hook'. */) (void) { - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qchange_major_mode_hook); + Frun_hooks (1, &Qchange_major_mode_hook); /* Make sure none of the bindings in local_var_alist remain swapped in, in their symbols. */ === modified file 'src/callint.c' --- src/callint.c 2011-03-16 07:26:16 +0000 +++ src/callint.c 2011-03-23 10:06:57 +0000 @@ -423,8 +423,7 @@ error ("Attempt to select inactive minibuffer window"); /* If the current buffer wants to clean up, let it. */ - if (!NILP (Vmouse_leave_buffer_hook)) - call1 (Vrun_hooks, Qmouse_leave_buffer_hook); + Frun_hooks (1, &Qmouse_leave_buffer_hook); Fselect_window (w, Qnil); } === modified file 'src/cmds.c' --- src/cmds.c 2011-03-15 17:16:01 +0000 +++ src/cmds.c 2011-03-23 10:06:57 +0000 @@ -501,7 +501,7 @@ } /* Run hooks for electric keys. */ - call1 (Vrun_hooks, Qpost_self_insert_hook); + Frun_hooks (1, &Qpost_self_insert_hook); return hairy; } === modified file 'src/editfns.c' --- src/editfns.c 2011-03-16 07:17:22 +0000 +++ src/editfns.c 2011-03-23 10:06:57 +0000 @@ -928,18 +928,21 @@ tem1 = BVAR (current_buffer, mark_active); BVAR (current_buffer, mark_active) = tem; - if (!NILP (Vrun_hooks)) - { - /* If mark is active now, and either was not active - or was at a different place, run the activate hook. */ - if (! NILP (BVAR (current_buffer, mark_active))) - { - if (! EQ (omark, nmark)) - call1 (Vrun_hooks, intern ("activate-mark-hook")); - } - /* If mark has ceased to be active, run deactivate hook. */ - else if (! NILP (tem1)) - call1 (Vrun_hooks, intern ("deactivate-mark-hook")); + /* If mark is active now, and either was not active + or was at a different place, run the activate hook. */ + if (! NILP (tem)) + { + if (! EQ (omark, nmark)) + { + tem = intern ("activate-mark-hook"); + Frun_hooks (1, &tem); + } + } + /* If mark has ceased to be active, run deactivate hook. */ + else if (! NILP (tem1)) + { + tem = intern ("deactivate-mark-hook"); + Frun_hooks (1, &tem); } /* If buffer was visible in a window, and a different window was === modified file 'src/emacs.c' --- src/emacs.c 2011-03-20 21:03:44 +0000 +++ src/emacs.c 2011-03-23 10:06:57 +0000 @@ -1972,14 +1972,15 @@ (Lisp_Object arg) { struct gcpro gcpro1; + Lisp_Object hook; GCPRO1 (arg); if (feof (stdin)) arg = Qt; - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("kill-emacs-hook")); + hook = intern ("kill-emacs-hook"); + Frun_hooks (1, &hook); UNGCPRO; === modified file 'src/fileio.c' --- src/fileio.c 2011-03-21 02:40:27 +0000 +++ src/fileio.c 2011-03-23 10:06:57 +0000 @@ -5180,7 +5180,7 @@ (Lisp_Object no_message, Lisp_Object current_only) { struct buffer *old = current_buffer, *b; - Lisp_Object tail, buf; + Lisp_Object tail, buf, hook; int auto_saved = 0; int do_handled_files; Lisp_Object oquit; @@ -5210,8 +5210,8 @@ /* No GCPRO needed, because (when it matters) all Lisp_Object variables point to non-strings reached from Vbuffer_alist. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("auto-save-hook")); + hook = intern ("auto-save-hook"); + Frun_hooks (1, &hook); if (STRINGP (Vauto_save_list_file_name)) { === modified file 'src/frame.c' --- src/frame.c 2011-03-21 18:12:38 +0000 +++ src/frame.c 2011-03-23 10:06:57 +0000 @@ -890,7 +890,7 @@ { /* Preserve prefix arg that the command loop just cleared. */ KVAR (current_kboard, Vprefix_arg) = Vcurrent_prefix_arg; - call1 (Vrun_hooks, Qmouse_leave_buffer_hook); + Frun_hooks (1, &Qmouse_leave_buffer_hook); return do_switch_frame (event, 0, 0, Qnil); } === modified file 'src/insdel.c' --- src/insdel.c 2011-03-19 18:49:31 +0000 +++ src/insdel.c 2011-03-23 10:06:57 +0000 @@ -2137,14 +2137,14 @@ specbind (Qinhibit_modification_hooks, Qt); - /* If buffer is unmodified, run a special hook for that case. */ + /* If buffer is unmodified, run a special hook for that case. The + check for Vfirst_change_hook is just a minor optimization. */ if (SAVE_MODIFF >= MODIFF - && !NILP (Vfirst_change_hook) - && !NILP (Vrun_hooks)) + && !NILP (Vfirst_change_hook)) { PRESERVE_VALUE; PRESERVE_START_END; - call1 (Vrun_hooks, Qfirst_change_hook); + Frun_hooks (1, &Qfirst_change_hook); } /* Now run the before-change-functions if any. */ === modified file 'src/keyboard.c' --- src/keyboard.c 2011-03-15 21:14:06 +0000 +++ src/keyboard.c 2011-03-23 10:06:57 +0000 @@ -1492,10 +1492,7 @@ Vthis_command = cmd; real_this_command = cmd; - /* Note that the value cell will never directly contain nil - if the symbol is a local variable. */ - if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) - safe_run_hooks (Qpre_command_hook); + safe_run_hooks (Qpre_command_hook); already_adjusted = 0; @@ -1541,18 +1538,14 @@ } KVAR (current_kboard, Vlast_prefix_arg) = Vcurrent_prefix_arg; - /* Note that the value cell will never directly contain nil - if the symbol is a local variable. */ - if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) - safe_run_hooks (Qpost_command_hook); + safe_run_hooks (Qpost_command_hook); /* If displaying a message, resize the echo area window to fit that message's size exactly. */ if (!NILP (echo_area_buffer[0])) resize_echo_area_exactly (); - if (!NILP (Vdeferred_action_list)) - safe_run_hooks (Qdeferred_action_function); + safe_run_hooks (Qdeferred_action_function); /* If there is a prefix argument, 1) We don't want Vlast_command to be ``universal-argument'' @@ -1621,7 +1614,10 @@ } if (current_buffer != prev_buffer || MODIFF != prev_modiff) - call1 (Vrun_hooks, intern ("activate-mark-hook")); + { + Lisp_Object hook = intern ("activate-mark-hook"); + Frun_hooks (1, &hook); + } } Vsaved_region_selection = Qnil; @@ -1819,9 +1815,7 @@ static Lisp_Object safe_run_hooks_1 (void) { - if (NILP (Vrun_hooks)) - return Qnil; - return call1 (Vrun_hooks, Vinhibit_quit); + return Frun_hooks (1, &Vinhibit_quit); } /* Subroutine for safe_run_hooks: handle an error by clearing out the hook. */ @@ -10129,11 +10123,11 @@ if (SYMBOLP (cmd)) { tem = Fget (cmd, Qdisabled); - if (!NILP (tem) && !NILP (Vrun_hooks)) + if (!NILP (tem)) { tem = Fsymbol_value (Qdisabled_command_function); if (!NILP (tem)) - return call1 (Vrun_hooks, Qdisabled_command_function); + return Frun_hooks (1, &Qdisabled_command_function); } } @@ -10617,6 +10611,7 @@ int old_height, old_width; int width, height; struct gcpro gcpro1; + Lisp_Object hook; if (tty_list && tty_list->next) error ("There are other tty frames open; close them before suspending Emacs"); @@ -10625,8 +10620,8 @@ CHECK_STRING (stuffstring); /* Run the functions in suspend-hook. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("suspend-hook")); + hook = intern ("suspend-hook"); + Frun_hooks (1, &hook); GCPRO1 (stuffstring); get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height); @@ -10650,8 +10645,8 @@ change_frame_size (SELECTED_FRAME (), height, width, 0, 0, 0); /* Run suspend-resume-hook. */ - if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("suspend-resume-hook")); + hook = intern ("suspend-resume-hook"); + Frun_hooks (1, &hook); UNGCPRO; return Qnil; === modified file 'src/minibuf.c' --- src/minibuf.c 2011-03-20 13:57:22 +0000 +++ src/minibuf.c 2011-03-23 10:06:57 +0000 @@ -649,12 +649,7 @@ if (STRINGP (input_method) && !NILP (Ffboundp (Qactivate_input_method))) call1 (Qactivate_input_method, input_method); - /* Run our hook, but not if it is empty. - (run-hooks would do nothing if it is empty, - but it's important to save time here in the usual case.) */ - if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound) - && !NILP (Vrun_hooks)) - call1 (Vrun_hooks, Qminibuffer_setup_hook); + Frun_hooks (1, &Qminibuffer_setup_hook); /* Don't allow the user to undo past this point. */ BVAR (current_buffer, undo_list) = Qnil; @@ -806,10 +801,7 @@ static Lisp_Object run_exit_minibuf_hook (Lisp_Object data) { - if (!NILP (Vminibuffer_exit_hook) && !EQ (Vminibuffer_exit_hook, Qunbound) - && !NILP (Vrun_hooks)) - safe_run_hooks (Qminibuffer_exit_hook); - + safe_run_hooks (Qminibuffer_exit_hook); return Qnil; } === modified file 'src/term.c' --- src/term.c 2011-03-11 09:41:56 +0000 +++ src/term.c 2011-03-23 10:06:57 +0000 @@ -2500,13 +2500,10 @@ /* First run `suspend-tty-functions' and then clean up the tty state because `suspend-tty-functions' might need to change the tty state. */ - if (!NILP (Vrun_hooks)) - { - Lisp_Object args[2]; - args[0] = intern ("suspend-tty-functions"); - XSETTERMINAL (args[1], t); - Frun_hook_with_args (2, args); - } + Lisp_Object args[2]; + args[0] = intern ("suspend-tty-functions"); + XSETTERMINAL (args[1], t); + Frun_hook_with_args (2, args); reset_sys_modes (t->display_info.tty); delete_keyboard_wait_descriptor (fileno (f)); @@ -2596,14 +2593,13 @@ init_sys_modes (t->display_info.tty); - /* Run `resume-tty-functions'. */ - if (!NILP (Vrun_hooks)) - { - Lisp_Object args[2]; - args[0] = intern ("resume-tty-functions"); - XSETTERMINAL (args[1], t); - Frun_hook_with_args (2, args); - } + { + /* Run `resume-tty-functions'. */ + Lisp_Object args[2]; + args[0] = intern ("resume-tty-functions"); + XSETTERMINAL (args[1], t); + Frun_hook_with_args (2, args); + } } set_tty_hooks (t); === modified file 'src/window.c' --- src/window.c 2011-03-08 00:06:36 +0000 +++ src/window.c 2011-03-23 10:06:57 +0000 @@ -3690,27 +3690,23 @@ /* Run temp-buffer-show-hook, with the chosen window selected and its buffer current. */ - - if (!NILP (Vrun_hooks) - && !NILP (Fboundp (Qtemp_buffer_show_hook)) - && !NILP (Fsymbol_value (Qtemp_buffer_show_hook))) - { - int count = SPECPDL_INDEX (); - Lisp_Object prev_window, prev_buffer; - prev_window = selected_window; - XSETBUFFER (prev_buffer, old); - - /* Select the window that was chosen, for running the hook. - Note: Both Fselect_window and select_window_norecord may - set-buffer to the buffer displayed in the window, - so we need to save the current buffer. --stef */ - record_unwind_protect (Fset_buffer, prev_buffer); - record_unwind_protect (select_window_norecord, prev_window); - Fselect_window (window, Qt); - Fset_buffer (w->buffer); - call1 (Vrun_hooks, Qtemp_buffer_show_hook); - unbind_to (count, Qnil); - } + { + int count = SPECPDL_INDEX (); + Lisp_Object prev_window, prev_buffer; + prev_window = selected_window; + XSETBUFFER (prev_buffer, old); + + /* Select the window that was chosen, for running the hook. + Note: Both Fselect_window and select_window_norecord may + set-buffer to the buffer displayed in the window, + so we need to save the current buffer. --stef */ + record_unwind_protect (Fset_buffer, prev_buffer); + record_unwind_protect (select_window_norecord, prev_window); + Fselect_window (window, Qt); + Fset_buffer (w->buffer); + Frun_hooks (1, &Qtemp_buffer_show_hook); + unbind_to (count, Qnil); + } } } ------------------------------------------------------------ revno: 103730 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-03-23 00:58:05 -0700 message: * autogen/update_autogen (msg): Remove function; use `exec' instead. diff: === modified file 'ChangeLog' --- ChangeLog 2011-03-23 06:40:56 +0000 +++ ChangeLog 2011-03-23 07:58:05 +0000 @@ -1,6 +1,7 @@ 2011-03-23 Glenn Morris * autogen/update_autogen: Fix typo. + (msg): Remove function; use `exec' instead. * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. === modified file 'autogen/update_autogen' --- autogen/update_autogen 2011-03-23 06:40:56 +0000 +++ autogen/update_autogen 2011-03-23 07:58:05 +0000 @@ -104,14 +104,10 @@ [ $# -eq 0 ] || die "Wrong number of arguments" -function msg () -{ - [ "$quiet" ] && return 0 - echo "$@" -} # function msg - - -msg "Running bzr status..." +[ "$quiet" ] && exec 1> /dev/null + + +echo "Running bzr status..." bzr status -S $sources >| $tempfile || die "bzr status error for sources" @@ -119,7 +115,7 @@ case $stat in M) - msg "Locally modified: $file" + echo "Locally modified: $file" [ "$force" ] || die "There are local modifications" ;; @@ -128,7 +124,7 @@ done < $tempfile -msg "Running autoreconf..." +echo "Running autoreconf..." autoreconf -I m4 || die "autoreconf error" @@ -138,6 +134,7 @@ cd autogen +echo "Checking status of generated files..." bzr status -S $basegen >| $tempfile || \ die "bzr status error for generated files" @@ -155,28 +152,25 @@ [ "$modified" ] || { - msg "No files were modified" + echo "No files were modified" exit 0 } -msg "Modified file(s): $modified" +echo "Modified file(s): $modified" [ "$commit" ] || exit 0 -msg "Committing..." +echo "Committing..." ## bzr status output is annoyingly always relative to top-level, not PWD. cd ../ -opt= -[ "$quiet" ] && opt=-q - -bzr commit $opt -m "Auto-commit of generated files." $modified || \ +bzr commit -m "Auto-commit of generated files." $modified || \ die "bzr commit error" -msg "Committed files: $modified" +echo "Committed files: $modified" exit ------------------------------------------------------------ revno: 103729 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-03-22 23:40:56 -0700 message: * autogen/update_autogen: Fix typo. diff: === modified file 'ChangeLog' --- ChangeLog 2011-03-23 03:09:55 +0000 +++ ChangeLog 2011-03-23 06:40:56 +0000 @@ -1,5 +1,7 @@ 2011-03-23 Glenn Morris + * autogen/update_autogen: Fix typo. + * Makefile.in (mkdir): Use `install-sh -d' instead of mkinstalldirs. (sync-from-gnulib): Don't sync mkinstalldirs. * make-dist: Don't distribute mkinstalldirs. === modified file 'autogen/update_autogen' --- autogen/update_autogen 2011-03-21 00:08:01 +0000 +++ autogen/update_autogen 2011-03-23 06:40:56 +0000 @@ -170,7 +170,7 @@ cd ../ opt= -[ "$quiet" ] || opt=-q +[ "$quiet" ] && opt=-q bzr commit $opt -m "Auto-commit of generated files." $modified || \ die "bzr commit error"