Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102691. ------------------------------------------------------------ revno: 102691 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-12-20 11:18:56 +0800 message: Move color.el out of the gnus/ tree. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-20 00:20:25 +0000 +++ lisp/ChangeLog 2010-12-20 03:18:56 +0000 @@ -1,5 +1,9 @@ 2010-12-20 Chong Yidong + * color.el: Move from gnus/. + +2010-12-20 Chong Yidong + * vc/diff.el (diff-better-file-name): Function deleted. abbreviating file names causes problems with shell-quote-argument. (diff-no-select): Just use expand-file-name. === renamed file 'lisp/gnus/color.el' => 'lisp/color.el' ------------------------------------------------------------ revno: 102690 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-12-20 08:20:25 +0800 message: Fix 2010-11-22 change to diff.el. * vc/diff.el (diff-better-file-name): Function deleted. abbreviating file names causes problems with shell-quote-argument. (diff-no-select): Just use expand-file-name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-20 00:17:26 +0000 +++ lisp/ChangeLog 2010-12-20 00:20:25 +0000 @@ -1,7 +1,7 @@ 2010-12-20 Chong Yidong - * vc/diff.el (diff-better-file-name): Function deleted; - abbreviating file name creates problems with shell-quote-argument. + * vc/diff.el (diff-better-file-name): Function deleted. + abbreviating file names causes problems with shell-quote-argument. (diff-no-select): Just use expand-file-name. * tool-bar.el (tool-bar--image-expression): New function. === modified file 'lisp/vc/diff.el' --- lisp/vc/diff.el 2010-12-03 03:01:16 +0000 +++ lisp/vc/diff.el 2010-12-20 00:20:25 +0000 @@ -110,18 +110,10 @@ tempfile)) (file-local-copy file-or-buf))) -(defun diff-better-file-name (file) - (if (bufferp file) file - (let ((rel (file-relative-name file)) - (abbr (abbreviate-file-name (expand-file-name file)))) - (if (< (length abbr) (length rel)) - abbr - rel)))) - (defun diff-no-select (old new &optional switches no-async buf) ;; Noninteractive helper for creating and reverting diff buffers - (setq new (diff-better-file-name new) - old (diff-better-file-name old)) + (unless (bufferp new) (setq new (expand-file-name new))) + (unless (bufferp old) (setq old (expand-file-name old))) (or switches (setq switches diff-switches)) ; If not specified, use default. (unless (listp switches) (setq switches (list switches))) (or buf (setq buf (get-buffer-create "*Diff*"))) ------------------------------------------------------------ revno: 102689 committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-12-20 08:17:26 +0800 message: Implement tool-bar separators for non-GTK tool-bars. * lisp/tool-bar.el (tool-bar--image-expression): New function. (tool-bar-local-item, tool-bar--image-exp): Use it. (tool-bar-setup): Initialize tool-bar-separator-image-expression. Use :enable instead of :visible to avoid changing the tool-bar configuration unnecessarily. * src/keyboard.c (Vtool_bar_separator_image_expression): New variable. (parse_tool_bar_item): Use it to obtain image separators for displays not using native tool-bar separators. * src/xdisp.c (build_desired_tool_bar_string): Don't handle separators specially, since this is now done in parse_tool_bar_item. * lisp/info.el (info-tool-bar-map): Add separators. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2010-12-14 20:42:57 +0000 +++ etc/ChangeLog 2010-12-20 00:17:26 +0000 @@ -1,3 +1,7 @@ +2010-12-18 Chong Yidong + + * images/separator.xpm: Tweak colors. + 2010-12-14 Michael Albinus * NEWS: Mention new Tramp method "ksu". === modified file 'etc/NEWS' --- etc/NEWS 2010-12-17 04:04:06 +0000 +++ etc/NEWS 2010-12-20 00:17:26 +0000 @@ -692,9 +692,7 @@ ** Tool-bars can display separators. Tool-bar separators are handled like menu separators in menu-bar maps, -i.e. with entries of the form `(menu-item "--")'. - -Currently, tool-bar separators are only displayed on GTK. +i.e. via menu entries of the form `(menu-item "--")'. ** Image API === modified file 'etc/images/separator.xpm' --- etc/images/separator.xpm 2006-03-28 19:15:30 +0000 +++ etc/images/separator.xpm 2010-12-20 00:17:26 +0000 @@ -2,29 +2,29 @@ static char * separator_xpm[] = { "2 24 3 1", " c None", -". c #DBD3CB", -"+ c #FCFBFA", -" ", -" ", -" ", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -".+", -" ", +". c #888888", +"+ c #FFFFFF", +" ", +" ", +".+ ", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", +".+", " ", " "}; === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-18 20:39:05 +0000 +++ lisp/ChangeLog 2010-12-20 00:17:26 +0000 @@ -1,3 +1,17 @@ +2010-12-20 Chong Yidong + + * vc/diff.el (diff-better-file-name): Function deleted; + abbreviating file name creates problems with shell-quote-argument. + (diff-no-select): Just use expand-file-name. + + * tool-bar.el (tool-bar--image-expression): New function. + (tool-bar-local-item, tool-bar--image-exp): Use it. + (tool-bar-setup): Initialize tool-bar-separator-image-expression. + Use :enable instead of :visible to avoid changing the tool-bar + configuration unnecessarily. + + * info.el (info-tool-bar-map): Add separators. + 2010-12-17 Ken Brown * loadup.el: Use version numbers in Cygwin build. === modified file 'lisp/info.el' --- lisp/info.el 2010-11-20 14:51:25 +0000 +++ lisp/info.el 2010-12-20 00:17:26 +0000 @@ -3769,14 +3769,17 @@ :rtl "left-arrow" :label "Forward" :vert-only t) + (define-key-after map [separator-1] menu-bar-separator) (tool-bar-local-item-from-menu 'Info-prev "prev-node" map Info-mode-map :rtl "next-node") (tool-bar-local-item-from-menu 'Info-next "next-node" map Info-mode-map :rtl "prev-node") (tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map :vert-only t) + (define-key-after map [separator-2] menu-bar-separator) (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map) + (define-key-after map [separator-3] menu-bar-separator) (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map :label "Index Search") (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map) === modified file 'lisp/tool-bar.el' --- lisp/tool-bar.el 2010-12-17 04:04:06 +0000 +++ lisp/tool-bar.el 2010-12-20 00:17:26 +0000 @@ -139,6 +139,26 @@ To define items in any other map, use `tool-bar-local-item'." (apply 'tool-bar-local-item icon def key tool-bar-map props)) +(defun tool-bar--image-expression (icon) + "Return an expression that evaluates to an image spec for ICON." + (let* ((fg (face-attribute 'tool-bar :foreground)) + (bg (face-attribute 'tool-bar :background)) + (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) + (if (eq bg 'unspecified) nil (list :background bg)))) + (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) + (xpm-lo-spec (list :type 'xpm :file + (concat "low-color/" icon ".xpm"))) + (pbm-spec (append (list :type 'pbm :file + (concat icon ".pbm")) colors)) + (xbm-spec (append (list :type 'xbm :file + (concat icon ".xbm")) colors))) + `(find-image (cond ((not (display-color-p)) + ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) + ((< (display-color-cells) 256) + ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) + (t + ',(list xpm-spec pbm-spec xbm-spec)))))) + ;;;###autoload (defun tool-bar-local-item (icon def key map &rest props) "Add an item to the tool bar in map MAP. @@ -151,24 +171,7 @@ function will first try to use low-color/ICON.xpm if `display-color-cells' is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally ICON.xbm, using `find-image'." - (let* ((fg (face-attribute 'tool-bar :foreground)) - (bg (face-attribute 'tool-bar :background)) - (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) - (if (eq bg 'unspecified) nil (list :background bg)))) - (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) - (xpm-lo-spec (list :type 'xpm :file - (concat "low-color/" icon ".xpm"))) - (pbm-spec (append (list :type 'pbm :file - (concat icon ".pbm")) colors)) - (xbm-spec (append (list :type 'xbm :file - (concat icon ".xbm")) colors)) - (image-exp `(find-image - (cond ((not (display-color-p)) - ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) - ((< (display-color-cells) 256) - ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) - (t - ',(list xpm-spec pbm-spec xbm-spec)))))) + (let* ((image-exp (tool-bar--image-expression icon))) (define-key-after map (vector key) `(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props)))) @@ -203,24 +206,7 @@ (setq from-map global-map)) (let* ((menu-bar-map (lookup-key from-map [menu-bar])) (keys (where-is-internal command menu-bar-map)) - (fg (face-attribute 'tool-bar :foreground)) - (bg (face-attribute 'tool-bar :background)) - (colors (nconc (if (eq fg 'unspecified) nil (list :foreground fg)) - (if (eq bg 'unspecified) nil (list :background bg)))) - (xpm-spec (list :type 'xpm :file (concat icon ".xpm"))) - (xpm-lo-spec (list :type 'xpm :file - (concat "low-color/" icon ".xpm"))) - (pbm-spec (append (list :type 'pbm :file - (concat icon ".pbm")) colors)) - (xbm-spec (append (list :type 'xbm :file - (concat icon ".xbm")) colors)) - (image-exp `(find-image - (cond ((not (display-color-p)) - ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)) - ((< (display-color-cells) 256) - ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec)) - (t - ',(list xpm-spec pbm-spec xbm-spec))))) + (image-exp (tool-bar--image-expression icon)) submap key) ;; We'll pick up the last valid entry in the list of keys if ;; there's more than one. @@ -257,32 +243,34 @@ ;;; Set up some global items. Additions/deletions up for grabs. (defun tool-bar-setup () + (setq tool-bar-separator-image-expression + (tool-bar--image-expression "separator")) (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File" :vert-only t) (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil :label "Open" :vert-only t) (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t) (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t) - (tool-bar-add-item-from-menu 'save-buffer "save" nil :vert-only t + (tool-bar-add-item-from-menu 'save-buffer "save" nil :label "Save" - :visible '(or buffer-file-name + :enable '(or buffer-file-name (not (eq 'special (get major-mode 'mode-class))))) (define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator) (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t - :visible '(not (eq 'special (get major-mode + :enable '(not (eq 'special (get major-mode 'mode-class)))) (define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) "cut" nil :vert-only t - :visible '(not (eq 'special (get major-mode + :enable '(not (eq 'special (get major-mode 'mode-class)))) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) "copy" nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) "paste" nil :vert-only t - :visible '(not (eq 'special (get major-mode + :enable '(not (eq 'special (get major-mode 'mode-class)))) (define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator) (tool-bar-add-item-from-menu 'nonincremental-search-forward "search" === modified file 'src/ChangeLog' --- src/ChangeLog 2010-12-19 05:43:42 +0000 +++ src/ChangeLog 2010-12-20 00:17:26 +0000 @@ -1,3 +1,12 @@ +2010-12-20 Chong Yidong + + * keyboard.c (Vtool_bar_separator_image_expression): New variable. + (parse_tool_bar_item): Use it to obtain image separators for + displays not using native tool-bar separators. + + * xdisp.c (build_desired_tool_bar_string): Don't handle separators + specially, since this is now done in parse_tool_bar_item. + 2010-12-19 Stefan Monnier Minor clean up to silence some gcc warnings. === modified file 'src/keyboard.c' --- src/keyboard.c 2010-12-17 04:04:06 +0000 +++ src/keyboard.c 2010-12-20 00:17:26 +0000 @@ -212,6 +212,12 @@ /* List of items that should move to the end of the menu bar. */ Lisp_Object Vmenu_bar_final_items; +/* Expression to evaluate for the tool bar separator image. + This is used for build_desired_tool_bar_string only. For GTK, we + use GTK tool bar seperators. */ + +Lisp_Object Vtool_bar_separator_image_expression; + /* Non-nil means show the equivalent key-binding for any M-x command that has one. The value can be a length of time to show the message for. @@ -8294,6 +8300,15 @@ if (menu_separator_name_p (SDATA (caption))) { PROP (TOOL_BAR_ITEM_TYPE) = Qt; +#if !defined (USE_GTK) && !defined (HAVE_NS) + /* If we use build_desired_tool_bar_string to render the + tool bar, the separator is rendered as an image. */ + PROP (TOOL_BAR_ITEM_IMAGES) + = menu_item_eval_property (Vtool_bar_separator_image_expression); + PROP (TOOL_BAR_ITEM_ENABLED_P) = Qnil; + PROP (TOOL_BAR_ITEM_SELECTED_P) = Qnil; + PROP (TOOL_BAR_ITEM_CAPTION) = Qnil; +#endif return 1; } return 0; @@ -12151,6 +12166,12 @@ The elements of the list are event types that may have menu bar bindings. */); Vmenu_bar_final_items = Qnil; + DEFVAR_LISP ("tool-bar-separator-image-expression", &Vtool_bar_separator_image_expression, + doc: /* Expression evaluating to the image spec for a tool-bar separator. +This is used internally by graphical displays that do not render +tool-bar separators natively. Otherwise it is unused (e.g. on GTK). */); + Vtool_bar_separator_image_expression = Qnil; + DEFVAR_KBOARD ("overriding-terminal-local-map", Voverriding_terminal_local_map, doc: /* Per-terminal keymap that overrides all other local keymaps. === modified file 'src/xdisp.c' --- src/xdisp.c 2010-12-17 04:04:06 +0000 +++ src/xdisp.c 2010-12-20 00:17:26 +0000 @@ -10317,10 +10317,6 @@ int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); int hmargin, vmargin, relief, idx, end; - /* Ignore separator items. */ - if (EQ (PROP (TOOL_BAR_ITEM_TYPE), Qt)) - continue; - /* If image is a vector, choose the image according to the button state. */ image = PROP (TOOL_BAR_ITEM_IMAGES); @@ -10495,7 +10491,7 @@ row->used[TEXT_AREA] = n_glyphs_before; *it = it_before; /* If this is the only glyph on this line, it will never fit on the - toolbar, so skip it. But ensure there is at least one glyph, + tool-bar, so skip it. But ensure there is at least one glyph, so we don't accidentally disable the tool-bar. */ if (n_glyphs_before == 0 && (it->vpos > 0 || IT_STRING_CHARPOS (*it) < it->end_charpos-1)) @@ -26885,7 +26881,7 @@ tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF; DEFVAR_LISP ("tool-bar-style", &Vtool_bar_style, - doc: /* *Tool bar style to use. + doc: /* Tool bar style to use. It can be one of image - show images only text - show text only ------------------------------------------------------------ revno: 102688 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2010-12-19 00:43:42 -0500 message: Minor clean up to silence some gcc warnings. * src/window.c (Fset_window_buffer): * src/xterm.c (x_set_frame_alpha): Restructure code to silence compiler warning. (handle_one_xevent): Remove unused var `p'. (do_ewmh_fullscreen): Remove unused var `lval'. (xembed_set_info): Remove unused var `atom'. * src/textprop.c (Fremove_list_of_text_properties): Add braces to silence compiler warning. * src/fontset.c (fontset_id_valid_p, dump_fontset): * src/ftfont.c (ftfont_drive_otf): Modernize k&r declaration. * src/eval.c (Feval, Ffuncall): Avoid unneeded gotos. * src/dispnew.c (update_frame, update_frame_1): Compile the `do_pause' label only when it's used. * src/image.c (x_create_bitmap_from_xpm_data): * src/dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like its callers. * src/coding.c (detect_coding_utf_16): Remove unused vars `src_base' and `consumed_chars'. (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. (decode_coding_emacs_mule): Remove unused label `retry'. (detect_eol): Add parens to silence compiler warning. * src/alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where it's used to silence the compiler. (make_number): Modernize k&r declaration. (mark_char_table): Add parens to silence compiler warning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-12-17 04:04:06 +0000 +++ src/ChangeLog 2010-12-19 05:43:42 +0000 @@ -1,3 +1,32 @@ +2010-12-19 Stefan Monnier + + Minor clean up to silence some gcc warnings. + * window.c (Fset_window_buffer): + * xterm.c (x_set_frame_alpha): Restructure code to silence + compiler warning. + (handle_one_xevent): Remove unused var `p'. + (do_ewmh_fullscreen): Remove unused var `lval'. + (xembed_set_info): Remove unused var `atom'. + * textprop.c (Fremove_list_of_text_properties): Add braces to silence + compiler warning. + * fontset.c (fontset_id_valid_p, dump_fontset): + * ftfont.c (ftfont_drive_otf): Modernize k&r declaration. + * eval.c (Feval, Ffuncall): Avoid unneeded gotos. + * dispnew.c (update_frame, update_frame_1): Compile the `do_pause' + label only when it's used. + * image.c (x_create_bitmap_from_xpm_data): + * dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like + its callers. + * coding.c (detect_coding_utf_16): Remove unused vars `src_base' and + `consumed_chars'. + (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. + (decode_coding_emacs_mule): Remove unused label `retry'. + (detect_eol): Add parens to silence compiler warning. + * alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where + it's used to silence the compiler. + (make_number): Modernize k&r declaration. + (mark_char_table): Add parens to silence compiler warning. + 2010-12-17 Chong Yidong * keyboard.c (parse_tool_bar_item): Allow menu separators in @@ -12,8 +41,8 @@ (xg_update_menu_item, xg_tool_bar_menu_proxy) (xg_show_toolbar_item, update_frame_tool_bar): Use it. (separator_names, xg_separator_p): Move to keyboard.c. - (create_menus, xg_update_submenu, update_frame_tool_bar): Use - menu_separator_name_p. + (create_menus, xg_update_submenu, update_frame_tool_bar): + Use menu_separator_name_p. * nsmenu.m (name_is_separator): Function deleted. (addItemWithWidgetValue): Use menu_separator_name_p. @@ -947,8 +976,8 @@ strings and R2L glyph rows. Fix comments. (note_mouse_highlight): When bidi reordering is turned on in a buffer, call next-single-property-change and - previous-single-property-change with last argument nil. Clear - mouse highlight when mouse pointer is in a R2L row on the stretch + previous-single-property-change with last argument nil. + Clear mouse highlight when mouse pointer is in a R2L row on the stretch glyph that stands for no text beyond the line end. (row_containing_pos): Don't return too early when CHARPOS is in a bidi-reordered continued line. Return immediately when the first @@ -1391,8 +1420,8 @@ 2010-09-30 Lars Magne Ingebrigtsen - * eval.c (Fbacktrace): Don't overwrite print-level on exit. Also - only override Vprint_level if it isn't already bound, and increase + * eval.c (Fbacktrace): Don't overwrite print-level on exit. + Also only override Vprint_level if it isn't already bound, and increase the level to 8 to produce more useful backtraces for bug reports. 2010-09-30 Dan Nicolaescu @@ -1531,7 +1560,7 @@ 2010-09-27 Lars Magne Ingebrigtsen - * gnutls.c (gnutls_log_function): Added more debugging. + * gnutls.c (gnutls_log_function): Add more debugging. (emacs_gnutls_read): Don't infloop while reading. 2010-09-27 Kenichi Handa @@ -1573,7 +1602,7 @@ * process.c (gpm_wait_mask, max_gpm_desc): Remove. (write_mask): New variable. - (max_input_desc): Renamed from max_keyboard_desc. + (max_input_desc): Rename from max_keyboard_desc. (fd_callback_info): New variable. (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): New functions. @@ -2192,7 +2221,7 @@ 2010-09-14 Lars Magne Ingebrigtsen - * xml.c (parse_buffer): Renamed to parse_string(), since that's + * xml.c (parse_buffer): Rename to parse_string(), since that's what it does. (parse_string): Return nil when the document can't be parsed. @@ -3350,7 +3379,7 @@ (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. (xg_create_frame_widgets): Create a hobox for placing widgets vertically. Use gtk_box_pack_start. - (xg_height_or_width_changed): Renamed from xg_height_changed. + (xg_height_or_width_changed): Rename from xg_height_changed. (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. (xg_update_frame_menubar, free_frame_menubar): Change to xg_height_or_width_changed. @@ -3990,7 +4019,7 @@ (Ffont_get): If KEY is :otf and the font-object doesn't have the property, get the property value dynamically. (Ffont_put): Accept font-entity and font-object too. - (Ffont_get_glyhphs): Renamed from Fget_font_glyphs. Arguments and + (Ffont_get_glyhphs): Rename from Fget_font_glyphs. Arguments and return value changed. (syms_of_font): Adjust for the above change. @@ -4063,7 +4092,7 @@ * doprnt.c (doprnt): Take a va_list argument instead of count and pointer. * eval.c (error): Change to a standard-C variadic function. - * xdisp.c (vmessage): Renamed from message, made static, and + * xdisp.c (vmessage): Rename from message, made static, and changed to take a va_list argument. (message): New variadic wrapper. (message_nolog): Now a variadic function, calling vmessage. @@ -5076,8 +5105,8 @@ * xdisp.c (try_scrolling): Compute the limit for searching point in forward scroll from scroll_max, instead of an arbitrary limit - of 10 screen lines. See - http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html + of 10 screen lines. + See http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html and http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html for details. @@ -5325,8 +5354,8 @@ Fix cursor motion in bidi-reordered continued lines. * xdisp.c (try_cursor_movement): Backup to non-continuation line only after finding point's row. Fix the logic. Rewrite the loop - over continuation lines in bidi-reordered buffers. Return - CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, + over continuation lines in bidi-reordered buffers. + Return CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, rather than CURSOR_MOVEMENT_CANNOT_BE_USED. 2010-05-28 Michael Albinus @@ -6445,13 +6474,13 @@ store_config_changed_event. (parse_settings): Rename from parse_xft_settings. Read non-xft xsettings outside #ifdef HAVE_XFT. - (read_settings): Renamed from read_xft_settings. + (read_settings): Rename from read_xft_settings. (apply_xft_settings): Take current settings as parameter. Do not call read_(xft)_settings. (read_and_apply_settings): New function. (xft_settings_event): Do non-xft stuff out of HAVE_XFT. Call read_and_apply_settings if there are settings to be read. - (init_xsettings): Renamed from init_xfd_settings. + (init_xsettings): Rename from init_xfd_settings. Call read_and_apply_settings unconditionally. (xsettings_initialize): Call init_xsettings. (Ftool_bar_get_system_style): New function. @@ -9607,7 +9636,7 @@ * makefile.w32-in ($(BLD)/doc.$(O)): Depend on buildobj.h, not on $(SRC)/buildobj.h. - (buildobj.h): Renamed from $(SRC)/buildobj.h. + (buildobj.h): Rename from $(SRC)/buildobj.h. (make-buildobj-CMD, make-buildobj-SH): Create buildobj.h, not $(SRC)/buildobj.h. (clean): Add buildobj.h. @@ -12651,12 +12680,12 @@ 2008-12-13 Kenichi Handa - * font.c (font_rescale_ratio): Moved from xfaces.c. + * font.c (font_rescale_ratio): Move from xfaces.c. Argument type changed. Handle a font-spec too. (font_score): Check Vface_font_rescale_alist. (font_open_entity): Likewise. (Bug#1547) - * xfaces.c (font_rescale_ratio): Moved to font.c. + * xfaces.c (font_rescale_ratio): Move to font.c. 2008-12-13 Chong Yidong @@ -12674,7 +12703,7 @@ 2008-12-11 Chong Yidong - * term.c (tty_free_frame_resources): Renamed from delete_tty_output; + * term.c (tty_free_frame_resources): Rename from delete_tty_output; all callers changed. Call free_frame_faces to free the face cache. 2008-12-11 Jason Rumney @@ -18004,7 +18033,7 @@ (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC) (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros. (struct font_spec, struct font_entity): New structs. - (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h. + (FONT_ENCODING_NOT_DECIDED): Move from fontset.h. (struct font): Many members from old "struct font_info" moved to here. Members font and entity deleted. (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for @@ -18012,7 +18041,7 @@ (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT) (CHECK_FONT_GET_OBJECT): Likewise. (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros. - (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h. + (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move from font.h. (struct font_driver): New members case_sensitive anc check. Type of the member list and open changed. (enable_font_backend, font_symbolic_weight, font_symbolic_slant) @@ -18024,7 +18053,7 @@ (enable_font_backend): Delete it. (Qfont_spec, Qfont_entity, Qfont_object): New variables. (CHECK_VALIDATE_FONT_SPEC): Delete it. - (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h. + (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move to font.h. (null_string): Delete it. (null_vector): Make it static. (font_family_alist): Delete it. @@ -18032,7 +18061,7 @@ (QCextra, QClanguage): Delete it. (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables. (font_make_spec, font_make_entity, font_make_object) - (font_intern_prop): Renamed from intern_downcase. Don't downcase + (font_intern_prop): Rename from intern_downcase. Don't downcase the string. Callers changed. (font_pixel_size): Adjust for the format change of font-related objects. @@ -18052,7 +18081,7 @@ (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd) (font_parse_fcname, font_unparse_fcname) (font_prepare_composition): Likewise. - (font_parse_family_registry): Renamed from font_merge_old_spec. + (font_parse_family_registry): Rename from font_merge_old_spec. (otf_open): Delete the 1st arg entity. (font_otf_capability): Adjust for the above change. (font_score): New arg alternate_families. Adjusted for the change @@ -18080,7 +18109,7 @@ (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts) (Ffont_xlfd_name): Adjust for the change of font-related objects. (Fcopy_font_spec, Fmerge_font_spec): New function. - (Ffont_family_list): Renamed from list-families. + (Ffont_family_list): Rename from list-families. (Finternal_set_font_style_table): Arguments changed. (Ffont_fill_gstring, Ffont_shape_text, Fopen_font) (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjust for the @@ -18089,7 +18118,7 @@ * fontset.h (struct font_info): Delete it. Most members go to struct font. - (FONT_ENCODING_NOT_DECIDED): Moved to font.h. + (FONT_ENCODING_NOT_DECIDED): Move to font.h. (enum FONT_SPEC_INDEX): Delete it. (font_info, list_fonts_func, load_font_func, query_font_func) (set_frame_fontset_func, find_ccl_program_func) @@ -18131,7 +18160,7 @@ (Fnew_fontset): Use font_unparse_xlfd to generate FONTSET_ASCII (fontset). (new_fontset_from_font_name): Deleted. - (fontset_from_font): Renamed from new_fontset_from_font. Check if + (fontset_from_font): Rename from new_fontset_from_font. Check if a fontset is already created for the font. FIx updating of Vfontset_alias_alist. (fontset_ascii_font): Deleted. @@ -18240,7 +18269,7 @@ by FONTP. (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. (set_lface_from_font_name): Delete it. - (set_lface_from_font): Renamed from + (set_lface_from_font): Rename from set_lface_from_font_and_fontset. Caller changed. Don't set LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable for face. @@ -18281,12 +18310,12 @@ * xfont.c: Include and "ccl.h". (struct xfont_info): New structure. (xfont_query_font): Deleted. - (xfont_find_ccl_program): Renamed from x_find_ccl_program and + (xfont_find_ccl_program): Rename from x_find_ccl_program and moved from xterm.c. (xfont_driver): Adjust for the change of struct font_driver. (compare_font_names): New function. - (xfont_list_pattern): Sort font names case insensitively. Make - font_entity by calling font_make_entity. Avoid auto-scaled fonts. + (xfont_list_pattern): Sort font names case insensitively. + Make font_entity by calling font_make_entity. Avoid auto-scaled fonts. (xfont_list): Return a list, not vector. (xfont_match): If the font doesn't have QCname property, generate a name from the other font properties. @@ -18334,12 +18363,12 @@ (x_draw_composite_glyph_string_foreground): Likewise. (x_draw_glyph_string): Likewise. Use font->underline_position and font->underline_thickness. - (x_new_font): Renamed from x_new_fontset2. + (x_new_font): Rename from x_new_fontset2. (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. (x_check_font): Call `check' method of a font driver. (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) (x_query_font, x_get_font_repertory): Deleted. - (x_find_ccl_program): Renamed and moved to xfont.c. + (x_find_ccl_program): Rename and moved to xfont.c. (x_redisplay_interface): Adjust for the change of `struct redisplay_interface'. @@ -18364,7 +18393,7 @@ (w32font_close): Don't free struct font. Adjusted for the change of struct w32font_info. (w32font_encode_char, w32font_text_extents, w32font_draw): - Adjusted for the change of struct w32font_info. + Adjust for the change of struct w32font_info. (w32font_draw): Likewise. (w32font_list_internal): Return a list, not vector. (w32font_open_internal): Change the 4th arg to font-object. @@ -19766,11 +19795,11 @@ * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call xg_frame_resized when the event is for the edit widget. - * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets. + * gtkutil.h (xg_frame_resized): Rename from xg_resize_widgets. * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or set_char_size. - (xg_frame_resized): Renamed from xg_resize_widgets. Remove all + (xg_frame_resized): Rename from xg_resize_widgets. Remove all operations on widgets here. Just set frame size if needed. (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions. (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing. @@ -22166,7 +22195,7 @@ * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to XLFD_XXX_INDEX. (enum xlfd_field_mask): New enum. - (intern_font_field): Changed argument. Change caller. If digits + (intern_font_field): Change argument. Change caller. If digits are followed by non-digits, return a symbol. (font_expand_wildcards): New function. (font_parse_xlfd): Fix wildcard handling. @@ -24906,8 +24935,8 @@ (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from DECODE_EMACS_MULE_COMPOSITION_RULE. Change caller. (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro. - (DECODE_EMACS_MULE_21_COMPOSITION): Call - DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation + (DECODE_EMACS_MULE_21_COMPOSITION): + Call DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation sequence. (decode_coding_emacs_mule): Handle composition correctly. Rewind `src' and `consumed_chars' correctly before calling emacs_mule_char. @@ -25328,7 +25357,7 @@ (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE. (GC_SUB_CHAR_TABLE_P): New macro. (Fencode_coding_string, Fdecode_coding_string): Update EXFUN. - (code_convert_string_norecord): Deleted extern. + (code_convert_string_norecord): Delete extern. (init_character_once, syms_of_character, init_charset) (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them. === modified file 'src/alloc.c' --- src/alloc.c 2010-11-27 20:04:57 +0000 +++ src/alloc.c 2010-12-19 05:43:42 +0000 @@ -143,8 +143,6 @@ static __malloc_size_t bytes_used_when_full; -static __malloc_size_t bytes_used_when_reconsidered; - /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ @@ -1140,6 +1138,8 @@ static void * (*old_realloc_hook) (void *, size_t, const void*); static void (*old_free_hook) (void*, const void*); +static __malloc_size_t bytes_used_when_reconsidered; + /* This function is used as the hook for free to call. */ static void @@ -1491,8 +1491,7 @@ can't create number objects in macros. */ #ifndef make_number Lisp_Object -make_number (n) - EMACS_INT n; +make_number (EMACS_INT n) { Lisp_Object obj; obj.s.val = n; @@ -5270,7 +5269,7 @@ { Lisp_Object val = ptr->contents[i]; - if (INTEGERP (val) || SYMBOLP (val) && XSYMBOL (val)->gcmarkbit) + if (INTEGERP (val) || (SYMBOLP (val) && XSYMBOL (val)->gcmarkbit)) continue; if (SUB_CHAR_TABLE_P (val)) { === modified file 'src/coding.c' --- src/coding.c 2010-11-27 20:04:57 +0000 +++ src/coding.c 2010-12-19 05:43:42 +0000 @@ -1607,10 +1607,9 @@ detect_coding_utf_16 (struct coding_system *coding, struct coding_detection_info *detect_info) { - const unsigned char *src = coding->source, *src_base = src; + const unsigned char *src = coding->source; const unsigned char *src_end = coding->source + coding->src_bytes; int multibytep = coding->src_multibyte; - int consumed_chars = 0; int c1, c2; detect_info->checked |= CATEGORY_MASK_UTF_16; @@ -2277,7 +2276,6 @@ #define DECODE_EMACS_MULE_21_COMPOSITION() \ do { \ enum composition_method method = c - 0xF2; \ - int *charbuf_base = charbuf; \ int nbytes, nchars; \ \ ONE_MORE_BYTE (c); \ @@ -2633,7 +2631,6 @@ } continue; - retry: src = src_base; consumed_chars = consumed_chars_base; continue; @@ -6260,8 +6257,9 @@ { /* The found type is different from what found before. Allow for stray ^M characters in DOS EOL files. */ - if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF - || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) + if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF) + || (eol_seen == EOL_SEEN_CRLF + && this_eol == EOL_SEEN_CR)) eol_seen = EOL_SEEN_CRLF; else { @@ -6276,42 +6274,40 @@ } } else - { - while (src < src_end) - { - c = *src++; - if (c == '\n' || c == '\r') - { - int this_eol; - - if (c == '\n') - this_eol = EOL_SEEN_LF; - else if (src >= src_end || *src != '\n') - this_eol = EOL_SEEN_CR; - else - this_eol = EOL_SEEN_CRLF, src++; - - if (eol_seen == EOL_SEEN_NONE) - /* This is the first end-of-line. */ - eol_seen = this_eol; - else if (eol_seen != this_eol) - { - /* The found type is different from what found before. - Allow for stray ^M characters in DOS EOL files. */ - if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF - || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) - eol_seen = EOL_SEEN_CRLF; - else - { - eol_seen = EOL_SEEN_LF; - break; - } - } - if (++total == MAX_EOL_CHECK_COUNT) - break; - } - } - } + while (src < src_end) + { + c = *src++; + if (c == '\n' || c == '\r') + { + int this_eol; + + if (c == '\n') + this_eol = EOL_SEEN_LF; + else if (src >= src_end || *src != '\n') + this_eol = EOL_SEEN_CR; + else + this_eol = EOL_SEEN_CRLF, src++; + + if (eol_seen == EOL_SEEN_NONE) + /* This is the first end-of-line. */ + eol_seen = this_eol; + else if (eol_seen != this_eol) + { + /* The found type is different from what found before. + Allow for stray ^M characters in DOS EOL files. */ + if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF) + || (eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR)) + eol_seen = EOL_SEEN_CRLF; + else + { + eol_seen = EOL_SEEN_LF; + break; + } + } + if (++total == MAX_EOL_CHECK_COUNT) + break; + } + } return eol_seen; } === modified file 'src/dispextern.h' --- src/dispextern.h 2010-12-17 04:04:06 +0000 +++ src/dispextern.h 2010-12-19 05:43:42 +0000 @@ -3131,7 +3131,7 @@ unsigned int, unsigned int); extern int x_create_bitmap_from_file (struct frame *, Lisp_Object); #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) -extern int x_create_bitmap_from_xpm_data (struct frame *f, char **bits); +extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits); #endif #ifndef x_destroy_bitmap extern void x_destroy_bitmap (struct frame *, int); === modified file 'src/dispnew.c' --- src/dispnew.c 2010-11-20 10:07:00 +0000 +++ src/dispnew.c 2010-12-19 05:43:42 +0000 @@ -3447,7 +3447,9 @@ #endif } +#if PERIODIC_PREEMPTION_CHECKING do_pause: +#endif /* Reset flags indicating that a window should be updated. */ set_window_update_flags (root_window, 0); @@ -4908,7 +4910,9 @@ } } +#if !PERIODIC_PREEMPTION_CHECKING do_pause: +#endif clear_desired_matrices (f); return pause; === modified file 'src/eval.c' --- src/eval.c 2010-10-26 22:23:09 +0000 +++ src/eval.c 2010-12-19 05:43:42 +0000 @@ -2291,14 +2291,12 @@ (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); - if (XSUBR (fun)->max_args == UNEVALLED) + else if (XSUBR (fun)->max_args == UNEVALLED) { backtrace.evalargs = 0; val = (XSUBR (fun)->function.aUNEVALLED) (args_left); - goto done; } - - if (XSUBR (fun)->max_args == MANY) + else if (XSUBR (fun)->max_args == MANY) { /* Pass a vector of evaluated arguments */ Lisp_Object *vals; @@ -2324,73 +2322,76 @@ val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); UNGCPRO; SAFE_FREE (); - goto done; - } - - GCPRO3 (args_left, fun, fun); - gcpro3.var = argvals; - gcpro3.nvars = 0; - - maxargs = XSUBR (fun)->max_args; - for (i = 0; i < maxargs; args_left = Fcdr (args_left)) - { - argvals[i] = Feval (Fcar (args_left)); - gcpro3.nvars = ++i; - } - - UNGCPRO; - - backtrace.args = argvals; - backtrace.nargs = XINT (numargs); - - switch (i) - { - case 0: - val = (XSUBR (fun)->function.a0) (); - goto done; - case 1: - val = (XSUBR (fun)->function.a1) (argvals[0]); - goto done; - case 2: - val = (XSUBR (fun)->function.a2) (argvals[0], argvals[1]); - goto done; - case 3: - val = (XSUBR (fun)->function.a3) (argvals[0], argvals[1], - argvals[2]); - goto done; - case 4: - val = (XSUBR (fun)->function.a4) (argvals[0], argvals[1], - argvals[2], argvals[3]); - goto done; - case 5: - val = (XSUBR (fun)->function.a5) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4]); - goto done; - case 6: - val = (XSUBR (fun)->function.a6) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5]); - goto done; - case 7: - val = (XSUBR (fun)->function.a7) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5], - argvals[6]); - goto done; - - case 8: - val = (XSUBR (fun)->function.a8) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5], - argvals[6], argvals[7]); - goto done; - - default: - /* Someone has created a subr that takes more arguments than - is supported by this code. We need to either rewrite the - subr to use a different argument protocol, or add more - cases to this switch. */ - abort (); + } + else + { + GCPRO3 (args_left, fun, fun); + gcpro3.var = argvals; + gcpro3.nvars = 0; + + maxargs = XSUBR (fun)->max_args; + for (i = 0; i < maxargs; args_left = Fcdr (args_left)) + { + argvals[i] = Feval (Fcar (args_left)); + gcpro3.nvars = ++i; + } + + UNGCPRO; + + backtrace.args = argvals; + backtrace.nargs = XINT (numargs); + + switch (i) + { + case 0: + val = (XSUBR (fun)->function.a0 ()); + break; + case 1: + val = (XSUBR (fun)->function.a1 (argvals[0])); + break; + case 2: + val = (XSUBR (fun)->function.a2 (argvals[0], argvals[1])); + break; + case 3: + val = (XSUBR (fun)->function.a3 + (argvals[0], argvals[1], argvals[2])); + break; + case 4: + val = (XSUBR (fun)->function.a4 + (argvals[0], argvals[1], argvals[2], argvals[3])); + break; + case 5: + val = (XSUBR (fun)->function.a5 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4])); + break; + case 6: + val = (XSUBR (fun)->function.a6 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5])); + break; + case 7: + val = (XSUBR (fun)->function.a7 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5], argvals[6])); + break; + + case 8: + val = (XSUBR (fun)->function.a8 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5], argvals[6], argvals[7])); + break; + + default: + /* Someone has created a subr that takes more arguments than + is supported by this code. We need to either rewrite the + subr to use a different argument protocol, or add more + cases to this switch. */ + abort (); + } } } - if (COMPILEDP (fun)) + else if (COMPILEDP (fun)) val = apply_lambda (fun, original_args, 1); else { @@ -2413,7 +2414,6 @@ else xsignal1 (Qinvalid_function, original_fun); } - done: CHECK_CONS_LIST (); lisp_eval_depth--; @@ -2956,83 +2956,84 @@ if (SUBRP (fun)) { - if (numargs < XSUBR (fun)->min_args + if (numargs < XSUBR (fun)->min_args || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) { XSETFASTINT (lisp_numargs, numargs); xsignal2 (Qwrong_number_of_arguments, original_fun, lisp_numargs); } - if (XSUBR (fun)->max_args == UNEVALLED) + else if (XSUBR (fun)->max_args == UNEVALLED) xsignal1 (Qinvalid_function, original_fun); - if (XSUBR (fun)->max_args == MANY) - { - val = (XSUBR (fun)->function.aMANY) (numargs, args + 1); - goto done; - } - - if (XSUBR (fun)->max_args > numargs) - { - internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object)); - memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object)); - for (i = numargs; i < XSUBR (fun)->max_args; i++) - internal_args[i] = Qnil; - } + else if (XSUBR (fun)->max_args == MANY) + val = (XSUBR (fun)->function.aMANY) (numargs, args + 1); else - internal_args = args + 1; - switch (XSUBR (fun)->max_args) { - case 0: - val = (XSUBR (fun)->function.a0) (); - goto done; - case 1: - val = (XSUBR (fun)->function.a1) (internal_args[0]); - goto done; - case 2: - val = (XSUBR (fun)->function.a2) (internal_args[0], internal_args[1]); - goto done; - case 3: - val = (XSUBR (fun)->function.a3) (internal_args[0], internal_args[1], - internal_args[2]); - goto done; - case 4: - val = (XSUBR (fun)->function.a4) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3]); - goto done; - case 5: - val = (XSUBR (fun)->function.a5) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4]); - goto done; - case 6: - val = (XSUBR (fun)->function.a6) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5]); - goto done; - case 7: - val = (XSUBR (fun)->function.a7) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5], - internal_args[6]); - goto done; - - case 8: - val = (XSUBR (fun)->function.a8) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5], - internal_args[6], internal_args[7]); - goto done; - - default: - - /* If a subr takes more than 8 arguments without using MANY - or UNEVALLED, we need to extend this function to support it. - Until this is done, there is no way to call the function. */ - abort (); + if (XSUBR (fun)->max_args > numargs) + { + internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object)); + memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object)); + for (i = numargs; i < XSUBR (fun)->max_args; i++) + internal_args[i] = Qnil; + } + else + internal_args = args + 1; + switch (XSUBR (fun)->max_args) + { + case 0: + val = (XSUBR (fun)->function.a0 ()); + break; + case 1: + val = (XSUBR (fun)->function.a1 (internal_args[0])); + break; + case 2: + val = (XSUBR (fun)->function.a2 + (internal_args[0], internal_args[1])); + break; + case 3: + val = (XSUBR (fun)->function.a3 + (internal_args[0], internal_args[1], internal_args[2])); + break; + case 4: + val = (XSUBR (fun)->function.a4 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3])); + break; + case 5: + val = (XSUBR (fun)->function.a5 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4])); + break; + case 6: + val = (XSUBR (fun)->function.a6 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5])); + break; + case 7: + val = (XSUBR (fun)->function.a7 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5], + internal_args[6])); + break; + + case 8: + val = (XSUBR (fun)->function.a8 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5], + internal_args[6], internal_args[7])); + break; + + default: + + /* If a subr takes more than 8 arguments without using MANY + or UNEVALLED, we need to extend this function to support it. + Until this is done, there is no way to call the function. */ + abort (); + } } } - if (COMPILEDP (fun)) + else if (COMPILEDP (fun)) val = funcall_lambda (fun, numargs, args + 1); else { @@ -3054,7 +3055,6 @@ else xsignal1 (Qinvalid_function, original_fun); } - done: CHECK_CONS_LIST (); lisp_eval_depth--; if (backtrace.debug_on_exit) === modified file 'src/fontset.c' --- src/fontset.c 2010-08-25 05:58:15 +0000 +++ src/fontset.c 2010-12-19 05:43:42 +0000 @@ -225,8 +225,7 @@ /* Return 1 if ID is a valid fontset id, else return 0. */ static int -fontset_id_valid_p (id) - int id; +fontset_id_valid_p (int id) { return (id >= 0 && id < ASIZE (Vfontset_table) - 1); } @@ -2128,8 +2127,7 @@ #ifdef FONTSET_DEBUG Lisp_Object -dump_fontset (fontset) - Lisp_Object fontset; +dump_fontset (Lisp_Object fontset) { Lisp_Object vec; === modified file 'src/ftfont.c' --- src/ftfont.c 2010-11-10 09:02:54 +0000 +++ src/ftfont.c 2010-12-19 05:43:42 +0000 @@ -1767,13 +1767,13 @@ position adjustment information in ADJUSTMENT. */ static int -ftfont_drive_otf (font, spec, in, from, to, out, adjustment) - MFLTFont *font; - MFLTOtfSpec *spec; - MFLTGlyphString *in; - int from, to; - MFLTGlyphString *out; - MFLTGlyphAdjustment *adjustment; +ftfont_drive_otf (MFLTFont *font, + MFLTOtfSpec *spec, + MFLTGlyphString *in, + int from, + int to, + MFLTGlyphString *out, + MFLTGlyphAdjustment *adjustment) { struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font; FT_Face ft_face = flt_font_ft->ft_face; === modified file 'src/image.c' --- src/image.c 2010-11-09 20:07:10 +0000 +++ src/image.c 2010-12-19 05:43:42 +0000 @@ -3332,7 +3332,7 @@ #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) int -x_create_bitmap_from_xpm_data (struct frame *f, char **bits) +x_create_bitmap_from_xpm_data (struct frame *f, const char **bits) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); int id, rc; === modified file 'src/lread.c' --- src/lread.c 2010-12-06 16:37:26 +0000 +++ src/lread.c 2010-12-19 05:43:42 +0000 @@ -2888,10 +2888,7 @@ { char *end = read_buffer + read_buffer_size; - while (c > 040 - && c != 0x8a0 /* NBSP */ - && (c >= 0200 - || !(strchr ("\"';()[]#`,", c)))) + do { if (end - p < MAX_MULTIBYTE_LENGTH) { @@ -2915,7 +2912,10 @@ else *p++ = c; c = READCHAR; - } + } while (c > 040 + && c != 0x8a0 /* NBSP */ + && (c >= 0200 + || !(strchr ("\"';()[]#`,", c)))); if (p == end) { === modified file 'src/textprop.c' --- src/textprop.c 2010-09-25 13:21:20 +0000 +++ src/textprop.c 2010-12-19 05:43:42 +0000 @@ -1604,40 +1604,42 @@ if (LENGTH (i) >= len) { if (! interval_has_some_properties_list (properties, i)) - if (modified) - { - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; - } - else - return Qnil; - - if (LENGTH (i) == len) - { - if (!modified && BUFFERP (object)) - modify_region (XBUFFER (object), XINT (start), XINT (end), 1); - remove_properties (Qnil, properties, i, object); - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; - } - - /* i has the properties, and goes past the change limit */ - unchanged = i; - i = split_interval_left (i, len); - copy_properties (unchanged, i); - if (!modified && BUFFERP (object)) - modify_region (XBUFFER (object), XINT (start), XINT (end), 1); - remove_properties (Qnil, properties, i, object); - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; + { + if (modified) + { + if (BUFFERP (object)) + signal_after_change (XINT (start), + XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + return Qnil; + } + else if (LENGTH (i) == len) + { + if (!modified && BUFFERP (object)) + modify_region (XBUFFER (object), XINT (start), XINT (end), 1); + remove_properties (Qnil, properties, i, object); + if (BUFFERP (object)) + signal_after_change (XINT (start), XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + { /* i has the properties, and goes past the change limit. */ + unchanged = i; + i = split_interval_left (i, len); + copy_properties (unchanged, i); + if (!modified && BUFFERP (object)) + modify_region (XBUFFER (object), XINT (start), XINT (end), 1); + remove_properties (Qnil, properties, i, object); + if (BUFFERP (object)) + signal_after_change (XINT (start), XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } } - if (interval_has_some_properties_list (properties, i)) { if (!modified && BUFFERP (object)) === modified file 'src/window.c' --- src/window.c 2010-11-17 02:37:45 +0000 +++ src/window.c 2010-12-19 05:43:42 +0000 @@ -3522,11 +3522,12 @@ else if (!EQ (tem, Qt)) /* w->buffer is t when the window is first being set up. */ { - if (!EQ (tem, buffer)) - if (EQ (w->dedicated, Qt)) - error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); - else - w->dedicated = Qnil; + if (EQ (tem, buffer)) + return Qnil; + else if (EQ (w->dedicated, Qt)) + error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); + else + w->dedicated = Qnil; unshow_buffer (w); } === modified file 'src/xterm.c' --- src/xterm.c 2010-11-23 18:09:55 +0000 +++ src/xterm.c 2010-12-19 05:43:42 +0000 @@ -489,14 +489,14 @@ &data); if (rc == Success && actual != None) - if (*(unsigned long *)data == opac) - { - XFree ((void *) data); - x_uncatch_errors (); - return; - } - else + { XFree ((void *) data); + if (*(unsigned long *)data == opac) + { + x_uncatch_errors (); + return; + } + } x_uncatch_errors (); } @@ -6498,7 +6498,6 @@ { /* Decode the input data. */ int require; - unsigned char *p; /* The input should be decoded with `coding_system' which depends on which X*LookupString function @@ -8469,7 +8468,6 @@ { struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); - Lisp_Object lval = get_frame_param (f, Qfullscreen); int cur, dummy; get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); @@ -8992,7 +8990,6 @@ void xembed_set_info (struct frame *f, enum xembed_info flags) { - Atom atom; unsigned long data[2]; struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);