diff options
| author | Glenn Morris | 2012-03-03 14:13:28 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-03-03 14:13:28 -0800 |
| commit | 7d2d7cc06546f8382f95dbc83909aa8cebf3828f (patch) | |
| tree | 9daa9361f929d4601061b901b85f87a4ff30b9d9 | |
| parent | fbae463706f1a5e3bce206b65c7341d60a43c268 (diff) | |
| download | emacs-7d2d7cc06546f8382f95dbc83909aa8cebf3828f.tar.gz emacs-7d2d7cc06546f8382f95dbc83909aa8cebf3828f.zip | |
Checked lispref/internals.texi, somewhat
* doc/lispref/internals.texi: (Writing Emacs Primitives):
Update Fcoordinates_in_window_p and For example definitions.
Give examples of things with non-nil interactive args. Mention eval_sub.
Remove old info about strings and GCPRO. Mention cus-start.el.
(Buffer Internals, Window Internals, Process Internals):
Misc small updates and fixes for fields.
* admin/FOR-RELEASE: Related markup.
| -rw-r--r-- | admin/FOR-RELEASE | 3 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/internals.texi | 185 |
3 files changed, 116 insertions, 78 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 31a2a7ddbf7..85c25286750 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -203,7 +203,8 @@ hash.texi cyd | |||
| 203 | help.texi cyd | 203 | help.texi cyd |
| 204 | hooks.texi rgm | 204 | hooks.texi rgm |
| 205 | index.texi | 205 | index.texi |
| 206 | internals.texi | 206 | internals.texi rgm (I don't know much about this, so it would be |
| 207 | good if someone else could at least look at the FIXME? comments.) | ||
| 207 | intro.texi cyd | 208 | intro.texi cyd |
| 208 | keymaps.texi cyd | 209 | keymaps.texi cyd |
| 209 | lists.texi cyd | 210 | lists.texi cyd |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index cad2921e78c..de2528a730a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -5,6 +5,12 @@ | |||
| 5 | Replace deleted eval-at-startup with custom-initialize-delay. | 5 | Replace deleted eval-at-startup with custom-initialize-delay. |
| 6 | (Pure Storage): Small changes. | 6 | (Pure Storage): Small changes. |
| 7 | (Memory Usage): Copyedit. | 7 | (Memory Usage): Copyedit. |
| 8 | (Writing Emacs Primitives): Update Fcoordinates_in_window_p and For | ||
| 9 | example definitions. Give examples of things with non-nil | ||
| 10 | interactive args. Mention eval_sub. Remove old info about | ||
| 11 | strings and GCPRO. Mention cus-start.el. | ||
| 12 | (Buffer Internals, Window Internals, Process Internals): | ||
| 13 | Misc small updates and fixes for fields. | ||
| 8 | 14 | ||
| 9 | * tips.texi: Copyedits. | 15 | * tips.texi: Copyedits. |
| 10 | (Coding Conventions): Mention autoloads. | 16 | (Coding Conventions): Mention autoloads. |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index bab96582302..83bbc140b13 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -538,7 +538,7 @@ usage: (or CONDITIONS ...) */) | |||
| 538 | @group | 538 | @group |
| 539 | while (CONSP (args)) | 539 | while (CONSP (args)) |
| 540 | @{ | 540 | @{ |
| 541 | val = Feval (XCAR (args)); | 541 | val = eval_sub (XCAR (args)); |
| 542 | if (!NILP (val)) | 542 | if (!NILP (val)) |
| 543 | break; | 543 | break; |
| 544 | args = XCDR (args); | 544 | args = XCDR (args); |
| @@ -603,6 +603,8 @@ the argument of @code{interactive} in a Lisp function. In the case of | |||
| 603 | called interactively. A value of @code{""} indicates a function that | 603 | called interactively. A value of @code{""} indicates a function that |
| 604 | should receive no arguments when called interactively. If the value | 604 | should receive no arguments when called interactively. If the value |
| 605 | begins with a @samp{(}, the string is evaluated as a Lisp form. | 605 | begins with a @samp{(}, the string is evaluated as a Lisp form. |
| 606 | For examples of the last two forms, see @code{widen} and | ||
| 607 | @code{narrow-to-region} in @file{editfns.c}. | ||
| 606 | 608 | ||
| 607 | @item doc | 609 | @item doc |
| 608 | This is the documentation string. It uses C comment syntax rather | 610 | This is the documentation string. It uses C comment syntax rather |
| @@ -641,19 +643,22 @@ have types @code{int} and @w{@code{Lisp_Object *}}. | |||
| 641 | ``protect'' a variable from garbage collection---to inform the garbage | 643 | ``protect'' a variable from garbage collection---to inform the garbage |
| 642 | collector that it must look in that variable and regard its contents | 644 | collector that it must look in that variable and regard its contents |
| 643 | as an accessible object. GC protection is necessary whenever you call | 645 | as an accessible object. GC protection is necessary whenever you call |
| 644 | @code{Feval} or anything that can directly or indirectly call | 646 | @code{eval_sub} (or @code{Feval}) either directly or indirectly. |
| 645 | @code{Feval}. At such a time, any Lisp object that this function may | 647 | At such a time, any Lisp object that this function may refer to again |
| 646 | refer to again must be protected somehow. | 648 | must be protected somehow. |
| 647 | 649 | ||
| 648 | It suffices to ensure that at least one pointer to each object is | 650 | It suffices to ensure that at least one pointer to each object is |
| 649 | GC-protected; that way, the object cannot be recycled, so all pointers | 651 | GC-protected; that way, the object cannot be recycled, so all pointers |
| 650 | to it remain valid. Thus, a particular local variable can do without | 652 | to it remain valid. Thus, a particular local variable can do without |
| 651 | protection if it is certain that the object it points to will be | 653 | protection if it is certain that the object it points to will be |
| 652 | preserved by some other pointer (such as another local variable which | 654 | preserved by some other pointer (such as another local variable that |
| 653 | has a @code{GCPRO})@footnote{Formerly, strings were a special | 655 | has a @code{GCPRO}). |
| 654 | exception; in older Emacs versions, every local variable that might | 656 | @ignore |
| 655 | point to a string needed a @code{GCPRO}.}. Otherwise, the local | 657 | @footnote{Formerly, strings were a special exception; in older Emacs |
| 656 | variable needs a @code{GCPRO}. | 658 | versions, every local variable that might point to a string needed a |
| 659 | @code{GCPRO}.}. | ||
| 660 | @end ignore | ||
| 661 | Otherwise, the local variable needs a @code{GCPRO}. | ||
| 657 | 662 | ||
| 658 | The macro @code{GCPRO1} protects just one local variable. If you | 663 | The macro @code{GCPRO1} protects just one local variable. If you |
| 659 | want to protect two variables, use @code{GCPRO2} instead; repeating | 664 | want to protect two variables, use @code{GCPRO2} instead; repeating |
| @@ -682,6 +687,7 @@ with initializers are allocated in an area of memory that becomes | |||
| 682 | read-only (on certain operating systems) as a result of dumping Emacs. | 687 | read-only (on certain operating systems) as a result of dumping Emacs. |
| 683 | @xref{Pure Storage}. | 688 | @xref{Pure Storage}. |
| 684 | 689 | ||
| 690 | @c FIXME is this still true? I don't think so... | ||
| 685 | Do not use static variables within functions---place all static | 691 | Do not use static variables within functions---place all static |
| 686 | variables at top level in the file. This is necessary because Emacs on | 692 | variables at top level in the file. This is necessary because Emacs on |
| 687 | some operating systems defines the keyword @code{static} as a null | 693 | some operating systems defines the keyword @code{static} as a null |
| @@ -696,12 +702,11 @@ store a suitable subr object in its function cell. The code looks like | |||
| 696 | this: | 702 | this: |
| 697 | 703 | ||
| 698 | @example | 704 | @example |
| 699 | defsubr (&@var{subr-structure-name}); | 705 | defsubr (&@var{sname}); |
| 700 | @end example | 706 | @end example |
| 701 | 707 | ||
| 702 | @noindent | 708 | @noindent |
| 703 | Here @var{subr-structure-name} is the name you used as the third | 709 | Here @var{sname} is the name you used as the third argument to @code{DEFUN}. |
| 704 | argument to @code{DEFUN}. | ||
| 705 | 710 | ||
| 706 | If you add a new primitive to a file that already has Lisp primitives | 711 | If you add a new primitive to a file that already has Lisp primitives |
| 707 | defined in it, find the function (near the end of the file) named | 712 | defined in it, find the function (near the end of the file) named |
| @@ -726,6 +731,11 @@ with a value that is either @code{t} or @code{nil}. Note that variables | |||
| 726 | defined with @code{DEFVAR_BOOL} are automatically added to the list | 731 | defined with @code{DEFVAR_BOOL} are automatically added to the list |
| 727 | @code{byte-boolean-vars} used by the byte compiler. | 732 | @code{byte-boolean-vars} used by the byte compiler. |
| 728 | 733 | ||
| 734 | @cindex defining customization variables in C | ||
| 735 | If you want to make a Lisp variables that is defined in C behave | ||
| 736 | like one declared with @code{defcustom}, add an appropriate entry to | ||
| 737 | @file{cus-start.el}. | ||
| 738 | |||
| 729 | @cindex @code{staticpro}, protection from GC | 739 | @cindex @code{staticpro}, protection from GC |
| 730 | If you define a file-scope C variable of type @code{Lisp_Object}, | 740 | If you define a file-scope C variable of type @code{Lisp_Object}, |
| 731 | you must protect it from garbage-collection by calling @code{staticpro} | 741 | you must protect it from garbage-collection by calling @code{staticpro} |
| @@ -742,48 +752,53 @@ of macros and functions to manipulate Lisp objects. | |||
| 742 | @smallexample | 752 | @smallexample |
| 743 | @group | 753 | @group |
| 744 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, | 754 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, |
| 745 | Scoordinates_in_window_p, 2, 2, | 755 | Scoordinates_in_window_p, 2, 2, 0, |
| 746 | "xSpecify coordinate pair: \nXExpression which evals to window: ", | 756 | doc: /* Return non-nil if COORDINATES are in WINDOW. |
| 747 | "Return non-nil if COORDINATES is in WINDOW.\n\ | 757 | ... |
| 748 | COORDINATES is a cons of the form (X . Y), X and Y being distances\n\ | ||
| 749 | ... | ||
| 750 | @end group | 758 | @end group |
| 751 | @group | 759 | @group |
| 752 | If they are on the border between WINDOW and its right sibling,\n\ | 760 | or `right-margin' is returned. */) |
| 753 | `vertical-line' is returned.") | 761 | (register Lisp_Object coordinates, Lisp_Object window) |
| 754 | (coordinates, window) | ||
| 755 | register Lisp_Object coordinates, window; | ||
| 756 | @{ | 762 | @{ |
| 763 | struct window *w; | ||
| 764 | struct frame *f; | ||
| 757 | int x, y; | 765 | int x, y; |
| 766 | Lisp_Object lx, ly; | ||
| 758 | @end group | 767 | @end group |
| 759 | 768 | ||
| 760 | @group | 769 | @group |
| 761 | CHECK_LIVE_WINDOW (window, 0); | 770 | CHECK_LIVE_WINDOW (window); |
| 762 | CHECK_CONS (coordinates, 1); | 771 | w = XWINDOW (window); |
| 763 | x = XINT (Fcar (coordinates)); | 772 | f = XFRAME (w->frame); |
| 764 | y = XINT (Fcdr (coordinates)); | 773 | CHECK_CONS (coordinates); |
| 774 | lx = Fcar (coordinates); | ||
| 775 | ly = Fcdr (coordinates); | ||
| 776 | CHECK_NUMBER_OR_FLOAT (lx); | ||
| 777 | CHECK_NUMBER_OR_FLOAT (ly); | ||
| 778 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH(f); | ||
| 779 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH(f); | ||
| 765 | @end group | 780 | @end group |
| 766 | 781 | ||
| 767 | @group | 782 | @group |
| 768 | switch (coordinates_in_window (XWINDOW (window), &x, &y)) | 783 | switch (coordinates_in_window (w, x, y)) |
| 769 | @{ | 784 | @{ |
| 770 | case 0: /* NOT in window at all. */ | 785 | case ON_NOTHING: /* NOT in window at all. */ |
| 771 | return Qnil; | 786 | return Qnil; |
| 772 | @end group | 787 | @end group |
| 773 | 788 | ||
| 774 | @group | 789 | ... |
| 775 | case 1: /* In text part of window. */ | ||
| 776 | return Fcons (make_number (x), make_number (y)); | ||
| 777 | @end group | ||
| 778 | 790 | ||
| 779 | @group | 791 | @group |
| 780 | case 2: /* In mode line of window. */ | 792 | case ON_MODE_LINE: /* In mode line of window. */ |
| 781 | return Qmode_line; | 793 | return Qmode_line; |
| 782 | @end group | 794 | @end group |
| 783 | 795 | ||
| 796 | ... | ||
| 797 | |||
| 784 | @group | 798 | @group |
| 785 | case 3: /* On right border of window. */ | 799 | case ON_SCROLL_BAR: /* On scroll-bar of window. */ |
| 786 | return Qvertical_line; | 800 | /* Historically we are supposed to return nil in this case. */ |
| 801 | return Qnil; | ||
| 787 | @end group | 802 | @end group |
| 788 | 803 | ||
| 789 | @group | 804 | @group |
| @@ -814,7 +829,7 @@ number of arguments. They work by calling @code{Ffuncall}. | |||
| 814 | functions. | 829 | functions. |
| 815 | 830 | ||
| 816 | If you define a function which is side-effect free, update the code | 831 | If you define a function which is side-effect free, update the code |
| 817 | in @file{byte-opt.el} which binds @code{side-effect-free-fns} and | 832 | in @file{byte-opt.el} that binds @code{side-effect-free-fns} and |
| 818 | @code{side-effect-and-error-free-fns} so that the compiler optimizer | 833 | @code{side-effect-and-error-free-fns} so that the compiler optimizer |
| 819 | knows about it. | 834 | knows about it. |
| 820 | 835 | ||
| @@ -822,6 +837,7 @@ knows about it. | |||
| 822 | @section Object Internals | 837 | @section Object Internals |
| 823 | @cindex object internals | 838 | @cindex object internals |
| 824 | 839 | ||
| 840 | @c FIXME Is this still true? Does --with-wide-int affect anything? | ||
| 825 | GNU Emacs Lisp manipulates many different types of data. The actual | 841 | GNU Emacs Lisp manipulates many different types of data. The actual |
| 826 | data are stored in a heap and the only access that programs have to it | 842 | data are stored in a heap and the only access that programs have to it |
| 827 | is through pointers. Each pointer is 32 bits wide on 32-bit machines, | 843 | is through pointers. Each pointer is 32 bits wide on 32-bit machines, |
| @@ -850,11 +866,11 @@ explicitly using a suitable predicate (@pxref{Type Predicates}). | |||
| 850 | @cindex internals, of buffer | 866 | @cindex internals, of buffer |
| 851 | @cindex buffer internals | 867 | @cindex buffer internals |
| 852 | 868 | ||
| 853 | Two structures are used to represent buffers in C. The | 869 | Two structures (see @file{buffer.h}) are used to represent buffers |
| 854 | @code{buffer_text} structure contains fields describing the text of a | 870 | in C. The @code{buffer_text} structure contains fields describing the |
| 855 | buffer; the @code{buffer} structure holds other fields. In the case | 871 | text of a buffer; the @code{buffer} structure holds other fields. In |
| 856 | of indirect buffers, two or more @code{buffer} structures reference | 872 | the case of indirect buffers, two or more @code{buffer} structures |
| 857 | the same @code{buffer_text} structure. | 873 | reference the same @code{buffer_text} structure. |
| 858 | 874 | ||
| 859 | Here are some of the fields in @code{struct buffer_text}: | 875 | Here are some of the fields in @code{struct buffer_text}: |
| 860 | 876 | ||
| @@ -912,8 +928,9 @@ The interval tree which records the text properties of this buffer. | |||
| 912 | Some of the fields of @code{struct buffer} are: | 928 | Some of the fields of @code{struct buffer} are: |
| 913 | 929 | ||
| 914 | @table @code | 930 | @table @code |
| 915 | @item next | 931 | @item header |
| 916 | Points to the next buffer, in the chain of all buffers (including | 932 | A @code{struct vectorlike_header} structure where @code{header.next} |
| 933 | points to the next buffer, in the chain of all buffers (including | ||
| 917 | killed buffers). This chain is used only for garbage collection, in | 934 | killed buffers). This chain is used only for garbage collection, in |
| 918 | order to collect killed buffers properly. Note that vectors, and most | 935 | order to collect killed buffers properly. Note that vectors, and most |
| 919 | kinds of objects allocated as vectors, are all on one chain, but | 936 | kinds of objects allocated as vectors, are all on one chain, but |
| @@ -987,6 +1004,8 @@ after the current overlay center. @xref{Managing Overlays}. | |||
| 987 | and @code{overlays_after} is sorted in order of increasing beginning | 1004 | and @code{overlays_after} is sorted in order of increasing beginning |
| 988 | position. | 1005 | position. |
| 989 | 1006 | ||
| 1007 | @c FIXME? the following are now all Lisp_Object BUFFER_INTERNAL_FIELD (foo). | ||
| 1008 | |||
| 990 | @item name | 1009 | @item name |
| 991 | A Lisp string that names the buffer. It is guaranteed to be unique. | 1010 | A Lisp string that names the buffer. It is guaranteed to be unique. |
| 992 | @xref{Buffer Names}. | 1011 | @xref{Buffer Names}. |
| @@ -1009,6 +1028,7 @@ the value of the buffer-local variable @code{buffer-file-name} | |||
| 1009 | @item undo_list | 1028 | @item undo_list |
| 1010 | @itemx backed_up | 1029 | @itemx backed_up |
| 1011 | @itemx auto_save_file_name | 1030 | @itemx auto_save_file_name |
| 1031 | @itemx auto_save_file_format | ||
| 1012 | @itemx read_only | 1032 | @itemx read_only |
| 1013 | @itemx file_format | 1033 | @itemx file_format |
| 1014 | @itemx file_truename | 1034 | @itemx file_truename |
| @@ -1075,15 +1095,15 @@ when the buffer is not current. | |||
| 1075 | @itemx truncate_lines | 1095 | @itemx truncate_lines |
| 1076 | @itemx word_wrap | 1096 | @itemx word_wrap |
| 1077 | @itemx ctl_arrow | 1097 | @itemx ctl_arrow |
| 1098 | @itemx bidi_display_reordering | ||
| 1099 | @itemx bidi_paragraph_direction | ||
| 1078 | @itemx selective_display | 1100 | @itemx selective_display |
| 1079 | @itemx selective_display_ellipses | 1101 | @itemx selective_display_ellipses |
| 1080 | @itemx overwrite_mode | 1102 | @itemx overwrite_mode |
| 1081 | @itemx abbrev_mode | 1103 | @itemx abbrev_mode |
| 1082 | @itemx display_table | ||
| 1083 | @itemx mark_active | 1104 | @itemx mark_active |
| 1084 | @itemx enable_multibyte_characters | 1105 | @itemx enable_multibyte_characters |
| 1085 | @itemx buffer_file_coding_system | 1106 | @itemx buffer_file_coding_system |
| 1086 | @itemx auto_save_file_format | ||
| 1087 | @itemx cache_long_line_scans | 1107 | @itemx cache_long_line_scans |
| 1088 | @itemx point_before_scroll | 1108 | @itemx point_before_scroll |
| 1089 | @itemx left_fringe_width | 1109 | @itemx left_fringe_width |
| @@ -1113,7 +1133,8 @@ if that window no longer displays this buffer. | |||
| 1113 | @cindex internals, of window | 1133 | @cindex internals, of window |
| 1114 | @cindex window internals | 1134 | @cindex window internals |
| 1115 | 1135 | ||
| 1116 | Windows have the following accessible fields: | 1136 | The fields of a window (for a complete list, see the definition of |
| 1137 | @code{struct window} in @file{window.h}) include: | ||
| 1117 | 1138 | ||
| 1118 | @table @code | 1139 | @table @code |
| 1119 | @item frame | 1140 | @item frame |
| @@ -1137,7 +1158,8 @@ leaves of the tree, which actually display buffers. | |||
| 1137 | These fields contain the window's leftmost child and its topmost child | 1158 | These fields contain the window's leftmost child and its topmost child |
| 1138 | respectively. @code{hchild} is used if the window is subdivided | 1159 | respectively. @code{hchild} is used if the window is subdivided |
| 1139 | horizontally by child windows, and @code{vchild} if it is subdivided | 1160 | horizontally by child windows, and @code{vchild} if it is subdivided |
| 1140 | vertically. | 1161 | vertically. In a live window, only one of @code{hchild}, @code{vchild}, |
| 1162 | and @code{buffer} (q.v.) is non-@code{nil}. | ||
| 1141 | 1163 | ||
| 1142 | @item next | 1164 | @item next |
| 1143 | @itemx prev | 1165 | @itemx prev |
| @@ -1214,11 +1236,19 @@ window was last updated. | |||
| 1214 | @item vertical_scroll_bar | 1236 | @item vertical_scroll_bar |
| 1215 | This window's vertical scroll bar. | 1237 | This window's vertical scroll bar. |
| 1216 | 1238 | ||
| 1217 | @item left_margin_width | 1239 | @item left_margin_cols |
| 1218 | @itemx right_margin_width | 1240 | @itemx right_margin_cols |
| 1219 | The widths of the left and right margins in this window. A value of | 1241 | The widths of the left and right margins in this window. A value of |
| 1220 | @code{nil} means to use the buffer's value of @code{left-margin-width} | 1242 | @code{nil} means no margin. |
| 1221 | or @code{right-margin-width}. | 1243 | |
| 1244 | @item left_fringe_width | ||
| 1245 | @itemx right_fringe_width | ||
| 1246 | The widths of the left and right fringes in this window. A value of | ||
| 1247 | @code{nil} or @code{t} means use the values of the frame. | ||
| 1248 | |||
| 1249 | @item fringes_outside_margins | ||
| 1250 | A non-@code{nil} value means the fringes outside the display margins; | ||
| 1251 | othersize they are between the margin and the text. | ||
| 1222 | 1252 | ||
| 1223 | @item window_end_pos | 1253 | @item window_end_pos |
| 1224 | This is computed as @code{z} minus the buffer position of the last glyph | 1254 | This is computed as @code{z} minus the buffer position of the last glyph |
| @@ -1234,7 +1264,7 @@ The window-relative vertical position of the line containing | |||
| 1234 | 1264 | ||
| 1235 | @item window_end_valid | 1265 | @item window_end_valid |
| 1236 | This field is set to a non-@code{nil} value if @code{window_end_pos} is truly | 1266 | This field is set to a non-@code{nil} value if @code{window_end_pos} is truly |
| 1237 | valid. This is @code{nil} if nontrivial redisplay is preempted since in that | 1267 | valid. This is @code{nil} if nontrivial redisplay is pre-empted, since in that |
| 1238 | case the display that @code{window_end_pos} was computed for did not get | 1268 | case the display that @code{window_end_pos} was computed for did not get |
| 1239 | onto the screen. | 1269 | onto the screen. |
| 1240 | 1270 | ||
| @@ -1248,13 +1278,19 @@ The value of @code{cursor} as of the last redisplay that finished. | |||
| 1248 | A structure describing where the cursor of this window physically is. | 1278 | A structure describing where the cursor of this window physically is. |
| 1249 | 1279 | ||
| 1250 | @item phys_cursor_type | 1280 | @item phys_cursor_type |
| 1251 | The type of cursor that was last displayed on this window. | 1281 | @c FIXME What is this? |
| 1282 | @c itemx phys_cursor_ascent | ||
| 1283 | @itemx phys_cursor_height | ||
| 1284 | @itemx phys_cursor_width | ||
| 1285 | The type, height, and width of the cursor that was last displayed on | ||
| 1286 | this window. | ||
| 1252 | 1287 | ||
| 1253 | @item phys_cursor_on_p | 1288 | @item phys_cursor_on_p |
| 1254 | This field is non-zero if the cursor is physically on. | 1289 | This field is non-zero if the cursor is physically on. |
| 1255 | 1290 | ||
| 1256 | @item cursor_off_p | 1291 | @item cursor_off_p |
| 1257 | Non-zero means the cursor in this window is logically on. | 1292 | Non-zero means the cursor in this window is logically off. This is |
| 1293 | used for blinking the cursor. | ||
| 1258 | 1294 | ||
| 1259 | @item last_cursor_off_p | 1295 | @item last_cursor_off_p |
| 1260 | This field contains the value of @code{cursor_off_p} as of the time of | 1296 | This field contains the value of @code{cursor_off_p} as of the time of |
| @@ -1285,7 +1321,8 @@ This is used for displaying the line number of point in the mode line. | |||
| 1285 | 1321 | ||
| 1286 | @item base_line_pos | 1322 | @item base_line_pos |
| 1287 | The position in the buffer for which the line number is known, or | 1323 | The position in the buffer for which the line number is known, or |
| 1288 | @code{nil} meaning none is known. | 1324 | @code{nil} meaning none is known. If it is a buffer, don't display |
| 1325 | the line number as long as the window shows that buffer. | ||
| 1289 | 1326 | ||
| 1290 | @item region_showing | 1327 | @item region_showing |
| 1291 | If the region (or part of it) is highlighted in this window, this field | 1328 | If the region (or part of it) is highlighted in this window, this field |
| @@ -1297,10 +1334,8 @@ The column number currently displayed in this window's mode line, or @code{nil} | |||
| 1297 | if column numbers are not being displayed. | 1334 | if column numbers are not being displayed. |
| 1298 | 1335 | ||
| 1299 | @item current_matrix | 1336 | @item current_matrix |
| 1300 | A glyph matrix describing the current display of this window. | 1337 | @itemx desired_matrix |
| 1301 | 1338 | Glyph matrices describing the current and desired display of this window. | |
| 1302 | @item desired_matrix | ||
| 1303 | A glyph matrix describing the desired display of this window. | ||
| 1304 | @end table | 1339 | @end table |
| 1305 | 1340 | ||
| 1306 | @node Process Internals | 1341 | @node Process Internals |
| @@ -1308,7 +1343,8 @@ A glyph matrix describing the desired display of this window. | |||
| 1308 | @cindex internals, of process | 1343 | @cindex internals, of process |
| 1309 | @cindex process internals | 1344 | @cindex process internals |
| 1310 | 1345 | ||
| 1311 | The fields of a process are: | 1346 | The fields of a process (for a complete list, see the definition of |
| 1347 | @code{struct Lisp_Process} in @file{process.h}) include: | ||
| 1312 | 1348 | ||
| 1313 | @table @code | 1349 | @table @code |
| 1314 | @item name | 1350 | @item name |
| @@ -1320,21 +1356,24 @@ process. For a network or serial process, it is @code{nil} if the | |||
| 1320 | process is running or @code{t} if the process is stopped. | 1356 | process is running or @code{t} if the process is stopped. |
| 1321 | 1357 | ||
| 1322 | @item filter | 1358 | @item filter |
| 1323 | A function used to accept output from the process instead of a buffer, | 1359 | If non-@code{nil}, a function used to accept output from the process |
| 1324 | or @code{nil}. | 1360 | instead of a buffer. |
| 1325 | 1361 | ||
| 1326 | @item sentinel | 1362 | @item sentinel |
| 1327 | A function called whenever the process receives a signal, or @code{nil}. | 1363 | If non-@code{nil}, a function called whenever the state of the process |
| 1364 | changes. | ||
| 1328 | 1365 | ||
| 1329 | @item buffer | 1366 | @item buffer |
| 1330 | The associated buffer of the process. | 1367 | The associated buffer of the process. |
| 1331 | 1368 | ||
| 1332 | @item pid | 1369 | @item pid |
| 1333 | An integer, the operating system's process @acronym{ID}. | 1370 | An integer, the operating system's process @acronym{ID}. |
| 1371 | Pseudo-processes such as network or serial connections use a value of 0. | ||
| 1334 | 1372 | ||
| 1335 | @item childp | 1373 | @item childp |
| 1336 | A flag, non-@code{nil} if this is really a child process. | 1374 | A flag, @code{t} if this is really a child process. For a network or |
| 1337 | It is @code{nil} for a network or serial connection. | 1375 | serial connection, it is a plist based on the arguments to |
| 1376 | @code{make-network-process} or @code{make-serial-process}. | ||
| 1338 | 1377 | ||
| 1339 | @item mark | 1378 | @item mark |
| 1340 | A marker indicating the position of the end of the last output from this | 1379 | A marker indicating the position of the end of the last output from this |
| @@ -1345,10 +1384,8 @@ of the buffer. | |||
| 1345 | If this is non-zero, killing Emacs while this process is still running | 1384 | If this is non-zero, killing Emacs while this process is still running |
| 1346 | does not ask for confirmation about killing the process. | 1385 | does not ask for confirmation about killing the process. |
| 1347 | 1386 | ||
| 1348 | @item raw_status_low | 1387 | @item raw_status |
| 1349 | @itemx raw_status_high | 1388 | The raw process status, as returned by the @code{wait} system call. |
| 1350 | These two fields record 16 bits each of the process status returned by | ||
| 1351 | the @code{wait} system call. | ||
| 1352 | 1389 | ||
| 1353 | @item status | 1390 | @item status |
| 1354 | The process status, as @code{process-status} should return it. | 1391 | The process status, as @code{process-status} should return it. |
| @@ -1369,11 +1406,6 @@ The file descriptor for input from the process. | |||
| 1369 | @item outfd | 1406 | @item outfd |
| 1370 | The file descriptor for output to the process. | 1407 | The file descriptor for output to the process. |
| 1371 | 1408 | ||
| 1372 | @item subtty | ||
| 1373 | The file descriptor for the terminal that the subprocess is using. (On | ||
| 1374 | some systems, there is no need to record this, so the value is | ||
| 1375 | @code{nil}.) | ||
| 1376 | |||
| 1377 | @item tty_name | 1409 | @item tty_name |
| 1378 | The name of the terminal that the subprocess is using, | 1410 | The name of the terminal that the subprocess is using, |
| 1379 | or @code{nil} if it is using pipes. | 1411 | or @code{nil} if it is using pipes. |
| @@ -1393,15 +1425,14 @@ Coding-system for encoding the output to this process. | |||
| 1393 | @item encoding_buf | 1425 | @item encoding_buf |
| 1394 | A working buffer for encoding. | 1426 | A working buffer for encoding. |
| 1395 | 1427 | ||
| 1396 | @item encoding_carryover | ||
| 1397 | Size of carryover in encoding. | ||
| 1398 | |||
| 1399 | @item inherit_coding_system_flag | 1428 | @item inherit_coding_system_flag |
| 1400 | Flag to set @code{coding-system} of the process buffer from the | 1429 | Flag to set @code{coding-system} of the process buffer from the |
| 1401 | coding system used to decode process output. | 1430 | coding system used to decode process output. |
| 1402 | 1431 | ||
| 1403 | @item type | 1432 | @item type |
| 1404 | Symbol indicating the type of process: @code{real}, @code{network}, | 1433 | Symbol indicating the type of process: @code{real}, @code{network}, |
| 1405 | @code{serial} | 1434 | @code{serial}. |
| 1406 | 1435 | ||
| 1407 | @end table | 1436 | @end table |
| 1437 | |||
| 1438 | @c FIXME Mention src/globals.h somewhere in this file? | ||