diff options
| author | Eli Zaretskii | 2018-11-20 20:45:07 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-11-20 20:45:07 +0200 |
| commit | 0d59ae3f49ac122203d94aa02acc9c7ae920aeef (patch) | |
| tree | 17d9bda6a457a47560290eb4f8c140c52524634a | |
| parent | d667318a7f89a9daeffca6fb47503889bd23f3bd (diff) | |
| download | emacs-0d59ae3f49ac122203d94aa02acc9c7ae920aeef.tar.gz emacs-0d59ae3f49ac122203d94aa02acc9c7ae920aeef.zip | |
Update the docs of object internals
* doc/lispref/internals.texi (Buffer Internals)
(Window Internals, Process Internals): Update the descriptions
of Lisp objects.
| -rw-r--r-- | doc/lispref/internals.texi | 148 |
1 files changed, 88 insertions, 60 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index b68c94d5c78..6c9bba126e3 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1746,7 +1746,7 @@ and form the set of subtypes of @code{Lisp_Misc}. | |||
| 1746 | 1746 | ||
| 1747 | Below there is a description of a few subtypes of @code{Lisp_Vectorlike}. | 1747 | Below there is a description of a few subtypes of @code{Lisp_Vectorlike}. |
| 1748 | Buffer object represents the text to display and edit. Window is the part | 1748 | Buffer object represents the text to display and edit. Window is the part |
| 1749 | of display structure which shows the buffer or used as a container to | 1749 | of display structure which shows the buffer or is used as a container to |
| 1750 | recursively place other windows on the same frame. (Do not confuse Emacs Lisp | 1750 | recursively place other windows on the same frame. (Do not confuse Emacs Lisp |
| 1751 | window object with the window as an entity managed by the user interface | 1751 | window object with the window as an entity managed by the user interface |
| 1752 | system like X; in Emacs terminology, the latter is called frame.) Finally, | 1752 | system like X; in Emacs terminology, the latter is called frame.) Finally, |
| @@ -1773,7 +1773,8 @@ Here are some of the fields in @code{struct buffer_text}: | |||
| 1773 | 1773 | ||
| 1774 | @table @code | 1774 | @table @code |
| 1775 | @item beg | 1775 | @item beg |
| 1776 | The address of the buffer contents. | 1776 | The address of the buffer contents. The buffer contents is a linear C |
| 1777 | array of @code{char}, with the gap somewhere in its midst. | ||
| 1777 | 1778 | ||
| 1778 | @item gpt | 1779 | @item gpt |
| 1779 | @itemx gpt_byte | 1780 | @itemx gpt_byte |
| @@ -1797,8 +1798,8 @@ buffer-modification event, and is never otherwise changed; | |||
| 1797 | @code{save_modiff} contains the value of @code{modiff} the last time | 1798 | @code{save_modiff} contains the value of @code{modiff} the last time |
| 1798 | the buffer was visited or saved; @code{chars_modiff} counts only | 1799 | the buffer was visited or saved; @code{chars_modiff} counts only |
| 1799 | modifications to the characters in the buffer, ignoring all other | 1800 | modifications to the characters in the buffer, ignoring all other |
| 1800 | kinds of changes; and @code{overlay_modiff} counts only modifications | 1801 | kinds of changes (such as text properties); and @code{overlay_modiff} |
| 1801 | to the overlays. | 1802 | counts only modifications to the buffer's overlays. |
| 1802 | 1803 | ||
| 1803 | @item beg_unchanged | 1804 | @item beg_unchanged |
| 1804 | @itemx end_unchanged | 1805 | @itemx end_unchanged |
| @@ -1906,13 +1907,22 @@ position. | |||
| 1906 | 1907 | ||
| 1907 | @item name | 1908 | @item name |
| 1908 | A Lisp string that names the buffer. It is guaranteed to be unique. | 1909 | A Lisp string that names the buffer. It is guaranteed to be unique. |
| 1909 | @xref{Buffer Names}. | 1910 | @xref{Buffer Names}. This and the following fields have their names |
| 1911 | in the C struct definition end in a @code{_} to indicate that they | ||
| 1912 | should not be accessed directly, but via the @code{BVAR} macro, like | ||
| 1913 | this: | ||
| 1914 | |||
| 1915 | @example | ||
| 1916 | Lisp_Object buf_name = BVAR (buffer, name); | ||
| 1917 | @end example | ||
| 1910 | 1918 | ||
| 1911 | @item save_length | 1919 | @item save_length |
| 1912 | The length of the file this buffer is visiting, when last read or | 1920 | The length of the file this buffer is visiting, when last read or |
| 1913 | saved. This and other fields concerned with saving are not kept in | 1921 | saved. It can have 2 special values: @minus{}1 means auto-saving was |
| 1914 | the @code{buffer_text} structure because indirect buffers are never | 1922 | turned off in this buffer, and @minus{}2 means don't turn off |
| 1915 | saved. | 1923 | auto-saving if buffer text shrinks a lot. This and other fields |
| 1924 | concerned with saving are not kept in the @code{buffer_text} structure | ||
| 1925 | because indirect buffers are never saved. | ||
| 1916 | 1926 | ||
| 1917 | @item directory | 1927 | @item directory |
| 1918 | The directory for expanding relative file names. This is the value of | 1928 | The directory for expanding relative file names. This is the value of |
| @@ -2036,37 +2046,29 @@ if that window no longer displays this buffer. | |||
| 2036 | 2046 | ||
| 2037 | @table @code | 2047 | @table @code |
| 2038 | @item frame | 2048 | @item frame |
| 2039 | The frame that this window is on. | 2049 | The frame that this window is on, as a Lisp object. |
| 2040 | 2050 | ||
| 2041 | @item mini_p | 2051 | @item mini |
| 2042 | Non-@code{nil} if this window is a minibuffer window. | 2052 | Non-zero if this window is a minibuffer window. |
| 2043 | 2053 | ||
| 2044 | @item parent | 2054 | @item parent |
| 2045 | Internally, Emacs arranges windows in a tree; each group of siblings has | 2055 | Internally, Emacs arranges windows in a tree; each group of siblings has |
| 2046 | a parent window whose area includes all the siblings. This field points | 2056 | a parent window whose area includes all the siblings. This field points |
| 2047 | to a window's parent. | 2057 | to a window's parent, as a Lisp object. |
| 2048 | 2058 | ||
| 2049 | Parent windows do not display buffers, and play little role in display | 2059 | Parent windows do not display buffers, and play little role in display |
| 2050 | except to shape their child windows. Emacs Lisp programs usually have | 2060 | except to shape their child windows. Emacs Lisp programs usually have |
| 2051 | no access to the parent windows; they operate on the windows at the | 2061 | no access to the parent windows; they operate on the windows at the |
| 2052 | leaves of the tree, which actually display buffers. | 2062 | leaves of the tree, which actually display buffers. |
| 2053 | 2063 | ||
| 2054 | @c FIXME: These two slots and the 'buffer' slot below were replaced | ||
| 2055 | @c with a single slot 'contents' on 2013-03-28. --xfq | ||
| 2056 | @item hchild | ||
| 2057 | @itemx vchild | ||
| 2058 | These fields contain the window's leftmost child and its topmost child | ||
| 2059 | respectively. @code{hchild} is used if the window is subdivided | ||
| 2060 | horizontally by child windows, and @code{vchild} if it is subdivided | ||
| 2061 | vertically. In a live window, only one of @code{hchild}, @code{vchild}, | ||
| 2062 | and @code{buffer} (q.v.@:) is non-@code{nil}. | ||
| 2063 | |||
| 2064 | @item next | 2064 | @item next |
| 2065 | @itemx prev | 2065 | @itemx prev |
| 2066 | The next sibling and previous sibling of this window. @code{next} is | 2066 | The next sibling and previous sibling of this window. @code{next} is |
| 2067 | @code{nil} if the window is the right-most or bottom-most in its group; | 2067 | @code{nil} if the window is the right-most or bottom-most in its group; |
| 2068 | @code{prev} is @code{nil} if it is the left-most or top-most in its | 2068 | @code{prev} is @code{nil} if it is the left-most or top-most in its |
| 2069 | group. | 2069 | group. Whether the sibling is left/right or up/down is determined by |
| 2070 | the @code{horizontal} field: if it's non-zero, the siblings are | ||
| 2071 | arranged horizontally. | ||
| 2070 | 2072 | ||
| 2071 | @item left_col | 2073 | @item left_col |
| 2072 | The left-hand edge of the window, measured in columns, relative to the | 2074 | The left-hand edge of the window, measured in columns, relative to the |
| @@ -2082,29 +2084,35 @@ The width and height of the window, measured in columns and lines | |||
| 2082 | respectively. The width includes the scroll bar and fringes, and/or | 2084 | respectively. The width includes the scroll bar and fringes, and/or |
| 2083 | the separator line on the right of the window (if any). | 2085 | the separator line on the right of the window (if any). |
| 2084 | 2086 | ||
| 2085 | @item buffer | 2087 | @item contents |
| 2086 | The buffer that the window is displaying. | 2088 | For leaf windows, this is the buffer, as a Lisp object, that the |
| 2089 | window is displaying. For an internal (``parent'') window, this is | ||
| 2090 | its child window. It can also be @code{nil}, for a pseudo-window. | ||
| 2087 | 2091 | ||
| 2088 | @item start | 2092 | @item start |
| 2089 | A marker pointing to the position in the buffer that is the first | 2093 | A marker pointing to the position in the buffer that is the first |
| 2090 | character displayed in the window. | 2094 | character (in the logical order, @pxref{Bidirectional Display}) |
| 2095 | displayed in the window. | ||
| 2091 | 2096 | ||
| 2092 | @item pointm | 2097 | @item pointm |
| 2093 | @cindex window point internals | 2098 | @cindex window point internals |
| 2094 | This is the value of point in the current buffer when this window is | 2099 | This is the value of point in the current buffer when this window is |
| 2095 | selected; when it is not selected, it retains its previous value. | 2100 | selected; when it is not selected, it retains its previous value. |
| 2096 | 2101 | ||
| 2102 | @item old_pointm | ||
| 2103 | The value of @code{pointm} at the last redisplay time. | ||
| 2104 | |||
| 2097 | @item force_start | 2105 | @item force_start |
| 2098 | If this flag is non-@code{nil}, it says that the window has been | 2106 | If this flag is non-@code{nil}, it says that the window has been |
| 2099 | scrolled explicitly by the Lisp program. This affects what the next | 2107 | scrolled explicitly by the Lisp program, and the value of the the |
| 2100 | redisplay does if point is off the screen: instead of scrolling the | 2108 | window's @code{start} was set for redisplay to honor. This affects |
| 2101 | window to show the text around point, it moves point to a location that | 2109 | what the next redisplay does if point is off the screen: instead of |
| 2102 | is on the screen. | 2110 | scrolling the window to show the text around point, it moves point to |
| 2111 | a location that is on the screen. | ||
| 2103 | 2112 | ||
| 2104 | @item frozen_window_start_p | 2113 | @item optional_new_start |
| 2105 | This field is set temporarily to 1 to indicate to redisplay that | 2114 | This is similar to @code{force_start}, but the next redisplay will |
| 2106 | @code{start} of this window should not be changed, even if point | 2115 | only obey it if point stays visible. |
| 2107 | gets invisible. | ||
| 2108 | 2116 | ||
| 2109 | @item start_at_line_beg | 2117 | @item start_at_line_beg |
| 2110 | Non-@code{nil} means current value of @code{start} was the beginning of a line | 2118 | Non-@code{nil} means current value of @code{start} was the beginning of a line |
| @@ -2130,30 +2138,30 @@ The buffer's value of point, as of the last time a redisplay completed | |||
| 2130 | in this window. | 2138 | in this window. |
| 2131 | 2139 | ||
| 2132 | @item last_had_star | 2140 | @item last_had_star |
| 2133 | A non-@code{nil} value means the window's buffer was modified when the | 2141 | A non-zero value means the window's buffer was modified when the |
| 2134 | window was last updated. | 2142 | window was last updated. |
| 2135 | 2143 | ||
| 2136 | @item vertical_scroll_bar | 2144 | @item vertical_scroll_bar |
| 2137 | This window's vertical scroll bar. | 2145 | This window's vertical scroll bar, a Lisp object. |
| 2138 | 2146 | ||
| 2139 | @item left_margin_cols | 2147 | @item left_margin_cols |
| 2140 | @itemx right_margin_cols | 2148 | @itemx right_margin_cols |
| 2141 | The widths of the left and right margins in this window. A value of | 2149 | The widths of the left and right margins in this window. A value of |
| 2142 | @code{nil} means no margin. | 2150 | zero means no margin. |
| 2143 | 2151 | ||
| 2144 | @item left_fringe_width | 2152 | @item left_fringe_width |
| 2145 | @itemx right_fringe_width | 2153 | @itemx right_fringe_width |
| 2146 | The widths of the left and right fringes in this window. A value of | 2154 | The pixel widths of the left and right fringes in this window. A |
| 2147 | @code{nil} or @code{t} means use the values of the frame. | 2155 | value of @minus{}1 means use the values of the frame. |
| 2148 | 2156 | ||
| 2149 | @item fringes_outside_margins | 2157 | @item fringes_outside_margins |
| 2150 | A non-@code{nil} value means the fringes outside the display margins; | 2158 | A non-zero value means the fringes outside the display margins; |
| 2151 | othersize they are between the margin and the text. | 2159 | othersize they are between the margin and the text. |
| 2152 | 2160 | ||
| 2153 | @item window_end_pos | 2161 | @item window_end_pos |
| 2154 | This is computed as @code{z} minus the buffer position of the last glyph | 2162 | This is computed as @code{z} minus the buffer position of the last glyph |
| 2155 | in the current matrix of the window. The value is only valid if | 2163 | in the current matrix of the window. The value is only valid if |
| 2156 | @code{window_end_valid} is not @code{nil}. | 2164 | @code{window_end_valid} is non-zero. |
| 2157 | 2165 | ||
| 2158 | @item window_end_bytepos | 2166 | @item window_end_bytepos |
| 2159 | The byte position corresponding to @code{window_end_pos}. | 2167 | The byte position corresponding to @code{window_end_pos}. |
| @@ -2163,16 +2171,17 @@ The window-relative vertical position of the line containing | |||
| 2163 | @code{window_end_pos}. | 2171 | @code{window_end_pos}. |
| 2164 | 2172 | ||
| 2165 | @item window_end_valid | 2173 | @item window_end_valid |
| 2166 | This field is set to a non-@code{nil} value if @code{window_end_pos} is truly | 2174 | This field is set to a non-zero value if @code{window_end_pos} and |
| 2167 | valid. This is @code{nil} if nontrivial redisplay is pre-empted, since in that | 2175 | @code{window_end_vpos} are truly valid. This is zero if nontrivial |
| 2168 | case the display that @code{window_end_pos} was computed for did not get | 2176 | redisplay is pre-empted, since in that case the display that |
| 2169 | onto the screen. | 2177 | @code{window_end_pos} was computed for did not get onto the screen. |
| 2170 | 2178 | ||
| 2171 | @item cursor | 2179 | @item cursor |
| 2172 | A structure describing where the cursor is in this window. | 2180 | A structure describing where the cursor is in this window. |
| 2173 | 2181 | ||
| 2174 | @item last_cursor | 2182 | @item last_cursor_vpos |
| 2175 | The value of @code{cursor} as of the last redisplay that finished. | 2183 | The window-relative vertical position of the line showing the cursor |
| 2184 | as of the last redisplay that finished. | ||
| 2176 | 2185 | ||
| 2177 | @item phys_cursor | 2186 | @item phys_cursor |
| 2178 | A structure describing where the cursor of this window physically is. | 2187 | A structure describing where the cursor of this window physically is. |
| @@ -2200,8 +2209,16 @@ the last redisplay. | |||
| 2200 | This is set to 1 during redisplay when this window must be updated. | 2209 | This is set to 1 during redisplay when this window must be updated. |
| 2201 | 2210 | ||
| 2202 | @item hscroll | 2211 | @item hscroll |
| 2203 | This is the number of columns that the display in the window is scrolled | 2212 | This is the number of columns that the display in the window is |
| 2204 | horizontally to the left. Normally, this is 0. | 2213 | scrolled horizontally to the left. Normally, this is 0. When only |
| 2214 | the current line is hscrolled, this describes how much the current | ||
| 2215 | line is scrolled. | ||
| 2216 | |||
| 2217 | @item min_hscroll | ||
| 2218 | Minimum value of @code{hscroll}, set by the user via | ||
| 2219 | @code{set-window-hscroll} (@pxref{Horizontal Scrolling}). When only | ||
| 2220 | the current line is hscrolled, this describes the horizontal scrolling | ||
| 2221 | of lines other than the current one. | ||
| 2205 | 2222 | ||
| 2206 | @item vscroll | 2223 | @item vscroll |
| 2207 | Vertical scroll amount, in pixels. Normally, this is 0. | 2224 | Vertical scroll amount, in pixels. Normally, this is 0. |
| @@ -2213,20 +2230,30 @@ Non-@code{nil} if this window is dedicated to its buffer. | |||
| 2213 | The window's display table, or @code{nil} if none is specified for it. | 2230 | The window's display table, or @code{nil} if none is specified for it. |
| 2214 | 2231 | ||
| 2215 | @item update_mode_line | 2232 | @item update_mode_line |
| 2216 | Non-@code{nil} means this window's mode line needs to be updated. | 2233 | Non-zero means this window's mode line needs to be updated. |
| 2234 | |||
| 2235 | @item mode_line_height | ||
| 2236 | @itemx header_line_height | ||
| 2237 | The height in pixels of the mode line and the header line, or | ||
| 2238 | @minus{}1 if not known. | ||
| 2217 | 2239 | ||
| 2218 | @item base_line_number | 2240 | @item base_line_number |
| 2219 | The line number of a certain position in the buffer, or @code{nil}. | 2241 | The line number of a certain position in the buffer, or zero. |
| 2220 | This is used for displaying the line number of point in the mode line. | 2242 | This is used for displaying the line number of point in the mode line. |
| 2221 | 2243 | ||
| 2222 | @item base_line_pos | 2244 | @item base_line_pos |
| 2223 | The position in the buffer for which the line number is known, or | 2245 | The position in the buffer for which the line number is known, or |
| 2224 | @code{nil} meaning none is known. If it is a buffer, don't display | 2246 | zero meaning none is known. If it is @minus{}1, don't display |
| 2225 | the line number as long as the window shows that buffer. | 2247 | the line number as long as the window shows that buffer. |
| 2226 | 2248 | ||
| 2227 | @item column_number_displayed | 2249 | @item column_number_displayed |
| 2228 | The column number currently displayed in this window's mode line, or @code{nil} | 2250 | The column number currently displayed in this window's mode line, or |
| 2229 | if column numbers are not being displayed. | 2251 | @minus{}1 if column numbers are not being displayed. |
| 2252 | |||
| 2253 | @item pseudo_window_p | ||
| 2254 | This is non-zero for windows that display the menu bar and the tool | ||
| 2255 | bar (when Emacs uses toolkits that don't display their own menu bar | ||
| 2256 | and tool bar). | ||
| 2230 | 2257 | ||
| 2231 | @item current_matrix | 2258 | @item current_matrix |
| 2232 | @itemx desired_matrix | 2259 | @itemx desired_matrix |
| @@ -2243,7 +2270,7 @@ Glyph matrices describing the current and desired display of this window. | |||
| 2243 | 2270 | ||
| 2244 | @table @code | 2271 | @table @code |
| 2245 | @item name | 2272 | @item name |
| 2246 | A string, the name of the process. | 2273 | A Lisp string, the name of the process. |
| 2247 | 2274 | ||
| 2248 | @item command | 2275 | @item command |
| 2249 | A list containing the command arguments that were used to start this | 2276 | A list containing the command arguments that were used to start this |
| @@ -2251,10 +2278,10 @@ process. For a network or serial process, it is @code{nil} if the | |||
| 2251 | process is running or @code{t} if the process is stopped. | 2278 | process is running or @code{t} if the process is stopped. |
| 2252 | 2279 | ||
| 2253 | @item filter | 2280 | @item filter |
| 2254 | A function used to accept output from the process. | 2281 | A Lisp function used to accept output from the process. |
| 2255 | 2282 | ||
| 2256 | @item sentinel | 2283 | @item sentinel |
| 2257 | A function called whenever the state of the process changes. | 2284 | A Lisp function called whenever the state of the process changes. |
| 2258 | 2285 | ||
| 2259 | @item buffer | 2286 | @item buffer |
| 2260 | The associated buffer of the process. | 2287 | The associated buffer of the process. |
| @@ -2281,7 +2308,8 @@ does not ask for confirmation about killing the process. | |||
| 2281 | The raw process status, as returned by the @code{wait} system call. | 2308 | The raw process status, as returned by the @code{wait} system call. |
| 2282 | 2309 | ||
| 2283 | @item status | 2310 | @item status |
| 2284 | The process status, as @code{process-status} should return it. | 2311 | The process status, as @code{process-status} should return it. This |
| 2312 | is a Lisp symbol, a cons cell, or a list. | ||
| 2285 | 2313 | ||
| 2286 | @item tick | 2314 | @item tick |
| 2287 | @itemx update_tick | 2315 | @itemx update_tick |
| @@ -2290,8 +2318,8 @@ needs to be reported, either by running the sentinel or by inserting a | |||
| 2290 | message in the process buffer. | 2318 | message in the process buffer. |
| 2291 | 2319 | ||
| 2292 | @item pty_flag | 2320 | @item pty_flag |
| 2293 | Non-@code{nil} if communication with the subprocess uses a pty; | 2321 | Non-zero if communication with the subprocess uses a pty; zero if it |
| 2294 | @code{nil} if it uses a pipe. | 2322 | uses a pipe. |
| 2295 | 2323 | ||
| 2296 | @item infd | 2324 | @item infd |
| 2297 | The file descriptor for input from the process. | 2325 | The file descriptor for input from the process. |