From: Karoly Lorentey Date: Thu, 6 Jan 2005 15:00:09 +0000 (+0000) Subject: Merged in changes from CVS trunk. X-Git-Tag: emacs-pretest-23.0.90~11236^2~141^2~320 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0feecea9fb7079a2c1fbfee32a992449a22cf478;p=emacs.git Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-747 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-748 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-749 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-750 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-751 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-752 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-78 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-79 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-80 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-278 --- 0feecea9fb7079a2c1fbfee32a992449a22cf478 diff --cc mac/makefile.MPW index a398f63a925,92840d9c730..870052996b7 --- a/mac/makefile.MPW +++ b/mac/makefile.MPW @@@ -1017,8 -1048,7 +1048,8 @@@ LispSource = {Lisp}international:codepage.elc ¶ {Lisp}abbrev.elc ¶ {Lisp}buff-menu.elc ¶ + {Lisp}server.elc ¶ - {Lisp}byte-run.elc ¶ + {Lisp}emacs-lisp:byte-run.elc ¶ {Lisp}cus-start.el ¶ {Lisp}custom.elc ¶ {Lisp}emacs-lisp:lisp-mode.elc ¶ diff --cc src/xdisp.c index b0a8f953c9c,d485dc59b57..7cb9c0c92eb --- a/src/xdisp.c +++ b/src/xdisp.c @@@ -3438,15 -3448,15 +3444,15 @@@ handle_single_display_spec (it, spec, o if (NILP (form)) return 0; - if (CONSP (prop) - && EQ (XCAR (prop), Qheight) - && CONSP (XCDR (prop))) + /* Handle `(height HEIGHT)' specifications. */ + if (CONSP (spec) + && EQ (XCAR (spec), Qheight) + && CONSP (XCDR (spec))) { -- if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) ++ if (!FRAME_WINDOW_P (it->f)) return 0; - - /* `(height HEIGHT)'. */ - it->font_height = XCAR (XCDR (prop)); + + it->font_height = XCAR (XCDR (spec)); if (!NILP (it->font_height)) { struct face *face = FACE_FROM_ID (it->f, it->face_id); @@@ -3501,29 -3510,35 +3506,35 @@@ if (new_height > 0) it->face_id = face_with_height (it->f, it->face_id, new_height); } + + return 0; } - else if (CONSP (prop) - && EQ (XCAR (prop), Qspace_width) - && CONSP (XCDR (prop))) + + /* Handle `(space_width WIDTH)'. */ + if (CONSP (spec) + && EQ (XCAR (spec), Qspace_width) + && CONSP (XCDR (spec))) { - /* `(space_width WIDTH)'. */ -- if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) ++ if (!FRAME_WINDOW_P (it->f)) return 0; - value = XCAR (XCDR (prop)); + value = XCAR (XCDR (spec)); if (NUMBERP (value) && XFLOATINT (value) > 0) it->space_width = value; + + return 0; } - else if (CONSP (prop) - && EQ (XCAR (prop), Qslice)) + + /* Handle `(slice X Y WIDTH HEIGHT)'. */ + if (CONSP (spec) + && EQ (XCAR (spec), Qslice)) { - /* `(slice X Y WIDTH HEIGHT)'. */ Lisp_Object tem; -- if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) ++ if (!FRAME_WINDOW_P (it->f)) return 0; - if (tem = XCDR (prop), CONSP (tem)) + if (tem = XCDR (spec), CONSP (tem)) { it->slice.x = XCAR (tem); if (tem = XCDR (tem), CONSP (tem)) @@@ -3537,13 -3552,16 +3548,16 @@@ } } } + + return 0; } - else if (CONSP (prop) - && EQ (XCAR (prop), Qraise) - && CONSP (XCDR (prop))) + + /* Handle `(raise FACTOR)'. */ + if (CONSP (spec) + && EQ (XCAR (spec), Qraise) + && CONSP (XCDR (spec))) { - /* `(raise FACTOR)'. */ - if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) + if (!FRAME_WINDOW_P (it->f)) return 0; #ifdef HAVE_WINDOW_SYSTEM @@@ -3555,184 -3573,190 +3569,190 @@@ * (FONT_HEIGHT (face->font))); } #endif /* HAVE_WINDOW_SYSTEM */ + + return 0; } - else if (!it->string_from_display_prop_p) - { - /* `((margin left-margin) VALUE)' or `((margin right-margin) - VALUE) or `((margin nil) VALUE)' or VALUE. */ - Lisp_Object location, value; - struct text_pos start_pos; - int valid_p; - /* Characters having this form of property are not displayed, so - we have to find the end of the property. */ - start_pos = *position; - *position = display_prop_end (it, object, start_pos); - value = Qnil; + /* Don't handle the other kinds of display specifications + inside a string that we got from a `display' property. */ + if (it->string_from_display_prop_p) + return 0; - /* Let's stop at the new position and assume that all - text properties change there. */ - it->stop_charpos = position->charpos; + /* Characters having this form of property are not displayed, so + we have to find the end of the property. */ + start_pos = *position; + *position = display_prop_end (it, object, start_pos); + value = Qnil; - if (CONSP (prop) - && (EQ (XCAR (prop), Qleft_fringe) - || EQ (XCAR (prop), Qright_fringe)) - && CONSP (XCDR (prop))) - { - int face_id = DEFAULT_FACE_ID; - int fringe_bitmap; + /* Stop the scan at that end position--we assume that all + text properties change there. */ + it->stop_charpos = position->charpos; - /* Save current settings of IT so that we can restore them - when we are finished with the glyph property value. */ + /* Handle `(left-fringe BITMAP [FACE])' + and `(right-fringe BITMAP [FACE])'. */ + if (CONSP (spec) + && (EQ (XCAR (spec), Qleft_fringe) + || EQ (XCAR (spec), Qright_fringe)) + && CONSP (XCDR (spec))) + { + int face_id = DEFAULT_FACE_ID; + int fringe_bitmap; - /* `(left-fringe BITMAP FACE)'. */ - if (!FRAME_WINDOW_P (it->f)) - return 0; - if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) ++ if (!FRAME_WINDOW_P (it->f)) + /* If we return here, POSITION has been advanced + across the text with this property. */ + return 0; #ifdef HAVE_WINDOW_SYSTEM - value = XCAR (XCDR (prop)); - if (!SYMBOLP (value) - || !(fringe_bitmap = lookup_fringe_bitmap (value))) - return 0; + value = XCAR (XCDR (spec)); + if (!SYMBOLP (value) + || !(fringe_bitmap = lookup_fringe_bitmap (value))) + /* If we return here, POSITION has been advanced + across the text with this property. */ + return 0; - if (CONSP (XCDR (XCDR (prop)))) - { - Lisp_Object face_name = XCAR (XCDR (XCDR (prop))); - int face_id2 = lookup_named_face (it->f, face_name, 'A', 0); - if (face_id2 >= 0) - face_id = face_id2; - } + if (CONSP (XCDR (XCDR (spec)))) + { + Lisp_Object face_name = XCAR (XCDR (XCDR (spec))); + int face_id2 = lookup_named_face (it->f, face_name, 'A', 0); + if (face_id2 >= 0) + face_id = face_id2; + } - push_it (it); + /* Save current settings of IT so that we can restore them + when we are finished with the glyph property value. */ - it->area = TEXT_AREA; - it->what = IT_IMAGE; - it->image_id = -1; /* no image */ - it->position = start_pos; - it->object = NILP (object) ? it->w->buffer : object; - it->method = next_element_from_image; - it->face_id = face_id; + push_it (it); - /* Say that we haven't consumed the characters with - `display' property yet. The call to pop_it in - set_iterator_to_next will clean this up. */ - *position = start_pos; + it->area = TEXT_AREA; + it->what = IT_IMAGE; + it->image_id = -1; /* no image */ + it->position = start_pos; + it->object = NILP (object) ? it->w->buffer : object; + it->method = next_element_from_image; + it->face_id = face_id; - if (EQ (XCAR (prop), Qleft_fringe)) - { - it->left_user_fringe_bitmap = fringe_bitmap; - it->left_user_fringe_face_id = face_id; - } - else - { - it->right_user_fringe_bitmap = fringe_bitmap; - it->right_user_fringe_face_id = face_id; - } - #endif /* HAVE_WINDOW_SYSTEM */ - return 1; - } + /* Say that we haven't consumed the characters with + `display' property yet. The call to pop_it in + set_iterator_to_next will clean this up. */ + *position = start_pos; - location = Qunbound; - if (CONSP (prop) && CONSP (XCAR (prop))) + if (EQ (XCAR (spec), Qleft_fringe)) { - Lisp_Object tem; + it->left_user_fringe_bitmap = fringe_bitmap; + it->left_user_fringe_face_id = face_id; + } + else - { ++ { + it->right_user_fringe_bitmap = fringe_bitmap; + it->right_user_fringe_face_id = face_id; + } + #endif /* HAVE_WINDOW_SYSTEM */ + return 1; + } - value = XCDR (prop); - if (CONSP (value)) - value = XCAR (value); + /* Prepare to handle `((margin left-margin) ...)', + `((margin right-margin) ...)' and `((margin nil) ...)' + prefixes for display specifications. */ + location = Qunbound; + if (CONSP (spec) && CONSP (XCAR (spec))) + { + Lisp_Object tem; - tem = XCAR (prop); - if (EQ (XCAR (tem), Qmargin) - && (tem = XCDR (tem), - tem = CONSP (tem) ? XCAR (tem) : Qnil, - (NILP (tem) - || EQ (tem, Qleft_margin) - || EQ (tem, Qright_margin)))) - location = tem; - } + value = XCDR (spec); + if (CONSP (value)) + value = XCAR (value); - if (EQ (location, Qunbound)) - { - location = Qnil; - value = prop; - } + tem = XCAR (spec); + if (EQ (XCAR (tem), Qmargin) + && (tem = XCDR (tem), + tem = CONSP (tem) ? XCAR (tem) : Qnil, + (NILP (tem) + || EQ (tem, Qleft_margin) + || EQ (tem, Qright_margin)))) + location = tem; + } + + if (EQ (location, Qunbound)) + { + location = Qnil; + value = spec; + } + + /* After this point, VALUE is the property after any + margin prefix has been stripped. It must be a string, + an image specification, or `(space ...)'. - valid_p = (STRINGP (value) + LOCATION specifies where to display: `left-margin', + `right-margin' or nil. */ + + valid_p = (STRINGP (value) #ifdef HAVE_WINDOW_SYSTEM - || (FRAME_WINDOW_P (it->f) && valid_image_p (value)) - || (!FRAME_TERMCAP_P (it->f) && valid_image_p (value)) ++ || (FRAME_WINDOW_P (it->f) && valid_image_p (value)) #endif /* not HAVE_WINDOW_SYSTEM */ - || (CONSP (value) && EQ (XCAR (value), Qspace))); - - if ((EQ (location, Qleft_margin) - || EQ (location, Qright_margin) - || NILP (location)) - && valid_p - && !display_replaced_before_p) - { - replaces_text_display_p = 1; - || (CONSP (value) && EQ (XCAR (value), Qspace))); ++ || (CONSP (value) && EQ (XCAR (value), Qspace))); - /* Save current settings of IT so that we can restore them - when we are finished with the glyph property value. */ - push_it (it); + if (valid_p && !display_replaced_before_p) + { + /* Save current settings of IT so that we can restore them + when we are finished with the glyph property value. */ + push_it (it); - + if (NILP (location)) + it->area = TEXT_AREA; + else if (EQ (location, Qleft_margin)) + it->area = LEFT_MARGIN_AREA; + else + it->area = RIGHT_MARGIN_AREA; - if (NILP (location)) - it->area = TEXT_AREA; - else if (EQ (location, Qleft_margin)) - it->area = LEFT_MARGIN_AREA; - else - it->area = RIGHT_MARGIN_AREA; + if (STRINGP (value)) + { + it->string = value; + it->multibyte_p = STRING_MULTIBYTE (it->string); + it->current.overlay_string_index = -1; + IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; + it->end_charpos = it->string_nchars = SCHARS (it->string); + it->method = next_element_from_string; + it->stop_charpos = 0; + it->string_from_display_prop_p = 1; + /* Say that we haven't consumed the characters with + `display' property yet. The call to pop_it in + set_iterator_to_next will clean this up. */ + *position = start_pos; + } + else if (CONSP (value) && EQ (XCAR (value), Qspace)) + { + it->method = next_element_from_stretch; + it->object = value; + it->current.pos = it->position = start_pos; + - if (STRINGP (value)) - { - it->string = value; - it->multibyte_p = STRING_MULTIBYTE (it->string); - it->current.overlay_string_index = -1; - IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; - it->end_charpos = it->string_nchars = SCHARS (it->string); - it->method = next_element_from_string; - it->stop_charpos = 0; - it->string_from_display_prop_p = 1; - /* Say that we haven't consumed the characters with - `display' property yet. The call to pop_it in - set_iterator_to_next will clean this up. */ - *position = start_pos; - } - else if (CONSP (value) && EQ (XCAR (value), Qspace)) - { - it->method = next_element_from_stretch; - it->object = value; - it->current.pos = it->position = start_pos; - } - #ifdef HAVE_WINDOW_SYSTEM - else - { - if (FRAME_WINDOW_P (it->f)) - { - it->what = IT_IMAGE; - it->image_id = lookup_image (it->f, value); - it->position = start_pos; - it->object = NILP (object) ? it->w->buffer : object; - it->method = next_element_from_image; - } - - /* Say that we haven't consumed the characters with - `display' property yet. The call to pop_it in - set_iterator_to_next will clean this up. */ - *position = start_pos; - } - #endif /* HAVE_WINDOW_SYSTEM */ } + #ifdef HAVE_WINDOW_SYSTEM else - /* Invalid property or property not supported. Restore - the position to what it was before. */ - *position = start_pos; + { + it->what = IT_IMAGE; + it->image_id = lookup_image (it->f, value); + it->position = start_pos; + it->object = NILP (object) ? it->w->buffer : object; + it->method = next_element_from_image; + + /* Say that we haven't consumed the characters with + `display' property yet. The call to pop_it in + set_iterator_to_next will clean this up. */ + *position = start_pos; + } + #endif /* HAVE_WINDOW_SYSTEM */ + + return 1; } - return replaces_text_display_p; + /* Invalid property or property not supported. Restore + POSITION to what it was before. */ + *position = start_pos; + return 0; } - /* Check if PROP is a display sub-property value whose text should be -/* Check if SPEC is a display specification value whose text should be ++/* Check if SPEC is a display sub-property value whose text should be treated as intangible. */ static int