Mercurial > hg > xemacs-beta
comparison src/minibuf.c @ 5922:4b055de36bb9 cygwin
merging heads 2
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Fri, 27 Feb 2015 17:47:15 +0000 |
parents | b79e1e02bf01 |
children |
comparison
equal
deleted
inserted
replaced
5921:68639fb08af8 | 5922:4b055de36bb9 |
---|---|
32 #include "console-stream.h" | 32 #include "console-stream.h" |
33 #include "events.h" | 33 #include "events.h" |
34 #include "frame-impl.h" | 34 #include "frame-impl.h" |
35 #include "insdel.h" | 35 #include "insdel.h" |
36 #include "redisplay.h" | 36 #include "redisplay.h" |
37 #include "text.h" | |
37 #include "window-impl.h" | 38 #include "window-impl.h" |
38 #include "elhash.h" | 39 #include "elhash.h" |
39 | 40 |
40 /* Depth in minibuffer invocations. */ | 41 /* Depth in minibuffer invocations. */ |
41 int minibuf_level; | 42 int minibuf_level; |
840 echo_area_append (struct frame *f, const Ibyte *nonreloc, Lisp_Object reloc, | 841 echo_area_append (struct frame *f, const Ibyte *nonreloc, Lisp_Object reloc, |
841 Bytecount offset, Bytecount length, | 842 Bytecount offset, Bytecount length, |
842 Lisp_Object label) | 843 Lisp_Object label) |
843 { | 844 { |
844 /* This function can call lisp */ | 845 /* This function can call lisp */ |
845 Lisp_Object obj; | |
846 struct gcpro gcpro1; | |
847 Lisp_Object frame; | |
848 | |
849 /* There is an inlining bug in egcs-20000131 c++ that can be worked | 846 /* There is an inlining bug in egcs-20000131 c++ that can be worked |
850 around as follows: */ | 847 around as follows: */ |
851 #if defined (__GNUC__) && defined (__cplusplus) | 848 #if defined (__GNUC__) && defined (__cplusplus) |
852 alloca (4); | 849 alloca (4); |
853 #endif | 850 #endif |
862 | 859 |
863 /* also check it here, in case the string was really blank. */ | 860 /* also check it here, in case the string was really blank. */ |
864 if (length == 0) | 861 if (length == 0) |
865 return; | 862 return; |
866 | 863 |
867 if (!NILP (Ffboundp (Qappend_message))) | 864 if (!UNBOUNDP (XSYMBOL_FUNCTION (Qappend_message))) |
868 { | 865 { |
869 if (STRINGP (reloc) && offset == 0 && length == XSTRING_LENGTH (reloc)) | 866 Lisp_Object obj |
870 obj = reloc; | 867 = STRINGP (reloc) ? reloc : make_string (nonreloc + offset, length); |
871 else | 868 Lisp_Object args[] = { Qappend_message, label, obj, wrap_frame (f), |
872 { | 869 EQ (label, Qprint) ? Qt : Qnil, Q_start, Qzero, |
873 if (STRINGP (reloc)) | 870 Q_end, Qnil }; |
874 nonreloc = XSTRING_DATA (reloc); | 871 struct gcpro gcpro1; |
875 obj = make_string (nonreloc + offset, length); | 872 |
876 } | 873 if (STRINGP (reloc) |
877 | 874 && (offset != 0 || length != XSTRING_LENGTH (reloc))) |
878 frame = wrap_frame (f); | 875 { |
879 GCPRO1 (obj); | 876 assert (EQ (args[5], Q_start)); |
880 call4 (Qappend_message, label, obj, frame, | 877 args[6] = make_fixnum (string_index_byte_to_char (reloc, offset)); |
881 EQ (label, Qprint) ? Qt : Qnil); | 878 assert (EQ (args[7], Q_end)); |
879 args[8] | |
880 = make_fixnum (string_index_byte_to_char (reloc, offset + length)); | |
881 } | |
882 GCPRO1 (args[0]); | |
883 gcpro1.nvars = countof (args); | |
884 Ffuncall (countof (args), args); | |
882 UNGCPRO; | 885 UNGCPRO; |
883 } | 886 } |
884 else | 887 else |
885 { | 888 { |
886 if (STRINGP (reloc)) | 889 if (STRINGP (reloc)) |