comparison src/buffer.c @ 20:859a2309aef8 r19-15b93

Import from CVS: tag r19-15b93
author cvs
date Mon, 13 Aug 2007 08:50:05 +0200
parents 0293115a14e9
children 4103f0995bd7
comparison
equal deleted inserted replaced
19:ac1f612d5250 20:859a2309aef8
290 print_internal (b->name, printcharfun, 0); 290 print_internal (b->name, printcharfun, 0);
291 } 291 }
292 } 292 }
293 293
294 294
295 DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0 /* 295 DEFUN ("bufferp", Fbufferp, 1, 1, 0, /*
296 T if OBJECT is an editor buffer. 296 T if OBJECT is an editor buffer.
297 */ ) 297 */
298 (object) 298 (object))
299 Lisp_Object object;
300 { 299 {
301 if (BUFFERP (object)) 300 if (BUFFERP (object))
302 return Qt; 301 return Qt;
303 return Qnil; 302 return Qnil;
304 } 303 }
305 304
306 DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0 /* 305 DEFUN ("buffer-live-p", Fbuffer_live_p, 1, 1, 0, /*
307 T if OBJECT is an editor buffer that has not been deleted. 306 T if OBJECT is an editor buffer that has not been deleted.
308 */ ) 307 */
309 (object) 308 (object))
310 Lisp_Object object;
311 { 309 {
312 if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) 310 if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object)))
313 return Qt; 311 return Qt;
314 return Qnil; 312 return Qnil;
315 } 313 }
320 if (STRINGP (spec)) 318 if (STRINGP (spec))
321 error ("No buffer named %s", XSTRING_DATA (spec)); 319 error ("No buffer named %s", XSTRING_DATA (spec));
322 signal_simple_error ("Invalid buffer argument", spec); 320 signal_simple_error ("Invalid buffer argument", spec);
323 } 321 }
324 322
325 DEFUN ("buffer-list", Fbuffer_list, Sbuffer_list, 0, 1, 0 /* 323 DEFUN ("buffer-list", Fbuffer_list, 0, 1, 0, /*
326 Return a list of all existing live buffers. 324 Return a list of all existing live buffers.
327 The order is specific to the selected frame; if the optional FRAME 325 The order is specific to the selected frame; if the optional FRAME
328 argument is provided, the ordering for that frame is returned instead. 326 argument is provided, the ordering for that frame is returned instead.
329 If the FRAME argument is t, then the global (non-frame) ordering is 327 If the FRAME argument is t, then the global (non-frame) ordering is
330 returned instead. 328 returned instead.
331 */ ) 329 */
332 (frame) 330 (frame))
333 Lisp_Object frame;
334 { 331 {
335 Lisp_Object list; 332 Lisp_Object list;
336 if (EQ (frame, Qt)) 333 if (EQ (frame, Qt))
337 list = Vbuffer_alist; 334 list = Vbuffer_alist;
338 else 335 else
387 384
388 CHECK_LIVE_BUFFER (buffer); 385 CHECK_LIVE_BUFFER (buffer);
389 return XBUFFER (buffer); 386 return XBUFFER (buffer);
390 } 387 }
391 388
392 DEFUN ("decode-buffer", Fdecode_buffer, Sdecode_buffer, 1, 1, 0 /* 389 DEFUN ("decode-buffer", Fdecode_buffer, 1, 1, 0, /*
393 Validate BUFFER or if BUFFER is nil, return the current buffer. 390 Validate BUFFER or if BUFFER is nil, return the current buffer.
394 If BUFFER is a valid buffer or a string representing a valid buffer, 391 If BUFFER is a valid buffer or a string representing a valid buffer,
395 the corresponding buffer object will be returned. Otherwise an error 392 the corresponding buffer object will be returned. Otherwise an error
396 will be signaled. 393 will be signaled.
397 */ ) 394 */
398 (buffer) 395 (buffer))
399 Lisp_Object buffer;
400 { 396 {
401 struct buffer *b = decode_buffer (buffer, 1); 397 struct buffer *b = decode_buffer (buffer, 1);
402 XSETBUFFER (buffer, b); 398 XSETBUFFER (buffer, b);
403 return buffer; 399 return buffer;
404 } 400 }
424 return Qnil; 420 return Qnil;
425 } 421 }
426 422
427 #endif 423 #endif
428 424
429 DEFUN ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0 /* 425 DEFUN ("get-buffer", Fget_buffer, 1, 1, 0, /*
430 Return the buffer named NAME (a string). 426 Return the buffer named NAME (a string).
431 If there is no live buffer named NAME, return nil. 427 If there is no live buffer named NAME, return nil.
432 NAME may also be a buffer; if so, the value is that buffer. 428 NAME may also be a buffer; if so, the value is that buffer.
433 */ ) 429 */
434 (name) 430 (name))
435 Lisp_Object name;
436 { 431 {
437 #ifdef I18N3 432 #ifdef I18N3
438 /* #### Doc string should indicate that the buffer name will get 433 /* #### Doc string should indicate that the buffer name will get
439 translated. */ 434 translated. */
440 #endif 435 #endif
447 /* FSFmacs 19.29 calls assoc_ignore_text_properties() here. 442 /* FSFmacs 19.29 calls assoc_ignore_text_properties() here.
448 Bleagh!! */ 443 Bleagh!! */
449 } 444 }
450 445
451 446
452 DEFUN ("get-file-buffer", Fget_file_buffer, Sget_file_buffer, 1, 1, 0 /* 447 DEFUN ("get-file-buffer", Fget_file_buffer, 1, 1, 0, /*
453 Return the buffer visiting file FILENAME (a string). 448 Return the buffer visiting file FILENAME (a string).
454 The buffer's `buffer-file-name' must match exactly the expansion of FILENAME. 449 The buffer's `buffer-file-name' must match exactly the expansion of FILENAME.
455 If there is no such live buffer, return nil. 450 If there is no such live buffer, return nil.
456 451
457 Normally, the comparison is done by canonicalizing FILENAME (using 452 Normally, the comparison is done by canonicalizing FILENAME (using
460 non-nil, FILENAME will be converted to its truename and the search will be 455 non-nil, FILENAME will be converted to its truename and the search will be
461 done on each buffer's value of `buffer-file-truename' instead of 456 done on each buffer's value of `buffer-file-truename' instead of
462 `buffer-file-name'. Otherwise, if `find-file-use-truenames' is non-nil, 457 `buffer-file-name'. Otherwise, if `find-file-use-truenames' is non-nil,
463 FILENAME will be converted to its truename and used for searching, but 458 FILENAME will be converted to its truename and used for searching, but
464 the search will still be done on `buffer-file-name'. 459 the search will still be done on `buffer-file-name'.
465 */ ) 460 */
466 (filename) 461 (filename))
467 Lisp_Object filename;
468 { 462 {
469 /* This function can GC */ 463 /* This function can GC */
470 REGISTER Lisp_Object tail, buf, tem; 464 REGISTER Lisp_Object tail, buf, tem;
471 struct gcpro gcpro1; 465 struct gcpro gcpro1;
472 466
615 HASHTABLE_EQ); 609 HASHTABLE_EQ);
616 610
617 return buf; 611 return buf;
618 } 612 }
619 613
620 DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0 /* 614 DEFUN ("get-buffer-create", Fget_buffer_create, 1, 1, 0, /*
621 Return the buffer named NAME, or create such a buffer and return it. 615 Return the buffer named NAME, or create such a buffer and return it.
622 A new buffer is created if there is no live buffer named NAME. 616 A new buffer is created if there is no live buffer named NAME.
623 If NAME starts with a space, the new buffer does not keep undo information. 617 If NAME starts with a space, the new buffer does not keep undo information.
624 If NAME is a buffer instead of a string, then it is the value returned. 618 If NAME is a buffer instead of a string, then it is the value returned.
625 The value is never nil. 619 The value is never nil.
626 */ ) 620 */
627 (name) 621 (name))
628 Lisp_Object name;
629 { 622 {
630 /* This function can GC */ 623 /* This function can GC */
631 Lisp_Object buf; 624 Lisp_Object buf;
632 REGISTER struct buffer *b; 625 REGISTER struct buffer *b;
633 626
652 init_buffer_text (b, 0); 645 init_buffer_text (b, 0);
653 646
654 return finish_init_buffer (b, name); 647 return finish_init_buffer (b, name);
655 } 648 }
656 649
657 DEFUN ("make-indirect-buffer", 650 DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, 2, 2,
658 Fmake_indirect_buffer, Smake_indirect_buffer, 2, 2, 651 "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", /*
659 "bMake indirect buffer (to buffer): \nBName of indirect buffer: " /*
660 Create and return an indirect buffer for buffer BASE, named NAME. 652 Create and return an indirect buffer for buffer BASE, named NAME.
661 BASE should be an existing buffer (or buffer name). 653 BASE should be an existing buffer (or buffer name).
662 NAME should be a string which is not the name of an existing buffer. 654 NAME should be a string which is not the name of an existing buffer.
663 If BASE is an indirect buffer itself, the base buffer for that buffer 655 If BASE is an indirect buffer itself, the base buffer for that buffer
664 is made the base buffer for the newly created buffer. (Thus, there will 656 is made the base buffer for the newly created buffer. (Thus, there will
665 never be indirect buffers whose base buffers are themselves indirect.) 657 never be indirect buffers whose base buffers are themselves indirect.)
666 */ ) 658 */
667 (base_buffer, name) 659 (base_buffer, name))
668 Lisp_Object base_buffer, name;
669 { 660 {
670 error ("make-indirect-buffer not yet implemented, oops"); 661 error ("make-indirect-buffer not yet implemented, oops");
671 return Qnil; 662 return Qnil;
672 663
673 #if 0 /* #### implement this! Need various changes in insdel.c */ 664 #if 0 /* #### implement this! Need various changes in insdel.c */
729 720
730 /* We split this away from generate-new-buffer, because rename-buffer 721 /* We split this away from generate-new-buffer, because rename-buffer
731 and set-visited-file-name ought to be able to use this to really 722 and set-visited-file-name ought to be able to use this to really
732 rename the buffer properly. */ 723 rename the buffer properly. */
733 724
734 DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, 725 DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, 1, 2, 0, /*
735 Sgenerate_new_buffer_name,
736 1, 2, 0 /*
737 Return a string that is the name of no existing buffer based on NAME. 726 Return a string that is the name of no existing buffer based on NAME.
738 If there is no live buffer named NAME, then return NAME. 727 If there is no live buffer named NAME, then return NAME.
739 Otherwise modify name by appending `<NUMBER>', incrementing NUMBER 728 Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
740 until an unused name is found, and then return that name. 729 until an unused name is found, and then return that name.
741 Optional second argument IGNORE specifies a name that is okay to use 730 Optional second argument IGNORE specifies a name that is okay to use
742 \(if it is in the sequence to be tried) 731 \(if it is in the sequence to be tried)
743 even if a buffer with that name exists. 732 even if a buffer with that name exists.
744 */ ) 733 */
745 (name, ignore) 734 (name, ignore))
746 Lisp_Object name, ignore;
747 { 735 {
748 REGISTER Lisp_Object gentemp, tem; 736 REGISTER Lisp_Object gentemp, tem;
749 int count; 737 int count;
750 char number[10]; 738 char number[10];
751 739
777 return (gentemp); 765 return (gentemp);
778 } 766 }
779 } 767 }
780 768
781 769
782 DEFUN ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0 /* 770 DEFUN ("buffer-name", Fbuffer_name, 0, 1, 0, /*
783 Return the name of BUFFER, as a string. 771 Return the name of BUFFER, as a string.
784 With no argument or nil as argument, return the name of the current buffer. 772 With no argument or nil as argument, return the name of the current buffer.
785 */ ) 773 */
786 (buffer) 774 (buffer))
787 Lisp_Object buffer;
788 { 775 {
789 /* For compatibility, we allow a dead buffer here. 776 /* For compatibility, we allow a dead buffer here.
790 Earlier versions of Emacs didn't provide buffer-live-p. */ 777 Earlier versions of Emacs didn't provide buffer-live-p. */
791 if (NILP (buffer)) 778 if (NILP (buffer))
792 return current_buffer->name; 779 return current_buffer->name;
793 CHECK_BUFFER (buffer); 780 CHECK_BUFFER (buffer);
794 return XBUFFER (buffer)->name; 781 return XBUFFER (buffer)->name;
795 } 782 }
796 783
797 DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0 /* 784 DEFUN ("buffer-file-name", Fbuffer_file_name, 0, 1, 0, /*
798 Return name of file BUFFER is visiting, or nil if none. 785 Return name of file BUFFER is visiting, or nil if none.
799 No argument or nil as argument means use the current buffer. 786 No argument or nil as argument means use the current buffer.
800 */ ) 787 */
801 (buffer) 788 (buffer))
802 Lisp_Object buffer;
803 { 789 {
804 /* For compatibility, we allow a dead buffer here. Yuck! */ 790 /* For compatibility, we allow a dead buffer here. Yuck! */
805 if (NILP (buffer)) 791 if (NILP (buffer))
806 return current_buffer->filename; 792 return current_buffer->filename;
807 CHECK_BUFFER (buffer); 793 CHECK_BUFFER (buffer);
808 return XBUFFER (buffer)->filename; 794 return XBUFFER (buffer)->filename;
809 } 795 }
810 796
811 DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, 797 DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, 0, 1, 0, /*
812 0, 1, 0 /*
813 Return the base buffer of indirect buffer BUFFER. 798 Return the base buffer of indirect buffer BUFFER.
814 If BUFFER is not indirect, return nil. 799 If BUFFER is not indirect, return nil.
815 */ ) 800 */
816 (buffer) 801 (buffer))
817 Lisp_Object buffer;
818 { 802 {
819 struct buffer *buf = decode_buffer (buffer, 0); 803 struct buffer *buf = decode_buffer (buffer, 0);
820 struct buffer *base = buf->base_buffer; 804 struct buffer *base = buf->base_buffer;
821 Lisp_Object base_buffer = Qnil; 805 Lisp_Object base_buffer = Qnil;
822 806
824 return Qnil; 808 return Qnil;
825 XSETBUFFER (base_buffer, base); 809 XSETBUFFER (base_buffer, base);
826 return base_buffer; 810 return base_buffer;
827 } 811 }
828 812
829 DEFUN ("buffer-indirect-children", Fbuffer_indirect_children, 813 DEFUN ("buffer-indirect-children", Fbuffer_indirect_children, 0, 1, 0, /*
830 Sbuffer_indirect_children,
831 0, 1, 0 /*
832 Return a list of all indirect buffers whose base buffer is BUFFER. 814 Return a list of all indirect buffers whose base buffer is BUFFER.
833 If BUFFER is indirect, the return value will always be nil; see 815 If BUFFER is indirect, the return value will always be nil; see
834 `make-indirect-buffer'. 816 `make-indirect-buffer'.
835 */ ) 817 */
836 (buffer) 818 (buffer))
837 Lisp_Object buffer;
838 { 819 {
839 struct buffer *buf = decode_buffer (buffer, 0); 820 struct buffer *buf = decode_buffer (buffer, 0);
840 821
841 return Fcopy_sequence (buf->indirect_children); 822 return Fcopy_sequence (buf->indirect_children);
842 } 823 }
874 } 855 }
875 856
876 return 0; 857 return 0;
877 } 858 }
878 859
879 DEFUN ("buffer-local-variables", Fbuffer_local_variables, 860 DEFUN ("buffer-local-variables", Fbuffer_local_variables, 0, 1, 0, /*
880 Sbuffer_local_variables, 0, 1, 0 /*
881 Return an alist of variables that are buffer-local in BUFFER. 861 Return an alist of variables that are buffer-local in BUFFER.
882 Most elements look like (SYMBOL . VALUE), describing one variable. 862 Most elements look like (SYMBOL . VALUE), describing one variable.
883 For a symbol that is locally unbound, just the symbol appears in the value. 863 For a symbol that is locally unbound, just the symbol appears in the value.
884 Note that storing new VALUEs in these elements doesn't change the variables. 864 Note that storing new VALUEs in these elements doesn't change the variables.
885 No argument or nil as argument means use current buffer as BUFFER. 865 No argument or nil as argument means use current buffer as BUFFER.
886 */ ) 866 */
887 (buffer) 867 (buffer))
888 Lisp_Object buffer;
889 { 868 {
890 struct buffer *buf = decode_buffer (buffer, 0); 869 struct buffer *buf = decode_buffer (buffer, 0);
891 Lisp_Object result = Qnil; 870 Lisp_Object result = Qnil;
892 871
893 { 872 {
927 #undef MARKED_SLOT 906 #undef MARKED_SLOT
928 } 907 }
929 return (result); 908 return (result);
930 } 909 }
931 910
932 DEFUN ("buffer-dedicated-frame", Fbuffer_dedicated_frame, 911 DEFUN ("buffer-dedicated-frame", Fbuffer_dedicated_frame, 0, 1, 0, /*
933 Sbuffer_dedicated_frame,
934 0, 1, 0 /*
935 Return the frame dedicated to this BUFFER, or nil if there is none. 912 Return the frame dedicated to this BUFFER, or nil if there is none.
936 No argument or nil as argument means use current buffer as BUFFER. 913 No argument or nil as argument means use current buffer as BUFFER.
937 */ ) 914 */
938 (buffer) 915 (buffer))
939 Lisp_Object buffer;
940 { 916 {
941 struct buffer *buf = decode_buffer (buffer, 0); 917 struct buffer *buf = decode_buffer (buffer, 0);
942 918
943 /* XEmacs addition: if the frame is dead, silently make it go away. */ 919 /* XEmacs addition: if the frame is dead, silently make it go away. */
944 if (!NILP (buf->dedicated_frame) && 920 if (!NILP (buf->dedicated_frame) &&
946 buf->dedicated_frame = Qnil; 922 buf->dedicated_frame = Qnil;
947 923
948 return buf->dedicated_frame; 924 return buf->dedicated_frame;
949 } 925 }
950 926
951 DEFUN ("set-buffer-dedicated-frame", Fset_buffer_dedicated_frame, 927 DEFUN ("set-buffer-dedicated-frame", Fset_buffer_dedicated_frame, 2, 2, 0, /*
952 Sset_buffer_dedicated_frame,
953 2, 2, 0 /*
954 For this BUFFER, set the FRAME dedicated to it. 928 For this BUFFER, set the FRAME dedicated to it.
955 FRAME must be a frame or nil. 929 FRAME must be a frame or nil.
956 */ ) 930 */
957 (buffer, frame) 931 (buffer, frame))
958 Lisp_Object buffer, frame;
959 { 932 {
960 struct buffer *buf = decode_buffer (buffer, 0); 933 struct buffer *buf = decode_buffer (buffer, 0);
961 934
962 if (!NILP (frame)) 935 if (!NILP (frame))
963 CHECK_LIVE_FRAME (frame); /* XEmacs change */ 936 CHECK_LIVE_FRAME (frame); /* XEmacs change */
965 return buf->dedicated_frame = frame; 938 return buf->dedicated_frame = frame;
966 } 939 }
967 940
968 941
969 942
970 DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, 943 DEFUN ("buffer-modified-p", Fbuffer_modified_p, 0, 1, 0, /*
971 0, 1, 0 /*
972 Return t if BUFFER was modified since its file was last read or saved. 944 Return t if BUFFER was modified since its file was last read or saved.
973 No argument or nil as argument means use current buffer as BUFFER. 945 No argument or nil as argument means use current buffer as BUFFER.
974 */ ) 946 */
975 (buffer) 947 (buffer))
976 Lisp_Object buffer;
977 { 948 {
978 struct buffer *buf = decode_buffer (buffer, 0); 949 struct buffer *buf = decode_buffer (buffer, 0);
979 950
980 return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil; 951 return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil;
981 } 952 }
982 953
983 DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, 954 DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, 1, 2, 0, /*
984 1, 2, 0 /*
985 Mark BUFFER as modified or unmodified according to FLAG. 955 Mark BUFFER as modified or unmodified according to FLAG.
986 A non-nil FLAG means mark the buffer modified. No argument or nil 956 A non-nil FLAG means mark the buffer modified. No argument or nil
987 as BUFFER means use current buffer. 957 as BUFFER means use current buffer.
988 */ ) 958 */
989 (flag, buffer) 959 (flag, buffer))
990 Lisp_Object flag, buffer;
991 { 960 {
992 /* This function can GC */ 961 /* This function can GC */
993 Lisp_Object fn; 962 Lisp_Object fn;
994 struct buffer *buf = decode_buffer (buffer, 0); 963 struct buffer *buf = decode_buffer (buffer, 0);
995 964
1048 #endif /* ENERGIZE */ 1017 #endif /* ENERGIZE */
1049 1018
1050 return flag; 1019 return flag;
1051 } 1020 }
1052 1021
1053 DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, Sbuffer_modified_tick, 1022 DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, 0, 1, 0, /*
1054 0, 1, 0 /*
1055 Return BUFFER's tick counter, incremented for each change in text. 1023 Return BUFFER's tick counter, incremented for each change in text.
1056 Each buffer has a tick counter which is incremented each time the text in 1024 Each buffer has a tick counter which is incremented each time the text in
1057 that buffer is changed. It wraps around occasionally. 1025 that buffer is changed. It wraps around occasionally.
1058 No argument or nil as argument means use current buffer as BUFFER. 1026 No argument or nil as argument means use current buffer as BUFFER.
1059 */ ) 1027 */
1060 (buffer) 1028 (buffer))
1061 Lisp_Object buffer;
1062 { 1029 {
1063 struct buffer *buf = decode_buffer (buffer, 0); 1030 struct buffer *buf = decode_buffer (buffer, 0);
1064 1031
1065 return make_int (BUF_MODIFF (buf)); 1032 return make_int (BUF_MODIFF (buf));
1066 } 1033 }
1067 1034
1068 DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, 1035 DEFUN ("rename-buffer", Frename_buffer, 1, 2,
1069 "sRename buffer (to new name): \nP" /* 1036 "sRename buffer (to new name): \nP", /*
1070 Change current buffer's name to NEWNAME (a string). 1037 Change current buffer's name to NEWNAME (a string).
1071 If second arg UNIQUE is nil or omitted, it is an error if a 1038 If second arg UNIQUE is nil or omitted, it is an error if a
1072 buffer named NEWNAME already exists. 1039 buffer named NEWNAME already exists.
1073 If UNIQUE is non-nil, come up with a new name using 1040 If UNIQUE is non-nil, come up with a new name using
1074 `generate-new-buffer-name'. 1041 `generate-new-buffer-name'.
1075 Interactively, one can set UNIQUE with a prefix argument. 1042 Interactively, one can set UNIQUE with a prefix argument.
1076 Returns the name we actually gave the buffer. 1043 Returns the name we actually gave the buffer.
1077 This does not change the name of the visited file (if any). 1044 This does not change the name of the visited file (if any).
1078 */ ) 1045 */
1079 (newname, unique) 1046 (newname, unique))
1080 Lisp_Object newname, unique;
1081 { 1047 {
1082 /* This function can GC */ 1048 /* This function can GC */
1083 Lisp_Object tem, buf; 1049 Lisp_Object tem, buf;
1084 1050
1085 #ifdef I18N3 1051 #ifdef I18N3
1126 /* refetch since that last call may have done GC */ 1092 /* refetch since that last call may have done GC */
1127 /* (hypothetical relocating GC) */ 1093 /* (hypothetical relocating GC) */
1128 return current_buffer->name; 1094 return current_buffer->name;
1129 } 1095 }
1130 1096
1131 DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0 /* 1097 DEFUN ("other-buffer", Fother_buffer, 0, 3, 0, /*
1132 Return most recently selected buffer other than BUFFER. 1098 Return most recently selected buffer other than BUFFER.
1133 Buffers not visible in windows are preferred to visible buffers, 1099 Buffers not visible in windows are preferred to visible buffers,
1134 unless optional third argument VISIBLE-OK is non-nil. 1100 unless optional third argument VISIBLE-OK is non-nil.
1135 If no other buffer exists, the buffer `*scratch*' is returned. 1101 If no other buffer exists, the buffer `*scratch*' is returned.
1136 If BUFFER is omitted or nil, some interesting buffer is returned. 1102 If BUFFER is omitted or nil, some interesting buffer is returned.
1139 is provided, then the ordering is for that frame. If the second arg 1105 is provided, then the ordering is for that frame. If the second arg
1140 is t, then the global ordering is returned. 1106 is t, then the global ordering is returned.
1141 1107
1142 Note: In FSF Emacs, this function takes two arguments: BUFFER and 1108 Note: In FSF Emacs, this function takes two arguments: BUFFER and
1143 VISIBLE-OK. 1109 VISIBLE-OK.
1144 */ ) 1110 */
1145 (buffer, frame, visible_ok) 1111 (buffer, frame, visible_ok))
1146 Lisp_Object buffer, frame, visible_ok;
1147 { 1112 {
1148 /* This function can GC */ 1113 /* This function can GC */
1149 Lisp_Object tail, buf, notsogood, tem; 1114 Lisp_Object tail, buf, notsogood, tem;
1150 Lisp_Object alist; 1115 Lisp_Object alist;
1151 1116
1198 return Fget_buffer_create (QSscratch); 1163 return Fget_buffer_create (QSscratch);
1199 } 1164 }
1200 1165
1201 /* XEmacs change: Make this argument required because this is a dangerous 1166 /* XEmacs change: Make this argument required because this is a dangerous
1202 function. */ 1167 function. */
1203 DEFUN ("buffer-disable-undo", Fbuffer_disable_undo, Sbuffer_disable_undo, 1, 1, "" /* 1168 DEFUN ("buffer-disable-undo", Fbuffer_disable_undo, 1, 1, "", /*
1204 Make BUFFER stop keeping undo information. 1169 Make BUFFER stop keeping undo information.
1205 Any undo records it already has are discarded. 1170 Any undo records it already has are discarded.
1206 */ ) 1171 */
1207 (buffer) 1172 (buffer))
1208 Lisp_Object buffer;
1209 { 1173 {
1210 /* Allowing nil is an RMSism */ 1174 /* Allowing nil is an RMSism */
1211 struct buffer *real_buf = decode_buffer (buffer, 1); 1175 struct buffer *real_buf = decode_buffer (buffer, 1);
1212 real_buf->undo_list = Qt; 1176 real_buf->undo_list = Qt;
1213 return Qnil; 1177 return Qnil;
1214 } 1178 }
1215 1179
1216 DEFUN ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo, 1180 DEFUN ("buffer-enable-undo", Fbuffer_enable_undo, 0, 1, "", /*
1217 0, 1, "" /*
1218 Start keeping undo information for buffer BUFFER. 1181 Start keeping undo information for buffer BUFFER.
1219 No argument or nil as argument means do this for the current buffer. 1182 No argument or nil as argument means do this for the current buffer.
1220 */ ) 1183 */
1221 (buffer) 1184 (buffer))
1222 Lisp_Object buffer;
1223 { 1185 {
1224 /* Allowing nil is an RMSism */ 1186 /* Allowing nil is an RMSism */
1225 struct buffer *real_buf = decode_buffer (buffer, 1); 1187 struct buffer *real_buf = decode_buffer (buffer, 1);
1226 if (EQ (real_buf->undo_list, Qt)) 1188 if (EQ (real_buf->undo_list, Qt))
1227 real_buf->undo_list = Qnil; 1189 real_buf->undo_list = Qnil;
1228 1190
1229 return Qnil; 1191 return Qnil;
1230 } 1192 }
1231 1193
1232 DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 1, 1, "bKill buffer: " /* 1194 DEFUN ("kill-buffer", Fkill_buffer, 1, 1, "bKill buffer: ", /*
1233 Kill the buffer BUFNAME. 1195 Kill the buffer BUFNAME.
1234 The argument may be a buffer or may be the name of a buffer. 1196 The argument may be a buffer or may be the name of a buffer.
1235 An argument of nil means kill the current buffer. 1197 An argument of nil means kill the current buffer.
1236 1198
1237 Value is t if the buffer is actually killed, nil if user says no. 1199 Value is t if the buffer is actually killed, nil if user says no.
1241 before the buffer is actually killed. The buffer to be killed is current 1203 before the buffer is actually killed. The buffer to be killed is current
1242 when the hook functions are called. 1204 when the hook functions are called.
1243 1205
1244 Any processes that have this buffer as the `process-buffer' are killed 1206 Any processes that have this buffer as the `process-buffer' are killed
1245 with `delete-process'. 1207 with `delete-process'.
1246 */ ) 1208 */
1247 (bufname) 1209 (bufname))
1248 Lisp_Object bufname;
1249 { 1210 {
1250 /* This function can GC */ 1211 /* This function can GC */
1251 Lisp_Object buf; 1212 Lisp_Object buf;
1252 REGISTER struct buffer *b; 1213 REGISTER struct buffer *b;
1253 struct gcpro gcpro1, gcpro2; 1214 struct gcpro gcpro1, gcpro2;
1427 unbind_to (speccount, Qnil); 1388 unbind_to (speccount, Qnil);
1428 } 1389 }
1429 return Qt; 1390 return Qt;
1430 } 1391 }
1431 1392
1432 DEFUN ("record-buffer", Frecord_buffer, 1393 DEFUN ("record-buffer", Frecord_buffer, 1, 1, 0, /*
1433 Srecord_buffer, 1, 1, 0 /*
1434 Place buffer BUF first in the buffer order. 1394 Place buffer BUF first in the buffer order.
1435 Call this function when a buffer is selected \"visibly\". 1395 Call this function when a buffer is selected \"visibly\".
1436 1396
1437 This function changes the global buffer order and the per-frame buffer 1397 This function changes the global buffer order and the per-frame buffer
1438 order for the selected frame. The buffer order keeps track of recency 1398 order for the selected frame. The buffer order keeps track of recency
1439 of selection so that `other-buffer' will return a recently selected 1399 of selection so that `other-buffer' will return a recently selected
1440 buffer. See `other-buffer' for more information. 1400 buffer. See `other-buffer' for more information.
1441 */ ) 1401 */
1442 (buf) 1402 (buf))
1443 Lisp_Object buf;
1444 { 1403 {
1445 REGISTER Lisp_Object lynk, prev; 1404 REGISTER Lisp_Object lynk, prev;
1446 struct frame *f = selected_frame (); 1405 struct frame *f = selected_frame ();
1447 1406
1448 prev = Qnil; 1407 prev = Qnil;
1477 XCDR (lynk) = f->buffer_alist; 1436 XCDR (lynk) = f->buffer_alist;
1478 f->buffer_alist = lynk; 1437 f->buffer_alist = lynk;
1479 return Qnil; 1438 return Qnil;
1480 } 1439 }
1481 1440
1482 DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, 1441 DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, 1, 1, 0, /*
1483 Sset_buffer_major_mode, 1, 1, 0 /*
1484 Set an appropriate major mode for BUFFER, according to `default-major-mode'. 1442 Set an appropriate major mode for BUFFER, according to `default-major-mode'.
1485 Use this function before selecting the buffer, since it may need to inspect 1443 Use this function before selecting the buffer, since it may need to inspect
1486 the current buffer's major mode. 1444 the current buffer's major mode.
1487 */ ) 1445 */
1488 (buf) 1446 (buf))
1489 Lisp_Object buf;
1490 { 1447 {
1491 int speccount = specpdl_depth (); 1448 int speccount = specpdl_depth ();
1492 REGISTER Lisp_Object function, tem; 1449 REGISTER Lisp_Object function, tem;
1493 1450
1494 function = XBUFFER (Vbuffer_defaults)->major_mode; 1451 function = XBUFFER (Vbuffer_defaults)->major_mode;
1518 { 1475 {
1519 call2 (Qswitch_to_buffer, bufname, norecord); 1476 call2 (Qswitch_to_buffer, bufname, norecord);
1520 } 1477 }
1521 1478
1522 1479
1523 DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0 /* 1480 DEFUN ("current-buffer", Fcurrent_buffer, 0, 0, 0, /*
1524 Return the current buffer as a Lisp object. 1481 Return the current buffer as a Lisp object.
1525 */ ) 1482 */
1526 () 1483 ())
1527 { 1484 {
1528 Lisp_Object buf; 1485 Lisp_Object buf;
1529 XSETBUFFER (buf, current_buffer); 1486 XSETBUFFER (buf, current_buffer);
1530 return buf; 1487 return buf;
1531 } 1488 }
1612 } 1569 }
1613 } 1570 }
1614 } 1571 }
1615 } 1572 }
1616 1573
1617 DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0 /* 1574 DEFUN ("set-buffer", Fset_buffer, 1, 1, 0, /*
1618 Make the buffer BUFNAME current for editing operations. 1575 Make the buffer BUFNAME current for editing operations.
1619 BUFNAME may be a buffer or the name of an existing buffer. 1576 BUFNAME may be a buffer or the name of an existing buffer.
1620 See also `save-excursion' when you want to make a buffer current temporarily. 1577 See also `save-excursion' when you want to make a buffer current temporarily.
1621 This function does not display the buffer, so its effect ends 1578 This function does not display the buffer, so its effect ends
1622 when the current command terminates. 1579 when the current command terminates.
1623 Use `switch-to-buffer' or `pop-to-buffer' to switch buffers permanently. 1580 Use `switch-to-buffer' or `pop-to-buffer' to switch buffers permanently.
1624 */ ) 1581 */
1625 (bufname) 1582 (bufname))
1626 Lisp_Object bufname;
1627 { 1583 {
1628 Lisp_Object buffer; 1584 Lisp_Object buffer;
1629 buffer = get_buffer (bufname, 0); 1585 buffer = get_buffer (bufname, 0);
1630 if (NILP (buffer)) 1586 if (NILP (buffer))
1631 error ("Selecting deleted or non-existent buffer"); 1587 error ("Selecting deleted or non-existent buffer");
1632 set_buffer_internal (XBUFFER (buffer)); 1588 set_buffer_internal (XBUFFER (buffer));
1633 return buffer; 1589 return buffer;
1634 } 1590 }
1635 1591
1636 1592
1637 DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, 1593 DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, 0, 3, 0, /*
1638 Sbarf_if_buffer_read_only, 0, 3, 0 /*
1639 Signal a `buffer-read-only' error if the buffer is read-only. 1594 Signal a `buffer-read-only' error if the buffer is read-only.
1640 Optional argument BUFFER defaults to the current buffer. 1595 Optional argument BUFFER defaults to the current buffer.
1641 1596
1642 If optional argument START is non-nil, all extents in the buffer 1597 If optional argument START is non-nil, all extents in the buffer
1643 which overlap that part of the buffer are checked to ensure none has a 1598 which overlap that part of the buffer are checked to ensure none has a
1647 If START and END are equal, the range checked is [START, END] (i.e. 1602 If START and END are equal, the range checked is [START, END] (i.e.
1648 closed on both ends); otherwise, the range checked is (START, END) 1603 closed on both ends); otherwise, the range checked is (START, END)
1649 (open on both ends), except that extents that lie completely within 1604 (open on both ends), except that extents that lie completely within
1650 [START, END] are not checked. See `extent-in-region-p' for a fuller 1605 [START, END] are not checked. See `extent-in-region-p' for a fuller
1651 discussion. 1606 discussion.
1652 */ ) 1607 */
1653 (buffer, start, end) 1608 (buffer, start, end))
1654 Lisp_Object buffer, start, end;
1655 { 1609 {
1656 struct buffer *b = decode_buffer (buffer, 0); 1610 struct buffer *b = decode_buffer (buffer, 0);
1657 Bufpos s, e; 1611 Bufpos s, e;
1658 1612
1659 if (NILP (start)) 1613 if (NILP (start))
1687 XCDR (before_before) = lynk; 1641 XCDR (before_before) = lynk;
1688 else 1642 else
1689 *buffer_alist = lynk; 1643 *buffer_alist = lynk;
1690 } 1644 }
1691 1645
1692 DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 2, "" /* 1646 DEFUN ("bury-buffer", Fbury_buffer, 0, 2, "", /*
1693 Put BUFFER at the end of the list of all buffers. 1647 Put BUFFER at the end of the list of all buffers.
1694 There it is the least likely candidate for `other-buffer' to return; 1648 There it is the least likely candidate for `other-buffer' to return;
1695 thus, the least likely buffer for \\[switch-to-buffer] to select by default. 1649 thus, the least likely buffer for \\[switch-to-buffer] to select by default.
1696 If BUFFER is nil or omitted, bury the current buffer. 1650 If BUFFER is nil or omitted, bury the current buffer.
1697 Also, if BUFFER is nil or omitted, remove the current buffer from the 1651 Also, if BUFFER is nil or omitted, remove the current buffer from the
1698 selected window if it is displayed there. 1652 selected window if it is displayed there.
1699 If BEFORE is non-nil, it specifies a buffer before which BUFFER 1653 If BEFORE is non-nil, it specifies a buffer before which BUFFER
1700 will be placed, instead of being placed at the end. 1654 will be placed, instead of being placed at the end.
1701 */ ) 1655 */
1702 (buffer, before) 1656 (buffer, before))
1703 Lisp_Object buffer, before;
1704 { 1657 {
1705 /* This function can GC */ 1658 /* This function can GC */
1706 struct buffer *buf = decode_buffer (buffer, 1); 1659 struct buffer *buf = decode_buffer (buffer, 1);
1707 /* If we're burying the current buffer, unshow it. */ 1660 /* If we're burying the current buffer, unshow it. */
1708 /* Note that the behavior of (bury-buffer nil) and 1661 /* Note that the behavior of (bury-buffer nil) and
1724 1677
1725 return Qnil; 1678 return Qnil;
1726 } 1679 }
1727 1680
1728 1681
1729 DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 1, "*" /* 1682 DEFUN ("erase-buffer", Ferase_buffer, 0, 1, "*", /*
1730 Delete the entire contents of the BUFFER. 1683 Delete the entire contents of the BUFFER.
1731 Any clipping restriction in effect (see `narrow-to-region') is removed, 1684 Any clipping restriction in effect (see `narrow-to-region') is removed,
1732 so the buffer is truly empty after this. 1685 so the buffer is truly empty after this.
1733 BUFFER defaults to the current buffer if omitted. 1686 BUFFER defaults to the current buffer if omitted.
1734 */ ) 1687 */
1735 (buffer) 1688 (buffer))
1736 Lisp_Object buffer;
1737 { 1689 {
1738 /* This function can GC */ 1690 /* This function can GC */
1739 struct buffer *b = decode_buffer (buffer, 1); 1691 struct buffer *b = decode_buffer (buffer, 1);
1740 /* #### yuck yuck yuck. This is gross. The old echo-area code, 1692 /* #### yuck yuck yuck. This is gross. The old echo-area code,
1741 however, was the only place that called erase_buffer() with a 1693 however, was the only place that called erase_buffer() with a
1760 return Qnil; 1712 return Qnil;
1761 } 1713 }
1762 1714
1763 1715
1764 1716
1765 DEFUN ("kill-all-local-variables", Fkill_all_local_variables, 1717 DEFUN ("kill-all-local-variables", Fkill_all_local_variables, 0, 0, 0, /*
1766 Skill_all_local_variables, 0, 0, 0 /*
1767 Switch to Fundamental mode by killing current buffer's local variables. 1718 Switch to Fundamental mode by killing current buffer's local variables.
1768 Most local variable bindings are eliminated so that the default values 1719 Most local variable bindings are eliminated so that the default values
1769 become effective once more. Also, the syntax table is set from 1720 become effective once more. Also, the syntax table is set from
1770 `standard-syntax-table', local keymap is set to nil, 1721 `standard-syntax-table', local keymap is set to nil,
1771 the abbrev table is set from `fundamental-mode-abbrev-table', 1722 the abbrev table is set from `fundamental-mode-abbrev-table',
1778 As a special exception, local variables whose names have 1729 As a special exception, local variables whose names have
1779 a non-nil `permanent-local' property are not eliminated by this function. 1730 a non-nil `permanent-local' property are not eliminated by this function.
1780 1731
1781 The first thing this function does is run 1732 The first thing this function does is run
1782 the normal hook `change-major-mode-hook'. 1733 the normal hook `change-major-mode-hook'.
1783 */ ) 1734 */
1784 () 1735 ())
1785 { 1736 {
1786 /* This function can GC */ 1737 /* This function can GC */
1787 run_hook (Qchange_major_mode_hook); 1738 run_hook (Qchange_major_mode_hook);
1788 1739
1789 reset_buffer_local_variables (current_buffer, 0); 1740 reset_buffer_local_variables (current_buffer, 0);
1834 stats->text += compute_buffer_text_usage (b, ovstats); 1785 stats->text += compute_buffer_text_usage (b, ovstats);
1835 stats->markers += compute_buffer_marker_usage (b, ovstats); 1786 stats->markers += compute_buffer_marker_usage (b, ovstats);
1836 stats->extents += compute_buffer_extent_usage (b, ovstats); 1787 stats->extents += compute_buffer_extent_usage (b, ovstats);
1837 } 1788 }
1838 1789
1839 DEFUN ("buffer-memory-usage", Fbuffer_memory_usage, Sbuffer_memory_usage, 1790 DEFUN ("buffer-memory-usage", Fbuffer_memory_usage, 1, 1, 0, /*
1840 1, 1, 0 /*
1841 Return stats about the memory usage of buffer BUFFER. 1791 Return stats about the memory usage of buffer BUFFER.
1842 The values returned are in the form an alist of usage types and byte 1792 The values returned are in the form an alist of usage types and byte
1843 counts. The byte counts attempt to encompass all the memory used 1793 counts. The byte counts attempt to encompass all the memory used
1844 by the buffer (separate from the memory logically associated with a 1794 by the buffer (separate from the memory logically associated with a
1845 buffer or frame), including internal structures and any malloc() 1795 buffer or frame), including internal structures and any malloc()
1853 Multiple slices of the total memory usage may be returned, separated 1803 Multiple slices of the total memory usage may be returned, separated
1854 by a nil. Each slice represents a particular view of the memory, a 1804 by a nil. Each slice represents a particular view of the memory, a
1855 particular way of partitioning it into groups. Within a slice, there 1805 particular way of partitioning it into groups. Within a slice, there
1856 is no overlap between the groups of memory, and each slice collectively 1806 is no overlap between the groups of memory, and each slice collectively
1857 represents all the memory concerned. 1807 represents all the memory concerned.
1858 */ ) 1808 */
1859 (buffer) 1809 (buffer))
1860 Lisp_Object buffer;
1861 { 1810 {
1862 struct buffer_stats stats; 1811 struct buffer_stats stats;
1863 struct overhead_stats ovstats; 1812 struct overhead_stats ovstats;
1864 1813
1865 CHECK_BUFFER (buffer); /* dead buffers should be allowed, no? */ 1814 CHECK_BUFFER (buffer); /* dead buffers should be allowed, no? */
1912 1861
1913 defsymbol (&Qfind_file_compare_truenames, "find-file-compare-truenames"); 1862 defsymbol (&Qfind_file_compare_truenames, "find-file-compare-truenames");
1914 1863
1915 defsymbol (&Qswitch_to_buffer, "switch-to-buffer"); 1864 defsymbol (&Qswitch_to_buffer, "switch-to-buffer");
1916 1865
1917 defsubr (&Sbufferp); 1866 DEFSUBR (Fbufferp);
1918 defsubr (&Sbuffer_live_p); 1867 DEFSUBR (Fbuffer_live_p);
1919 defsubr (&Sbuffer_list); 1868 DEFSUBR (Fbuffer_list);
1920 defsubr (&Sdecode_buffer); 1869 DEFSUBR (Fdecode_buffer);
1921 defsubr (&Sget_buffer); 1870 DEFSUBR (Fget_buffer);
1922 defsubr (&Sget_file_buffer); 1871 DEFSUBR (Fget_file_buffer);
1923 defsubr (&Sget_buffer_create); 1872 DEFSUBR (Fget_buffer_create);
1924 defsubr (&Smake_indirect_buffer); 1873 DEFSUBR (Fmake_indirect_buffer);
1925 1874
1926 defsubr (&Sgenerate_new_buffer_name); 1875 DEFSUBR (Fgenerate_new_buffer_name);
1927 defsubr (&Sbuffer_name); 1876 DEFSUBR (Fbuffer_name);
1928 defsubr (&Sbuffer_file_name); 1877 DEFSUBR (Fbuffer_file_name);
1929 defsubr (&Sbuffer_base_buffer); 1878 DEFSUBR (Fbuffer_base_buffer);
1930 defsubr (&Sbuffer_indirect_children); 1879 DEFSUBR (Fbuffer_indirect_children);
1931 defsubr (&Sbuffer_local_variables); 1880 DEFSUBR (Fbuffer_local_variables);
1932 defsubr (&Sbuffer_dedicated_frame); 1881 DEFSUBR (Fbuffer_dedicated_frame);
1933 defsubr (&Sset_buffer_dedicated_frame); 1882 DEFSUBR (Fset_buffer_dedicated_frame);
1934 defsubr (&Sbuffer_modified_p); 1883 DEFSUBR (Fbuffer_modified_p);
1935 defsubr (&Sset_buffer_modified_p); 1884 DEFSUBR (Fset_buffer_modified_p);
1936 defsubr (&Sbuffer_modified_tick); 1885 DEFSUBR (Fbuffer_modified_tick);
1937 defsubr (&Srename_buffer); 1886 DEFSUBR (Frename_buffer);
1938 defsubr (&Sother_buffer); 1887 DEFSUBR (Fother_buffer);
1939 defsubr (&Sbuffer_disable_undo); 1888 DEFSUBR (Fbuffer_disable_undo);
1940 defsubr (&Sbuffer_enable_undo); 1889 DEFSUBR (Fbuffer_enable_undo);
1941 defsubr (&Skill_buffer); 1890 DEFSUBR (Fkill_buffer);
1942 defsubr (&Serase_buffer); 1891 DEFSUBR (Ferase_buffer);
1943 defsubr (&Srecord_buffer); 1892 DEFSUBR (Frecord_buffer);
1944 defsubr (&Sset_buffer_major_mode); 1893 DEFSUBR (Fset_buffer_major_mode);
1945 defsubr (&Scurrent_buffer); 1894 DEFSUBR (Fcurrent_buffer);
1946 defsubr (&Sset_buffer); 1895 DEFSUBR (Fset_buffer);
1947 defsubr (&Sbarf_if_buffer_read_only); 1896 DEFSUBR (Fbarf_if_buffer_read_only);
1948 defsubr (&Sbury_buffer); 1897 DEFSUBR (Fbury_buffer);
1949 defsubr (&Skill_all_local_variables); 1898 DEFSUBR (Fkill_all_local_variables);
1950 #ifdef MEMORY_USAGE_STATS 1899 #ifdef MEMORY_USAGE_STATS
1951 defsubr (&Sbuffer_memory_usage); 1900 DEFSUBR (Fbuffer_memory_usage);
1952 #endif 1901 #endif
1953 1902
1954 deferror (&Qprotected_field, "protected-field", 1903 deferror (&Qprotected_field, "protected-field",
1955 "Attempt to modify a protected field", Qerror); 1904 "Attempt to modify a protected field", Qerror);
1956 } 1905 }