aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-05-11 09:12:09 +0000
committerKaroly Lorentey2004-05-11 09:12:09 +0000
commitd9858e4f1889a61b216ae1f99053846362067ccc (patch)
treed0f18015bf1ebe06f489de11b74b4e4b5e98fdc3 /src
parentab4b17bed77ba635b5654accdfde3fbdf125f3e6 (diff)
parenta57e8159253e6ddd74b0453de7c526a9895b9576 (diff)
downloademacs-d9858e4f1889a61b216ae1f99053846362067ccc.tar.gz
emacs-d9858e4f1889a61b216ae1f99053846362067ccc.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-291 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-292 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-293 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-294 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-298 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-162
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog38
-rw-r--r--src/data.c4
-rw-r--r--src/fileio.c4
-rw-r--r--src/fns.c42
-rw-r--r--src/lisp.h1
-rw-r--r--src/print.c2
-rw-r--r--src/w32fns.c10
-rw-r--r--src/xdisp.c10
-rw-r--r--src/xfns.c2
9 files changed, 67 insertions, 46 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5168e9126e1..fad84ff38f5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,41 @@
12004-05-10 Andreas Schwab <schwab@suse.de>
2
3 * lisp.h: Declare Fmake_symbolic_link.
4
5 * fileio.c (Frename_file): Remove extra argument in call to
6 Fmake_symbolic_link.
7
82004-05-10 Kim F. Storm <storm@cua.dk>
9
10 * xdisp.c (calc_line_height_property): Use string position when
11 object is a string.
12
132004-05-10 Kenichi Handa <handa@m17n.org>
14
15 * print.c (temp_output_buffer_setup): Bind inhibit-read-only and
16 inhibit-modification-hooks to t temporarily before calling
17 Ferase_buffer.
18
19 * xfns.c (x_create_tip_frame): Bind inhibit-read-only and
20 inhibit-modification-hooks to t temporarily before calling
21 Ferase_buffer.
22
23 * w32fns.c (x_create_tip_frame): Bind inhibit-read-only and
24 inhibit-modification-hooks to t temporarily before calling
25 Ferase_buffer.
26
27 * fns.c (count_combining): Delete it.
28 (concat): Don't check combining bytes.
29
302004-05-09 Jason Rumney <jasonr@gnu.org>
31
32 * w32fns.c (Vw32_ansi_code_page): New Lisp variable.
33 (globals_of_w32fns): Set it.
34
352004-05-09 Piet van Oostrum <piet@cs.uu.nl> (tiny change)
36
37 * data.c (Fquo): Simplify.
38
12004-05-08 Peter Whaite <emacs@whaite.ca> (tiny change) 392004-05-08 Peter Whaite <emacs@whaite.ca> (tiny change)
2 40
3 * data.c (Fquo): If any argument is float, do the computation in 41 * data.c (Fquo): If any argument is float, do the computation in
diff --git a/src/data.c b/src/data.c
index 1a66e52632a..992aac66476 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2699,9 +2699,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */)
2699 Lisp_Object *args; 2699 Lisp_Object *args;
2700{ 2700{
2701 int argnum; 2701 int argnum;
2702 if (nargs == 2) 2702 for (argnum = 2; argnum < nargs; argnum++)
2703 return arith_driver (Adiv, nargs, args);
2704 for (argnum = 0; argnum < nargs; argnum++)
2705 if (FLOATP (args[argnum])) 2703 if (FLOATP (args[argnum]))
2706 return float_arith_driver (0, 0, Adiv, nargs, args); 2704 return float_arith_driver (0, 0, Adiv, nargs, args);
2707 return arith_driver (Adiv, nargs, args); 2705 return arith_driver (Adiv, nargs, args);
diff --git a/src/fileio.c b/src/fileio.c
index bd84ce6121b..6be8cbe18f6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,5 +1,5 @@
1/* File IO for GNU Emacs. 1/* File IO for GNU Emacs.
2 Copyright (C) 1985,86,87,88,93,94,95,96,97,98,99,2000,01,2003 2 Copyright (C) 1985,86,87,88,93,94,95,96,97,98,99,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.
@@ -2731,7 +2731,7 @@ This is what happens in interactive use with M-x. */)
2731 symlink_target = Ffile_symlink_p (file); 2731 symlink_target = Ffile_symlink_p (file);
2732 if (! NILP (symlink_target)) 2732 if (! NILP (symlink_target))
2733 Fmake_symbolic_link (symlink_target, newname, 2733 Fmake_symbolic_link (symlink_target, newname,
2734 NILP (ok_if_already_exists) ? Qnil : Qt, Qt); 2734 NILP (ok_if_already_exists) ? Qnil : Qt);
2735 else 2735 else
2736#endif 2736#endif
2737 Fcopy_file (file, newname, 2737 Fcopy_file (file, newname,
diff --git a/src/fns.c b/src/fns.c
index 1dbb9fb7c33..6001d99fb49 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -527,27 +527,6 @@ with the original. */)
527 return concat (1, &arg, CONSP (arg) ? Lisp_Cons : XTYPE (arg), 0); 527 return concat (1, &arg, CONSP (arg) ? Lisp_Cons : XTYPE (arg), 0);
528} 528}
529 529
530/* In string STR of length LEN, see if bytes before STR[I] combine
531 with bytes after STR[I] to form a single character. If so, return
532 the number of bytes after STR[I] which combine in this way.
533 Otherwize, return 0. */
534
535static int
536count_combining (str, len, i)
537 unsigned char *str;
538 int len, i;
539{
540 int j = i - 1, bytes;
541
542 if (i == 0 || i == len || CHAR_HEAD_P (str[i]))
543 return 0;
544 while (j >= 0 && !CHAR_HEAD_P (str[j])) j--;
545 if (j < 0 || ! BASE_LEADING_CODE_P (str[j]))
546 return 0;
547 PARSE_MULTIBYTE_SEQ (str + j, len - j, bytes);
548 return (bytes <= i - j ? 0 : bytes - (i - j));
549}
550
551/* This structure holds information of an argument of `concat' that is 530/* This structure holds information of an argument of `concat' that is
552 a string and has text properties to be copied. */ 531 a string and has text properties to be copied. */
553struct textprop_rec 532struct textprop_rec
@@ -710,25 +689,18 @@ concat (nargs, args, target_type, last_special)
710 && STRING_MULTIBYTE (this) == some_multibyte) 689 && STRING_MULTIBYTE (this) == some_multibyte)
711 { 690 {
712 int thislen_byte = SBYTES (this); 691 int thislen_byte = SBYTES (this);
713 int combined;
714 692
715 bcopy (SDATA (this), SDATA (val) + toindex_byte, 693 bcopy (SDATA (this), SDATA (val) + toindex_byte,
716 SBYTES (this)); 694 SBYTES (this));
717 combined = (some_multibyte && toindex_byte > 0
718 ? count_combining (SDATA (val),
719 toindex_byte + thislen_byte,
720 toindex_byte)
721 : 0);
722 if (! NULL_INTERVAL_P (STRING_INTERVALS (this))) 695 if (! NULL_INTERVAL_P (STRING_INTERVALS (this)))
723 { 696 {
724 textprops[num_textprops].argnum = argnum; 697 textprops[num_textprops].argnum = argnum;
725 /* We ignore text properties on characters being combined. */ 698 textprops[num_textprops].from = 0;
726 textprops[num_textprops].from = combined;
727 textprops[num_textprops++].to = toindex; 699 textprops[num_textprops++].to = toindex;
728 } 700 }
729 toindex_byte += thislen_byte; 701 toindex_byte += thislen_byte;
730 toindex += thisleni - combined; 702 toindex += thisleni;
731 STRING_SET_CHARS (val, SCHARS (val) - combined); 703 STRING_SET_CHARS (val, SCHARS (val));
732 } 704 }
733 /* Copy a single-byte string to a multibyte string. */ 705 /* Copy a single-byte string to a multibyte string. */
734 else if (STRINGP (this) && STRINGP (val)) 706 else if (STRINGP (this) && STRINGP (val))
@@ -814,13 +786,7 @@ concat (nargs, args, target_type, last_special)
814 SDATA (val) + toindex_byte); 786 SDATA (val) + toindex_byte);
815 else 787 else
816 SSET (val, toindex_byte++, XINT (elt)); 788 SSET (val, toindex_byte++, XINT (elt));
817 if (some_multibyte 789 toindex++;
818 && toindex_byte > 0
819 && count_combining (SDATA (val),
820 toindex_byte, toindex_byte - 1))
821 STRING_SET_CHARS (val, SCHARS (val) - 1);
822 else
823 toindex++;
824 } 790 }
825 else 791 else
826 /* If we have any multibyte characters, 792 /* If we have any multibyte characters,
diff --git a/src/lisp.h b/src/lisp.h
index 7e59c50c3b4..023bedaea04 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2743,6 +2743,7 @@ extern void syms_of_fileio P_ ((void));
2743EXFUN (Fmake_temp_name, 1); 2743EXFUN (Fmake_temp_name, 1);
2744extern void init_fileio_once P_ ((void)); 2744extern void init_fileio_once P_ ((void));
2745extern Lisp_Object make_temp_name P_ ((Lisp_Object, int)); 2745extern Lisp_Object make_temp_name P_ ((Lisp_Object, int));
2746EXFUN (Fmake_symbolic_link, 3);
2746 2747
2747/* Defined in abbrev.c */ 2748/* Defined in abbrev.c */
2748 2749
diff --git a/src/print.c b/src/print.c
index 7548bc75661..e729b468fd1 100644
--- a/src/print.c
+++ b/src/print.c
@@ -601,6 +601,8 @@ temp_output_buffer_setup (bufname)
601 eassert (current_buffer->overlays_after == NULL); 601 eassert (current_buffer->overlays_after == NULL);
602 current_buffer->enable_multibyte_characters 602 current_buffer->enable_multibyte_characters
603 = buffer_defaults.enable_multibyte_characters; 603 = buffer_defaults.enable_multibyte_characters;
604 specbind (Qinhibit_read_only, Qt);
605 specbind (Qinhibit_modification_hooks, Qt);
604 Ferase_buffer (); 606 Ferase_buffer ();
605 XSETBUFFER (buf, current_buffer); 607 XSETBUFFER (buf, current_buffer);
606 608
diff --git a/src/w32fns.c b/src/w32fns.c
index f9a81a19992..fc40f5f68da 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -234,6 +234,9 @@ Lisp_Object Qw32_charset_mac;
234Lisp_Object Qw32_charset_unicode; 234Lisp_Object Qw32_charset_unicode;
235#endif 235#endif
236 236
237/* The ANSI codepage. */
238Lisp_Object Vw32_ansi_code_page;
239
237/* Prefix for system colors. */ 240/* Prefix for system colors. */
238#define SYSTEM_COLOR_PREFIX "System" 241#define SYSTEM_COLOR_PREFIX "System"
239#define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1) 242#define SYSTEM_COLOR_PREFIX_LEN (sizeof (SYSTEM_COLOR_PREFIX) - 1)
@@ -7112,6 +7115,8 @@ x_create_tip_frame (dpyinfo, parms, text)
7112 old_buffer = current_buffer; 7115 old_buffer = current_buffer;
7113 set_buffer_internal_1 (XBUFFER (buffer)); 7116 set_buffer_internal_1 (XBUFFER (buffer));
7114 current_buffer->truncate_lines = Qnil; 7117 current_buffer->truncate_lines = Qnil;
7118 specbind (Qinhibit_read_only, Qt);
7119 specbind (Qinhibit_modification_hooks, Qt);
7115 Ferase_buffer (); 7120 Ferase_buffer ();
7116 Finsert (1, &text); 7121 Finsert (1, &text);
7117 set_buffer_internal_1 (old_buffer); 7122 set_buffer_internal_1 (old_buffer);
@@ -8793,6 +8798,11 @@ void globals_of_w32fns ()
8793 /* ditto for GetClipboardSequenceNumber. */ 8798 /* ditto for GetClipboardSequenceNumber. */
8794 clipboard_sequence_fn = (ClipboardSequence_Proc) 8799 clipboard_sequence_fn = (ClipboardSequence_Proc)
8795 GetProcAddress (user32_lib, "GetClipboardSequenceNumber"); 8800 GetProcAddress (user32_lib, "GetClipboardSequenceNumber");
8801
8802 DEFVAR_INT ("w32-ansi-code-page",
8803 &Vw32_ansi_code_page,
8804 doc: /* The ANSI code page used by the system. */);
8805 XSETINT (Vw32_ansi_code_page, GetACP ());
8796} 8806}
8797 8807
8798#undef abort 8808#undef abort
diff --git a/src/xdisp.c b/src/xdisp.c
index 83857e5bb84..7f5b38e550b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18528,12 +18528,16 @@ calc_line_height_property (it, prop, font, boff, total)
18528 XFontStruct *font; 18528 XFontStruct *font;
18529 int boff, *total; 18529 int boff, *total;
18530{ 18530{
18531 Lisp_Object val; 18531 Lisp_Object position, val;
18532 Lisp_Object face_name = Qnil; 18532 Lisp_Object face_name = Qnil;
18533 int ascent, descent, height, override; 18533 int ascent, descent, height, override;
18534 18534
18535 val = Fget_char_property (make_number (IT_CHARPOS (*it)), 18535 if (STRINGP (it->object))
18536 prop, it->object); 18536 position = make_number (IT_STRING_CHARPOS (*it));
18537 else
18538 position = make_number (IT_CHARPOS (*it));
18539
18540 val = Fget_char_property (position, prop, it->object);
18537 18541
18538 if (NILP (val)) 18542 if (NILP (val))
18539 return val; 18543 return val;
diff --git a/src/xfns.c b/src/xfns.c
index 93de6ee4bfa..3b0b2884246 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4447,6 +4447,8 @@ x_create_tip_frame (dpyinfo, parms, text)
4447 old_buffer = current_buffer; 4447 old_buffer = current_buffer;
4448 set_buffer_internal_1 (XBUFFER (buffer)); 4448 set_buffer_internal_1 (XBUFFER (buffer));
4449 current_buffer->truncate_lines = Qnil; 4449 current_buffer->truncate_lines = Qnil;
4450 specbind (Qinhibit_read_only, Qt);
4451 specbind (Qinhibit_modification_hooks, Qt);
4450 Ferase_buffer (); 4452 Ferase_buffer ();
4451 Finsert (1, &text); 4453 Finsert (1, &text);
4452 set_buffer_internal_1 (old_buffer); 4454 set_buffer_internal_1 (old_buffer);