aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog72
-rw-r--r--src/alloc.c9
-rw-r--r--src/buffer.c2
-rw-r--r--src/data.c12
-rw-r--r--src/dispextern.h5
-rw-r--r--src/fns.c23
-rw-r--r--src/lisp.h30
-rw-r--r--src/lread.c21
-rw-r--r--src/macterm.c3
-rw-r--r--src/print.c13
-rw-r--r--src/xdisp.c117
-rw-r--r--src/xfaces.c26
-rw-r--r--src/xterm.c3
13 files changed, 234 insertions, 102 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6bc622c8bff..4db9b8cb4d9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,64 @@
12004-04-27 Kim F. Storm <storm@cua.dk>
2
3 * xdisp.c (x_produce_glyphs): Fix last change; handle newline in
4 header line strings.
5
6 * dispextern.h (struct it): New member use_default_face.
7
8 * xdisp.c (Qline_height): New variable.
9 (syms_of_xdisp): Intern and staticpro it.
10 (append_space_for_newline): Partially undo 2004-04-25 change;
11 add default_face_p arg, and restore callers.
12 Clear it->use_default_face after use.
13 (x_produce_glyphs): Set default font for ascii char if
14 it->use_default_font is set. Change line-spacing property to set
15 just extra line spacing. Handle new line-height property.
16
172004-04-26 Andreas Schwab <schwab@suse.de>
18
19 * print.c (print_object): Print non-ascii characters in bool
20 vector representation as octal escapes.
21
22 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Define.
23 * print.c (print_object): Use it instead of BITS_PER_CHAR for
24 bool vectors.
25 * lread.c (read1): Likewise.
26 * alloc.c (Fmake_bool_vector): Likewise.
27 * data.c (Faref, Faset): Likewise.
28 * fns.c (Fcopy_sequence, concat, internal_equal, Ffillarray)
29 (mapcar1): Likewise.
30
312004-04-26 Steven Tamm <tamm@Steven-Tamms-Computer.local>
32
33 * lread.c (init_lread): Fixing typo HAVE_CARBON test logic
34
352004-04-26 Miles Bader <miles@gnu.org>
36
37 * lisp.h (CYCLE_CHECK): Macro moved from xfaces.c.
38
392004-04-26 Juanma Barranquero <lektu@terra.es>
40
41 * buffer.c (Fpop_to_buffer): Fix docstring.
42
432004-04-26 Steven Tamm <steventamm@mac.com>
44
45 * lread.c (init_lread): Don't display missing lisp directory
46 warnings with Carbon Emacs because self-contained bundled Emacs
47 may be built without correct installation path.
48
492004-04-25 Kim F. Storm <storm@cua.dk>
50
51 * macterm.c (x_draw_hollow_cursor): Fix height of box for narrow lines.
52
53 * xterm.c (x_draw_hollow_cursor): Fix height of box for narrow lines.
54
55 * xdisp.c (append_space_for_newline): Rename from append_space.
56 Remove DEFAULT_FACE_P arg; always use current face. Callers changed.
57 (x_produce_glyphs): Handle line-spacing property on newline char.
58 If value is t, adjust ascent and descent to fit current row height.
59 If value is an integer or float, set extra_line_spacing to integer
60 value, or to float value x current line height.
61
12004-04-23 Kenichi Handa <handa@m17n.org> 622004-04-23 Kenichi Handa <handa@m17n.org>
2 63
3 * fontset.c (Finternal_char_font): If POSITION is nil, return 64 * fontset.c (Finternal_char_font): If POSITION is nil, return
@@ -37,7 +98,7 @@
37 98
38 * lisp.h (pos_visible_p): Fix prototype. 99 * lisp.h (pos_visible_p): Fix prototype.
39 100
40 * macterm.c (x_draw_relief_rect): Add top_p and bot_p args. 101 * macterm.c (x_draw_relief_rect): Add top_p and bot_p args.
41 (x_draw_glyph_string_box): Fix call to x_draw_relief_rect. 102 (x_draw_glyph_string_box): Fix call to x_draw_relief_rect.
42 (x_draw_image_foreground, x_draw_image_relief) 103 (x_draw_image_foreground, x_draw_image_relief)
43 (x_draw_image_foreground_1, x_draw_image_glyph_string): 104 (x_draw_image_foreground_1, x_draw_image_glyph_string):
@@ -8334,12 +8395,11 @@
8334 8395
83352002-07-19 Juanma Barranquero <lektu@terra.es> 83962002-07-19 Juanma Barranquero <lektu@terra.es>
8336 8397
8337 * fileio.c (Ffile_name_as_directory): Fix argument name in docstring.
8338 (file_name_as_directory): Use literal '/' instead of DIRECTORY_SEP.
8339
8340 * xdisp.c (syms_of_xdisp): Remove redundant deprecation info. 8398 * xdisp.c (syms_of_xdisp): Remove redundant deprecation info.
8341 8399
8342 * fileio.c (syms_of_fileio): Likewise. 8400 * fileio.c (syms_of_fileio): Likewise.
8401 (Ffile_name_as_directory): Fix argument name in docstring.
8402 (file_name_as_directory): Use literal '/' instead of DIRECTORY_SEP.
8343 8403
83442002-07-18 Richard M. Stallman <rms@gnu.org> 84042002-07-18 Richard M. Stallman <rms@gnu.org>
8345 8405
@@ -11989,9 +12049,9 @@
11989 12049
11990 * abbrev.c (Fexpand_abbrev): Use Frun_hooks instead of Vrun_hooks. 12050 * abbrev.c (Fexpand_abbrev): Use Frun_hooks instead of Vrun_hooks.
11991 12051
11992 * buffer.c (Fkill_buffer): Use Frun_hooks, not Vrun_hooks. 12052 * buffer.c (Fkill_buffer): Likewise.
11993 12053
11994 * print.c (temp_output_buffer_setup): Use Frun_hooks, not Vrun_hooks. 12054 * print.c (temp_output_buffer_setup): Likewise.
11995 12055
119962001-11-25 Stefan Monnier <monnier@cs.yale.edu> 120562001-11-25 Stefan Monnier <monnier@cs.yale.edu>
11997 12057
diff --git a/src/alloc.c b/src/alloc.c
index 723d664cbe0..29351952860 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1950,10 +1950,11 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
1950 1950
1951 CHECK_NATNUM (length); 1951 CHECK_NATNUM (length);
1952 1952
1953 bits_per_value = sizeof (EMACS_INT) * BITS_PER_CHAR; 1953 bits_per_value = sizeof (EMACS_INT) * BOOL_VECTOR_BITS_PER_CHAR;
1954 1954
1955 length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value; 1955 length_in_elts = (XFASTINT (length) + bits_per_value - 1) / bits_per_value;
1956 length_in_chars = ((XFASTINT (length) + BITS_PER_CHAR - 1) / BITS_PER_CHAR); 1956 length_in_chars = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1)
1957 / BOOL_VECTOR_BITS_PER_CHAR);
1957 1958
1958 /* We must allocate one more elements than LENGTH_IN_ELTS for the 1959 /* We must allocate one more elements than LENGTH_IN_ELTS for the
1959 slot `size' of the struct Lisp_Bool_Vector. */ 1960 slot `size' of the struct Lisp_Bool_Vector. */
@@ -1970,9 +1971,9 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
1970 p->data[i] = real_init; 1971 p->data[i] = real_init;
1971 1972
1972 /* Clear the extraneous bits in the last byte. */ 1973 /* Clear the extraneous bits in the last byte. */
1973 if (XINT (length) != length_in_chars * BITS_PER_CHAR) 1974 if (XINT (length) != length_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
1974 XBOOL_VECTOR (val)->data[length_in_chars - 1] 1975 XBOOL_VECTOR (val)->data[length_in_chars - 1]
1975 &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1; 1976 &= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
1976 1977
1977 return val; 1978 return val;
1978} 1979}
diff --git a/src/buffer.c b/src/buffer.c
index 6e67f07cf38..db16b22e35a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1683,7 +1683,7 @@ DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0,
1683 doc: /* Select buffer BUFFER in some window, preferably a different one. 1683 doc: /* Select buffer BUFFER in some window, preferably a different one.
1684If BUFFER is nil, then some other buffer is chosen. 1684If BUFFER is nil, then some other buffer is chosen.
1685If `pop-up-windows' is non-nil, windows can be split to do this. 1685If `pop-up-windows' is non-nil, windows can be split to do this.
1686If optional second arg OTHER-WINDOW is nil, insist on finding another 1686If optional second arg OTHER-WINDOW is non-nil, insist on finding another
1687window even if BUFFER is already visible in the selected window, 1687window even if BUFFER is already visible in the selected window,
1688and ignore `same-window-regexps' and `same-window-buffer-names'. 1688and ignore `same-window-regexps' and `same-window-buffer-names'.
1689This uses the function `display-buffer' as a subroutine; see the documentation 1689This uses the function `display-buffer' as a subroutine; see the documentation
diff --git a/src/data.c b/src/data.c
index c3cf05e0f10..a5f28375635 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1946,8 +1946,8 @@ or a byte-code object. IDX starts at 0. */)
1946 if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size) 1946 if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
1947 args_out_of_range (array, idx); 1947 args_out_of_range (array, idx);
1948 1948
1949 val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR]; 1949 val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR];
1950 return (val & (1 << (idxval % BITS_PER_CHAR)) ? Qt : Qnil); 1950 return (val & (1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR)) ? Qt : Qnil);
1951 } 1951 }
1952 else if (CHAR_TABLE_P (array)) 1952 else if (CHAR_TABLE_P (array))
1953 { 1953 {
@@ -2074,13 +2074,13 @@ bool-vector. IDX starts at 0. */)
2074 if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size) 2074 if (idxval < 0 || idxval >= XBOOL_VECTOR (array)->size)
2075 args_out_of_range (array, idx); 2075 args_out_of_range (array, idx);
2076 2076
2077 val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR]; 2077 val = (unsigned char) XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR];
2078 2078
2079 if (! NILP (newelt)) 2079 if (! NILP (newelt))
2080 val |= 1 << (idxval % BITS_PER_CHAR); 2080 val |= 1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR);
2081 else 2081 else
2082 val &= ~(1 << (idxval % BITS_PER_CHAR)); 2082 val &= ~(1 << (idxval % BOOL_VECTOR_BITS_PER_CHAR));
2083 XBOOL_VECTOR (array)->data[idxval / BITS_PER_CHAR] = val; 2083 XBOOL_VECTOR (array)->data[idxval / BOOL_VECTOR_BITS_PER_CHAR] = val;
2084 } 2084 }
2085 else if (CHAR_TABLE_P (array)) 2085 else if (CHAR_TABLE_P (array))
2086 { 2086 {
diff --git a/src/dispextern.h b/src/dispextern.h
index a3fc28e2491..8e79211b319 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1920,9 +1920,12 @@ struct it
1920 unsigned face_before_selective_p : 1; 1920 unsigned face_before_selective_p : 1;
1921 1921
1922 /* If 1, adjust current glyph so it does not increase current row 1922 /* If 1, adjust current glyph so it does not increase current row
1923 descent/ascent. */ 1923 descent/ascent (line-height property). Reset after this glyph. */
1924 unsigned constrain_row_ascent_descent_p : 1; 1924 unsigned constrain_row_ascent_descent_p : 1;
1925 1925
1926 /* If 1, show current glyph in default face. Reset after this glyph. */
1927 unsigned use_default_face : 1;
1928
1926 /* The ID of the default face to use. One of DEFAULT_FACE_ID, 1929 /* The ID of the default face to use. One of DEFAULT_FACE_ID,
1927 MODE_LINE_FACE_ID, etc, depending on what we are displaying. */ 1930 MODE_LINE_FACE_ID, etc, depending on what we are displaying. */
1928 int base_face_id; 1931 int base_face_id;
diff --git a/src/fns.c b/src/fns.c
index bb215317864..1dbb9fb7c33 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1,5 +1,5 @@
1/* Random utility Lisp functions. 1/* Random utility Lisp functions.
2 Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 2003 2 Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -513,7 +513,8 @@ with the original. */)
513 { 513 {
514 Lisp_Object val; 514 Lisp_Object val;
515 int size_in_chars 515 int size_in_chars
516 = (XBOOL_VECTOR (arg)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR; 516 = ((XBOOL_VECTOR (arg)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
517 / BOOL_VECTOR_BITS_PER_CHAR);
517 518
518 val = Fmake_bool_vector (Flength (arg), Qnil); 519 val = Fmake_bool_vector (Flength (arg), Qnil);
519 bcopy (XBOOL_VECTOR (arg)->data, XBOOL_VECTOR (val)->data, 520 bcopy (XBOOL_VECTOR (arg)->data, XBOOL_VECTOR (val)->data,
@@ -783,8 +784,8 @@ concat (nargs, args, target_type, last_special)
783 else if (BOOL_VECTOR_P (this)) 784 else if (BOOL_VECTOR_P (this))
784 { 785 {
785 int byte; 786 int byte;
786 byte = XBOOL_VECTOR (this)->data[thisindex / BITS_PER_CHAR]; 787 byte = XBOOL_VECTOR (this)->data[thisindex / BOOL_VECTOR_BITS_PER_CHAR];
787 if (byte & (1 << (thisindex % BITS_PER_CHAR))) 788 if (byte & (1 << (thisindex % BOOL_VECTOR_BITS_PER_CHAR)))
788 elt = Qt; 789 elt = Qt;
789 else 790 else
790 elt = Qnil; 791 elt = Qnil;
@@ -2245,7 +2246,8 @@ internal_equal (o1, o2, depth, props)
2245 if (BOOL_VECTOR_P (o1)) 2246 if (BOOL_VECTOR_P (o1))
2246 { 2247 {
2247 int size_in_chars 2248 int size_in_chars
2248 = (XBOOL_VECTOR (o1)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR; 2249 = ((XBOOL_VECTOR (o1)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
2250 / BOOL_VECTOR_BITS_PER_CHAR);
2249 2251
2250 if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size) 2252 if (XBOOL_VECTOR (o1)->size != XBOOL_VECTOR (o2)->size)
2251 return 0; 2253 return 0;
@@ -2356,7 +2358,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2356 { 2358 {
2357 register unsigned char *p = XBOOL_VECTOR (array)->data; 2359 register unsigned char *p = XBOOL_VECTOR (array)->data;
2358 int size_in_chars 2360 int size_in_chars
2359 = (XBOOL_VECTOR (array)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR; 2361 = ((XBOOL_VECTOR (array)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
2362 / BOOL_VECTOR_BITS_PER_CHAR);
2360 2363
2361 charval = (! NILP (item) ? -1 : 0); 2364 charval = (! NILP (item) ? -1 : 0);
2362 for (index = 0; index < size_in_chars - 1; index++) 2365 for (index = 0; index < size_in_chars - 1; index++)
@@ -2364,8 +2367,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2364 if (index < size_in_chars) 2367 if (index < size_in_chars)
2365 { 2368 {
2366 /* Mask out bits beyond the vector size. */ 2369 /* Mask out bits beyond the vector size. */
2367 if (XBOOL_VECTOR (array)->size % BITS_PER_CHAR) 2370 if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)
2368 charval &= (1 << (XBOOL_VECTOR (array)->size % BITS_PER_CHAR)) - 1; 2371 charval &= (1 << (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
2369 p[index] = charval; 2372 p[index] = charval;
2370 } 2373 }
2371 } 2374 }
@@ -2958,8 +2961,8 @@ mapcar1 (leni, vals, fn, seq)
2958 for (i = 0; i < leni; i++) 2961 for (i = 0; i < leni; i++)
2959 { 2962 {
2960 int byte; 2963 int byte;
2961 byte = XBOOL_VECTOR (seq)->data[i / BITS_PER_CHAR]; 2964 byte = XBOOL_VECTOR (seq)->data[i / BOOL_VECTOR_BITS_PER_CHAR];
2962 if (byte & (1 << (i % BITS_PER_CHAR))) 2965 if (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR)))
2963 dummy = Qt; 2966 dummy = Qt;
2964 else 2967 else
2965 dummy = Qnil; 2968 dummy = Qnil;
diff --git a/src/lisp.h b/src/lisp.h
index bc67f4dbe67..7e59c50c3b4 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -278,6 +278,10 @@ enum pvec_type
278 278
279/* For convenience, we also store the number of elements in these bits. */ 279/* For convenience, we also store the number of elements in these bits. */
280#define PSEUDOVECTOR_SIZE_MASK 0x1ff 280#define PSEUDOVECTOR_SIZE_MASK 0x1ff
281
282/* Number of bits to put in each character in the internal representation
283 of bool vectors. This should not vary across implementations. */
284#define BOOL_VECTOR_BITS_PER_CHAR 8
281 285
282/***** Select the tagging scheme. *****/ 286/***** Select the tagging scheme. *****/
283 287
@@ -3187,6 +3191,32 @@ extern Lisp_Object Vdirectory_sep_char;
3187 ? make_float (val) \ 3191 ? make_float (val) \
3188 : make_number ((EMACS_INT)(val))) 3192 : make_number ((EMACS_INT)(val)))
3189 3193
3194
3195/* Checks the `cycle check' variable CHECK to see if it indicates that
3196 EL is part of a cycle; CHECK must be either Qnil or a value returned
3197 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
3198 elements after which a cycle might be suspected; after that many
3199 elements, this macro begins consing in order to keep more precise
3200 track of elements.
3201
3202 Returns nil if a cycle was detected, otherwise a new value for CHECK
3203 that includes EL.
3204
3205 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
3206 the caller should make sure that's ok. */
3207
3208#define CYCLE_CHECK(check, el, suspicious) \
3209 (NILP (check) \
3210 ? make_number (0) \
3211 : (INTEGERP (check) \
3212 ? (XFASTINT (check) < (suspicious) \
3213 ? make_number (XFASTINT (check) + 1) \
3214 : Fcons (el, Qnil)) \
3215 : (!NILP (Fmemq ((el), (check))) \
3216 ? Qnil \
3217 : Fcons ((el), (check)))))
3218
3219
3190#endif /* EMACS_LISP_H */ 3220#endif /* EMACS_LISP_H */
3191 3221
3192/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e 3222/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e
diff --git a/src/lread.c b/src/lread.c
index ac353c798dc..46fe6cd3e51 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1994,8 +1994,9 @@ read1 (readcharfun, pch, first_in_list)
1994 if (c == '"') 1994 if (c == '"')
1995 { 1995 {
1996 Lisp_Object tmp, val; 1996 Lisp_Object tmp, val;
1997 int size_in_chars = ((XFASTINT (length) + BITS_PER_CHAR - 1) 1997 int size_in_chars
1998 / BITS_PER_CHAR); 1998 = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1)
1999 / BOOL_VECTOR_BITS_PER_CHAR);
1999 2000
2000 UNREAD (c); 2001 UNREAD (c);
2001 tmp = read1 (readcharfun, pch, first_in_list); 2002 tmp = read1 (readcharfun, pch, first_in_list);
@@ -2004,7 +2005,7 @@ read1 (readcharfun, pch, first_in_list)
2004 when the number of bits was a multiple of 8. 2005 when the number of bits was a multiple of 8.
2005 Accept such input in case it came from an old version. */ 2006 Accept such input in case it came from an old version. */
2006 && ! (XFASTINT (length) 2007 && ! (XFASTINT (length)
2007 == (SCHARS (tmp) - 1) * BITS_PER_CHAR)) 2008 == (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR))
2008 Fsignal (Qinvalid_read_syntax, 2009 Fsignal (Qinvalid_read_syntax,
2009 Fcons (make_string ("#&...", 5), Qnil)); 2010 Fcons (make_string ("#&...", 5), Qnil));
2010 2011
@@ -2012,9 +2013,9 @@ read1 (readcharfun, pch, first_in_list)
2012 bcopy (SDATA (tmp), XBOOL_VECTOR (val)->data, 2013 bcopy (SDATA (tmp), XBOOL_VECTOR (val)->data,
2013 size_in_chars); 2014 size_in_chars);
2014 /* Clear the extraneous bits in the last byte. */ 2015 /* Clear the extraneous bits in the last byte. */
2015 if (XINT (length) != size_in_chars * BITS_PER_CHAR) 2016 if (XINT (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
2016 XBOOL_VECTOR (val)->data[size_in_chars - 1] 2017 XBOOL_VECTOR (val)->data[size_in_chars - 1]
2017 &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1; 2018 &= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
2018 return val; 2019 return val;
2019 } 2020 }
2020 Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5), 2021 Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5),
@@ -3677,11 +3678,15 @@ init_lread ()
3677 } 3678 }
3678#endif 3679#endif
3679 3680
3680#ifndef WINDOWSNT 3681#if (!(defined(WINDOWSNT) || (defined(HAVE_CARBON))))
3681 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is 3682 /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
3682 almost never correct, thereby causing a warning to be printed out that 3683 almost never correct, thereby causing a warning to be printed out that
3683 confuses users. Since PATH_LOADSEARCH is always overridden by the 3684 confuses users. Since PATH_LOADSEARCH is always overridden by the
3684 EMACSLOADPATH environment variable below, disable the warning on NT. */ 3685 EMACSLOADPATH environment variable below, disable the warning on NT.
3686 Also, when using the "self-contained" option for Carbon Emacs for MacOSX,
3687 the "standard" paths may not exist and would be overridden by
3688 EMACSLOADPATH as on NT. Since this depends on how the executable
3689 was build and packaged, turn off the warnings in general */
3685 3690
3686 /* Warn if dirs in the *standard* path don't exist. */ 3691 /* Warn if dirs in the *standard* path don't exist. */
3687 if (!turn_off_warning) 3692 if (!turn_off_warning)
@@ -3703,7 +3708,7 @@ init_lread ()
3703 } 3708 }
3704 } 3709 }
3705 } 3710 }
3706#endif /* WINDOWSNT */ 3711#endif /* !(WINDOWSNT || HAVE_CARBON) */
3707 3712
3708 /* If the EMACSLOADPATH environment variable is set, use its value. 3713 /* If the EMACSLOADPATH environment variable is set, use its value.
3709 This doesn't apply if we're dumping. */ 3714 This doesn't apply if we're dumping. */
diff --git a/src/macterm.c b/src/macterm.c
index 88f5fce468c..e825cc2b022 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -4665,7 +4665,8 @@ x_draw_hollow_cursor (w, row)
4665 /* Compute the proper height and ascent of the rectangle, based 4665 /* Compute the proper height and ascent of the rectangle, based
4666 on the actual glyph. Using the full height of the row looks 4666 on the actual glyph. Using the full height of the row looks
4667 bad when there are tall images on that row. */ 4667 bad when there are tall images on that row. */
4668 h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); 4668 h = max (min (FRAME_LINE_HEIGHT (f), row->height),
4669 cursor_glyph->ascent + cursor_glyph->descent);
4669 if (h < row->height) 4670 if (h < row->height)
4670 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; 4671 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
4671 h--; 4672 h--;
diff --git a/src/print.c b/src/print.c
index 89690fe5399..7548bc75661 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,5 +1,5 @@
1/* Lisp object printing and output streams. 1/* Lisp object printing and output streams.
2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 2003 2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -1783,7 +1783,8 @@ print_object (obj, printcharfun, escapeflag)
1783 register unsigned char c; 1783 register unsigned char c;
1784 struct gcpro gcpro1; 1784 struct gcpro gcpro1;
1785 int size_in_chars 1785 int size_in_chars
1786 = (XBOOL_VECTOR (obj)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR; 1786 = ((XBOOL_VECTOR (obj)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
1787 / BOOL_VECTOR_BITS_PER_CHAR);
1787 1788
1788 GCPRO1 (obj); 1789 GCPRO1 (obj);
1789 1790
@@ -1814,6 +1815,14 @@ print_object (obj, printcharfun, escapeflag)
1814 PRINTCHAR ('\\'); 1815 PRINTCHAR ('\\');
1815 PRINTCHAR ('f'); 1816 PRINTCHAR ('f');
1816 } 1817 }
1818 else if (c > '\177')
1819 {
1820 /* Use octal escapes to avoid encoding issues. */
1821 PRINTCHAR ('\\');
1822 PRINTCHAR ('0' + ((c >> 6) & 3));
1823 PRINTCHAR ('0' + ((c >> 3) & 7));
1824 PRINTCHAR ('0' + (c & 7));
1825 }
1817 else 1826 else
1818 { 1827 {
1819 if (c == '\"' || c == '\\') 1828 if (c == '\"' || c == '\\')
diff --git a/src/xdisp.c b/src/xdisp.c
index fd621fe301b..d5e12e68546 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -304,6 +304,7 @@ Lisp_Object Qleft_margin, Qright_margin, Qspace_width, Qraise;
304Lisp_Object Qslice; 304Lisp_Object Qslice;
305Lisp_Object Qcenter; 305Lisp_Object Qcenter;
306Lisp_Object Qmargin, Qpointer; 306Lisp_Object Qmargin, Qpointer;
307Lisp_Object Qline_height;
307extern Lisp_Object Qheight; 308extern Lisp_Object Qheight;
308extern Lisp_Object QCwidth, QCheight, QCascent; 309extern Lisp_Object QCwidth, QCheight, QCascent;
309extern Lisp_Object Qscroll_bar; 310extern Lisp_Object Qscroll_bar;
@@ -846,7 +847,7 @@ static void insert_left_trunc_glyphs P_ ((struct it *));
846static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *, 847static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *,
847 Lisp_Object)); 848 Lisp_Object));
848static void extend_face_to_end_of_line P_ ((struct it *)); 849static void extend_face_to_end_of_line P_ ((struct it *));
849static int append_space P_ ((struct it *, int)); 850static int append_space_for_newline P_ ((struct it *, int));
850static int make_cursor_line_fully_visible P_ ((struct window *, int)); 851static int make_cursor_line_fully_visible P_ ((struct window *, int));
851static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); 852static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int));
852static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); 853static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *));
@@ -14144,8 +14145,7 @@ compute_line_metrics (it)
14144 14145
14145 14146
14146/* Append one space to the glyph row of iterator IT if doing a 14147/* Append one space to the glyph row of iterator IT if doing a
14147 window-based redisplay. DEFAULT_FACE_P non-zero means let the 14148 window-based redisplay. The space has the same face as
14148 space have the default face, otherwise let it have the same face as
14149 IT->face_id. Value is non-zero if a space was added. 14149 IT->face_id. Value is non-zero if a space was added.
14150 14150
14151 This function is called to make sure that there is always one glyph 14151 This function is called to make sure that there is always one glyph
@@ -14157,7 +14157,7 @@ compute_line_metrics (it)
14157 end of the line if the row ends in italic text. */ 14157 end of the line if the row ends in italic text. */
14158 14158
14159static int 14159static int
14160append_space (it, default_face_p) 14160append_space_for_newline (it, default_face_p)
14161 struct it *it; 14161 struct it *it;
14162 int default_face_p; 14162 int default_face_p;
14163{ 14163{
@@ -14171,7 +14171,7 @@ append_space (it, default_face_p)
14171 /* Save some values that must not be changed. 14171 /* Save some values that must not be changed.
14172 Must save IT->c and IT->len because otherwise 14172 Must save IT->c and IT->len because otherwise
14173 ITERATOR_AT_END_P wouldn't work anymore after 14173 ITERATOR_AT_END_P wouldn't work anymore after
14174 append_space has been called. */ 14174 append_space_for_newline has been called. */
14175 enum display_element_type saved_what = it->what; 14175 enum display_element_type saved_what = it->what;
14176 int saved_c = it->c, saved_len = it->len; 14176 int saved_c = it->c, saved_len = it->len;
14177 int saved_x = it->current_x; 14177 int saved_x = it->current_x;
@@ -14196,11 +14196,9 @@ append_space (it, default_face_p)
14196 face = FACE_FROM_ID (it->f, it->face_id); 14196 face = FACE_FROM_ID (it->f, it->face_id);
14197 it->face_id = FACE_FOR_CHAR (it->f, face, 0); 14197 it->face_id = FACE_FOR_CHAR (it->f, face, 0);
14198 14198
14199 if (it->max_ascent > 0 || it->max_descent > 0)
14200 it->constrain_row_ascent_descent_p = 1;
14201
14202 PRODUCE_GLYPHS (it); 14199 PRODUCE_GLYPHS (it);
14203 14200
14201 it->use_default_face = 0;
14204 it->constrain_row_ascent_descent_p = 0; 14202 it->constrain_row_ascent_descent_p = 0;
14205 it->current_x = saved_x; 14203 it->current_x = saved_x;
14206 it->object = saved_object; 14204 it->object = saved_object;
@@ -14483,7 +14481,7 @@ display_line (it)
14483 row->exact_window_width_line_p = 1; 14481 row->exact_window_width_line_p = 1;
14484 else 14482 else
14485#endif /* HAVE_WINDOW_SYSTEM */ 14483#endif /* HAVE_WINDOW_SYSTEM */
14486 if ((append_space (it, 1) && row->used[TEXT_AREA] == 1) 14484 if ((append_space_for_newline (it, 1) && row->used[TEXT_AREA] == 1)
14487 || row->used[TEXT_AREA] == 0) 14485 || row->used[TEXT_AREA] == 0)
14488 { 14486 {
14489 row->glyphs[TEXT_AREA]->charpos = -1; 14487 row->glyphs[TEXT_AREA]->charpos = -1;
@@ -14725,7 +14723,7 @@ display_line (it)
14725 /* Add a space at the end of the line that is used to 14723 /* Add a space at the end of the line that is used to
14726 display the cursor there. */ 14724 display the cursor there. */
14727 if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) 14725 if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
14728 append_space (it, 0); 14726 append_space_for_newline (it, 0);
14729#endif /* HAVE_WINDOW_SYSTEM */ 14727#endif /* HAVE_WINDOW_SYSTEM */
14730 14728
14731 /* Extend the face to the end of the line. */ 14729 /* Extend the face to the end of the line. */
@@ -18514,6 +18512,8 @@ void
18514x_produce_glyphs (it) 18512x_produce_glyphs (it)
18515 struct it *it; 18513 struct it *it;
18516{ 18514{
18515 int extra_line_spacing = it->extra_line_spacing;
18516
18517 it->glyph_not_available_p = 0; 18517 it->glyph_not_available_p = 0;
18518 18518
18519 if (it->what == IT_CHARACTER) 18519 if (it->what == IT_CHARACTER)
@@ -18589,6 +18589,12 @@ x_produce_glyphs (it)
18589 18589
18590 it->nglyphs = 1; 18590 it->nglyphs = 1;
18591 18591
18592 if (it->use_default_face)
18593 {
18594 font = FRAME_FONT (it->f);
18595 boff = FRAME_BASELINE_OFFSET (it->f);
18596 }
18597
18592 pcm = FRAME_RIF (it->f)->per_char_metric 18598 pcm = FRAME_RIF (it->f)->per_char_metric
18593 (font, &char2b, FONT_TYPE_FOR_UNIBYTE (font, it->char_to_display)); 18599 (font, &char2b, FONT_TYPE_FOR_UNIBYTE (font, it->char_to_display));
18594 18600
@@ -18612,18 +18618,19 @@ x_produce_glyphs (it)
18612 if (it->constrain_row_ascent_descent_p) 18618 if (it->constrain_row_ascent_descent_p)
18613 { 18619 {
18614 if (it->descent > it->max_descent) 18620 if (it->descent > it->max_descent)
18615 { 18621 {
18616 it->ascent += it->descent - it->max_descent; 18622 it->ascent += it->descent - it->max_descent;
18617 it->descent = it->max_descent; 18623 it->descent = it->max_descent;
18618 } 18624 }
18619 if (it->ascent> it->max_ascent) 18625 if (it->ascent > it->max_ascent)
18620 { 18626 {
18621 it->descent = min (it->max_descent, it->descent + it->ascent - it->max_ascent); 18627 it->descent = min (it->max_descent, it->descent + it->ascent - it->max_ascent);
18622 it->ascent = it->max_ascent; 18628 it->ascent = it->max_ascent;
18623 } 18629 }
18624 it->phys_ascent = min (it->phys_ascent, it->ascent); 18630 it->phys_ascent = min (it->phys_ascent, it->ascent);
18625 it->phys_descent = min (it->phys_descent, it->descent); 18631 it->phys_descent = min (it->phys_descent, it->descent);
18626 } 18632 extra_line_spacing = 0;
18633 }
18627 18634
18628 /* If this is a space inside a region of text with 18635 /* If this is a space inside a region of text with
18629 `space-width' property, change its width. */ 18636 `space-width' property, change its width. */
@@ -18695,32 +18702,68 @@ x_produce_glyphs (it)
18695 But if previous part of the line set a height, don't 18702 But if previous part of the line set a height, don't
18696 increase that height */ 18703 increase that height */
18697 18704
18705 Lisp_Object lsp, lh;
18706
18698 it->pixel_width = 0; 18707 it->pixel_width = 0;
18699 it->nglyphs = 0; 18708 it->nglyphs = 0;
18700 18709
18710 lh = Fget_text_property (IT_CHARPOS (*it), Qline_height, it->object);
18711
18712 if (EQ (lh, Qt))
18713 {
18714 it->use_default_face = 1;
18715 font = FRAME_FONT (it->f);
18716 boff = FRAME_BASELINE_OFFSET (it->f);
18717 font_info = NULL;
18718 }
18719
18701 it->ascent = FONT_BASE (font) + boff; 18720 it->ascent = FONT_BASE (font) + boff;
18702 it->descent = FONT_DESCENT (font) - boff; 18721 it->descent = FONT_DESCENT (font) - boff;
18703 18722
18704 if (it->max_ascent > 0 || it->max_descent > 0) 18723 if (EQ (lh, make_number (0)))
18705 { 18724 {
18706 it->ascent = it->descent = 0; 18725 if (it->descent > it->max_descent)
18726 {
18727 it->ascent += it->descent - it->max_descent;
18728 it->descent = it->max_descent;
18729 }
18730 if (it->ascent > it->max_ascent)
18731 {
18732 it->descent = min (it->max_descent, it->descent + it->ascent - it->max_ascent);
18733 it->ascent = it->max_ascent;
18734 }
18735 it->phys_ascent = min (it->phys_ascent, it->ascent);
18736 it->phys_descent = min (it->phys_descent, it->descent);
18737 it->constrain_row_ascent_descent_p = 1;
18738 extra_line_spacing = 0;
18707 } 18739 }
18708 else 18740 else
18709 { 18741 {
18710 it->ascent = FONT_BASE (font) + boff; 18742 int explicit_height = -1;
18711 it->descent = FONT_DESCENT (font) - boff; 18743 it->phys_ascent = it->ascent;
18712 } 18744 it->phys_descent = it->descent;
18713 18745
18714 it->phys_ascent = it->ascent; 18746 if ((it->max_ascent > 0 || it->max_descent > 0)
18715 it->phys_descent = it->descent; 18747 && face->box != FACE_NO_BOX
18748 && face->box_line_width > 0)
18749 {
18750 it->ascent += face->box_line_width;
18751 it->descent += face->box_line_width;
18752 }
18753 if (INTEGERP (lh))
18754 explicit_height = XINT (lh);
18755 else if (FLOATP (lh))
18756 explicit_height = (it->phys_ascent + it->phys_descent) * XFLOAT_DATA (lh);
18716 18757
18717 if ((it->max_ascent > 0 || it->max_descent > 0) 18758 if (explicit_height > it->ascent + it->descent)
18718 && face->box != FACE_NO_BOX 18759 it->ascent = explicit_height - it->descent;
18719 && face->box_line_width > 0)
18720 {
18721 it->ascent += face->box_line_width;
18722 it->descent += face->box_line_width;
18723 } 18760 }
18761
18762 lsp = Fget_text_property (IT_CHARPOS (*it), Qline_spacing, it->object);
18763 if (INTEGERP (lsp))
18764 extra_line_spacing = XINT (lsp);
18765 else if (FLOATP (lsp))
18766 extra_line_spacing = (it->phys_ascent + it->phys_descent) * XFLOAT_DATA (lsp);
18724 } 18767 }
18725 else if (it->char_to_display == '\t') 18768 else if (it->char_to_display == '\t')
18726 { 18769 {
@@ -19097,7 +19140,7 @@ x_produce_glyphs (it)
19097 if (it->area == TEXT_AREA) 19140 if (it->area == TEXT_AREA)
19098 it->current_x += it->pixel_width; 19141 it->current_x += it->pixel_width;
19099 19142
19100 it->descent += it->extra_line_spacing; 19143 it->descent += extra_line_spacing;
19101 19144
19102 it->max_ascent = max (it->max_ascent, it->ascent); 19145 it->max_ascent = max (it->max_ascent, it->ascent);
19103 it->max_descent = max (it->max_descent, it->descent); 19146 it->max_descent = max (it->max_descent, it->descent);
@@ -21743,6 +21786,8 @@ syms_of_xdisp ()
21743 staticpro (&Qright_margin); 21786 staticpro (&Qright_margin);
21744 Qcenter = intern ("center"); 21787 Qcenter = intern ("center");
21745 staticpro (&Qcenter); 21788 staticpro (&Qcenter);
21789 Qline_height = intern ("line-height");
21790 staticpro (&Qline_height);
21746 QCalign_to = intern (":align-to"); 21791 QCalign_to = intern (":align-to");
21747 staticpro (&QCalign_to); 21792 staticpro (&QCalign_to);
21748 QCrelative_width = intern (":relative-width"); 21793 QCrelative_width = intern (":relative-width");
diff --git a/src/xfaces.c b/src/xfaces.c
index 2e6d43a54b7..9e49833c736 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3482,32 +3482,6 @@ merge_face_vectors (f, from, to, cycle_check)
3482 to[LFACE_INHERIT_INDEX] = Qnil; 3482 to[LFACE_INHERIT_INDEX] = Qnil;
3483} 3483}
3484 3484
3485
3486/* Checks the `cycle check' variable CHECK to see if it indicates that
3487 EL is part of a cycle; CHECK must be either Qnil or a value returned
3488 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
3489 elements after which a cycle might be suspected; after that many
3490 elements, this macro begins consing in order to keep more precise
3491 track of elements.
3492
3493 Returns nil if a cycle was detected, otherwise a new value for CHECK
3494 that includes EL.
3495
3496 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
3497 the caller should make sure that's ok. */
3498
3499#define CYCLE_CHECK(check, el, suspicious) \
3500 (NILP (check) \
3501 ? make_number (0) \
3502 : (INTEGERP (check) \
3503 ? (XFASTINT (check) < (suspicious) \
3504 ? make_number (XFASTINT (check) + 1) \
3505 : Fcons (el, Qnil)) \
3506 : (!NILP (Fmemq ((el), (check))) \
3507 ? Qnil \
3508 : Fcons ((el), (check)))))
3509
3510
3511/* Merge face attributes from the face on frame F whose name is 3485/* Merge face attributes from the face on frame F whose name is
3512 INHERITS, into the vector of face attributes TO; INHERITS may also be 3486 INHERITS, into the vector of face attributes TO; INHERITS may also be
3513 a list of face names, in which case they are applied in order. 3487 a list of face names, in which case they are applied in order.
diff --git a/src/xterm.c b/src/xterm.c
index 838d4f2ad4b..b8be6c13041 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7261,7 +7261,8 @@ x_draw_hollow_cursor (w, row)
7261 /* Compute the proper height and ascent of the rectangle, based 7261 /* Compute the proper height and ascent of the rectangle, based
7262 on the actual glyph. Using the full height of the row looks 7262 on the actual glyph. Using the full height of the row looks
7263 bad when there are tall images on that row. */ 7263 bad when there are tall images on that row. */
7264 h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); 7264 h = max (min (FRAME_LINE_HEIGHT (f), row->height),
7265 cursor_glyph->ascent + cursor_glyph->descent);
7265 if (h < row->height) 7266 if (h < row->height)
7266 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; 7267 y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h;
7267 h--; 7268 h--;