aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-20 20:45:07 +0200
committerEli Zaretskii2018-11-20 20:45:07 +0200
commit0d59ae3f49ac122203d94aa02acc9c7ae920aeef (patch)
tree17d9bda6a457a47560290eb4f8c140c52524634a
parentd667318a7f89a9daeffca6fb47503889bd23f3bd (diff)
downloademacs-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.texi148
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}.
1748Buffer object represents the text to display and edit. Window is the part 1748Buffer object represents the text to display and edit. Window is the part
1749of display structure which shows the buffer or used as a container to 1749of display structure which shows the buffer or is used as a container to
1750recursively place other windows on the same frame. (Do not confuse Emacs Lisp 1750recursively place other windows on the same frame. (Do not confuse Emacs Lisp
1751window object with the window as an entity managed by the user interface 1751window object with the window as an entity managed by the user interface
1752system like X; in Emacs terminology, the latter is called frame.) Finally, 1752system 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
1776The address of the buffer contents. 1776The address of the buffer contents. The buffer contents is a linear C
1777array 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
1798the buffer was visited or saved; @code{chars_modiff} counts only 1799the buffer was visited or saved; @code{chars_modiff} counts only
1799modifications to the characters in the buffer, ignoring all other 1800modifications to the characters in the buffer, ignoring all other
1800kinds of changes; and @code{overlay_modiff} counts only modifications 1801kinds of changes (such as text properties); and @code{overlay_modiff}
1801to the overlays. 1802counts 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
1908A Lisp string that names the buffer. It is guaranteed to be unique. 1909A 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
1911in the C struct definition end in a @code{_} to indicate that they
1912should not be accessed directly, but via the @code{BVAR} macro, like
1913this:
1914
1915@example
1916 Lisp_Object buf_name = BVAR (buffer, name);
1917@end example
1910 1918
1911@item save_length 1919@item save_length
1912The length of the file this buffer is visiting, when last read or 1920The length of the file this buffer is visiting, when last read or
1913saved. This and other fields concerned with saving are not kept in 1921saved. It can have 2 special values: @minus{}1 means auto-saving was
1914the @code{buffer_text} structure because indirect buffers are never 1922turned off in this buffer, and @minus{}2 means don't turn off
1915saved. 1923auto-saving if buffer text shrinks a lot. This and other fields
1924concerned with saving are not kept in the @code{buffer_text} structure
1925because indirect buffers are never saved.
1916 1926
1917@item directory 1927@item directory
1918The directory for expanding relative file names. This is the value of 1928The 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
2039The frame that this window is on. 2049The frame that this window is on, as a Lisp object.
2040 2050
2041@item mini_p 2051@item mini
2042Non-@code{nil} if this window is a minibuffer window. 2052Non-zero if this window is a minibuffer window.
2043 2053
2044@item parent 2054@item parent
2045Internally, Emacs arranges windows in a tree; each group of siblings has 2055Internally, Emacs arranges windows in a tree; each group of siblings has
2046a parent window whose area includes all the siblings. This field points 2056a parent window whose area includes all the siblings. This field points
2047to a window's parent. 2057to a window's parent, as a Lisp object.
2048 2058
2049Parent windows do not display buffers, and play little role in display 2059Parent windows do not display buffers, and play little role in display
2050except to shape their child windows. Emacs Lisp programs usually have 2060except to shape their child windows. Emacs Lisp programs usually have
2051no access to the parent windows; they operate on the windows at the 2061no access to the parent windows; they operate on the windows at the
2052leaves of the tree, which actually display buffers. 2062leaves 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
2058These fields contain the window's leftmost child and its topmost child
2059respectively. @code{hchild} is used if the window is subdivided
2060horizontally by child windows, and @code{vchild} if it is subdivided
2061vertically. In a live window, only one of @code{hchild}, @code{vchild},
2062and @code{buffer} (q.v.@:) is non-@code{nil}.
2063
2064@item next 2064@item next
2065@itemx prev 2065@itemx prev
2066The next sibling and previous sibling of this window. @code{next} is 2066The 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
2069group. 2069group. Whether the sibling is left/right or up/down is determined by
2070the @code{horizontal} field: if it's non-zero, the siblings are
2071arranged horizontally.
2070 2072
2071@item left_col 2073@item left_col
2072The left-hand edge of the window, measured in columns, relative to the 2074The 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
2082respectively. The width includes the scroll bar and fringes, and/or 2084respectively. The width includes the scroll bar and fringes, and/or
2083the separator line on the right of the window (if any). 2085the separator line on the right of the window (if any).
2084 2086
2085@item buffer 2087@item contents
2086The buffer that the window is displaying. 2088For leaf windows, this is the buffer, as a Lisp object, that the
2089window is displaying. For an internal (``parent'') window, this is
2090its child window. It can also be @code{nil}, for a pseudo-window.
2087 2091
2088@item start 2092@item start
2089A marker pointing to the position in the buffer that is the first 2093A marker pointing to the position in the buffer that is the first
2090character displayed in the window. 2094character (in the logical order, @pxref{Bidirectional Display})
2095displayed in the window.
2091 2096
2092@item pointm 2097@item pointm
2093@cindex window point internals 2098@cindex window point internals
2094This is the value of point in the current buffer when this window is 2099This is the value of point in the current buffer when this window is
2095selected; when it is not selected, it retains its previous value. 2100selected; when it is not selected, it retains its previous value.
2096 2101
2102@item old_pointm
2103The value of @code{pointm} at the last redisplay time.
2104
2097@item force_start 2105@item force_start
2098If this flag is non-@code{nil}, it says that the window has been 2106If this flag is non-@code{nil}, it says that the window has been
2099scrolled explicitly by the Lisp program. This affects what the next 2107scrolled explicitly by the Lisp program, and the value of the the
2100redisplay does if point is off the screen: instead of scrolling the 2108window's @code{start} was set for redisplay to honor. This affects
2101window to show the text around point, it moves point to a location that 2109what the next redisplay does if point is off the screen: instead of
2102is on the screen. 2110scrolling the window to show the text around point, it moves point to
2111a location that is on the screen.
2103 2112
2104@item frozen_window_start_p 2113@item optional_new_start
2105This field is set temporarily to 1 to indicate to redisplay that 2114This is similar to @code{force_start}, but the next redisplay will
2106@code{start} of this window should not be changed, even if point 2115only obey it if point stays visible.
2107gets invisible.
2108 2116
2109@item start_at_line_beg 2117@item start_at_line_beg
2110Non-@code{nil} means current value of @code{start} was the beginning of a line 2118Non-@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
2130in this window. 2138in this window.
2131 2139
2132@item last_had_star 2140@item last_had_star
2133A non-@code{nil} value means the window's buffer was modified when the 2141A non-zero value means the window's buffer was modified when the
2134window was last updated. 2142window was last updated.
2135 2143
2136@item vertical_scroll_bar 2144@item vertical_scroll_bar
2137This window's vertical scroll bar. 2145This 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
2141The widths of the left and right margins in this window. A value of 2149The widths of the left and right margins in this window. A value of
2142@code{nil} means no margin. 2150zero 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
2146The widths of the left and right fringes in this window. A value of 2154The 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. 2155value of @minus{}1 means use the values of the frame.
2148 2156
2149@item fringes_outside_margins 2157@item fringes_outside_margins
2150A non-@code{nil} value means the fringes outside the display margins; 2158A non-zero value means the fringes outside the display margins;
2151othersize they are between the margin and the text. 2159othersize they are between the margin and the text.
2152 2160
2153@item window_end_pos 2161@item window_end_pos
2154This is computed as @code{z} minus the buffer position of the last glyph 2162This is computed as @code{z} minus the buffer position of the last glyph
2155in the current matrix of the window. The value is only valid if 2163in 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
2159The byte position corresponding to @code{window_end_pos}. 2167The 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
2166This field is set to a non-@code{nil} value if @code{window_end_pos} is truly 2174This field is set to a non-zero value if @code{window_end_pos} and
2167valid. 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
2168case the display that @code{window_end_pos} was computed for did not get 2176redisplay is pre-empted, since in that case the display that
2169onto the screen. 2177@code{window_end_pos} was computed for did not get onto the screen.
2170 2178
2171@item cursor 2179@item cursor
2172A structure describing where the cursor is in this window. 2180A structure describing where the cursor is in this window.
2173 2181
2174@item last_cursor 2182@item last_cursor_vpos
2175The value of @code{cursor} as of the last redisplay that finished. 2183The window-relative vertical position of the line showing the cursor
2184as of the last redisplay that finished.
2176 2185
2177@item phys_cursor 2186@item phys_cursor
2178A structure describing where the cursor of this window physically is. 2187A structure describing where the cursor of this window physically is.
@@ -2200,8 +2209,16 @@ the last redisplay.
2200This is set to 1 during redisplay when this window must be updated. 2209This is set to 1 during redisplay when this window must be updated.
2201 2210
2202@item hscroll 2211@item hscroll
2203This is the number of columns that the display in the window is scrolled 2212This is the number of columns that the display in the window is
2204horizontally to the left. Normally, this is 0. 2213scrolled horizontally to the left. Normally, this is 0. When only
2214the current line is hscrolled, this describes how much the current
2215line is scrolled.
2216
2217@item min_hscroll
2218Minimum value of @code{hscroll}, set by the user via
2219@code{set-window-hscroll} (@pxref{Horizontal Scrolling}). When only
2220the current line is hscrolled, this describes the horizontal scrolling
2221of lines other than the current one.
2205 2222
2206@item vscroll 2223@item vscroll
2207Vertical scroll amount, in pixels. Normally, this is 0. 2224Vertical scroll amount, in pixels. Normally, this is 0.
@@ -2213,20 +2230,30 @@ Non-@code{nil} if this window is dedicated to its buffer.
2213The window's display table, or @code{nil} if none is specified for it. 2230The 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
2216Non-@code{nil} means this window's mode line needs to be updated. 2233Non-zero means this window's mode line needs to be updated.
2234
2235@item mode_line_height
2236@itemx header_line_height
2237The 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
2219The line number of a certain position in the buffer, or @code{nil}. 2241The line number of a certain position in the buffer, or zero.
2220This is used for displaying the line number of point in the mode line. 2242This 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
2223The position in the buffer for which the line number is known, or 2245The 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 2246zero meaning none is known. If it is @minus{}1, don't display
2225the line number as long as the window shows that buffer. 2247the line number as long as the window shows that buffer.
2226 2248
2227@item column_number_displayed 2249@item column_number_displayed
2228The column number currently displayed in this window's mode line, or @code{nil} 2250The column number currently displayed in this window's mode line, or
2229if column numbers are not being displayed. 2251@minus{}1 if column numbers are not being displayed.
2252
2253@item pseudo_window_p
2254This is non-zero for windows that display the menu bar and the tool
2255bar (when Emacs uses toolkits that don't display their own menu bar
2256and 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
2246A string, the name of the process. 2273A Lisp string, the name of the process.
2247 2274
2248@item command 2275@item command
2249A list containing the command arguments that were used to start this 2276A 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
2251process is running or @code{t} if the process is stopped. 2278process is running or @code{t} if the process is stopped.
2252 2279
2253@item filter 2280@item filter
2254A function used to accept output from the process. 2281A Lisp function used to accept output from the process.
2255 2282
2256@item sentinel 2283@item sentinel
2257A function called whenever the state of the process changes. 2284A Lisp function called whenever the state of the process changes.
2258 2285
2259@item buffer 2286@item buffer
2260The associated buffer of the process. 2287The associated buffer of the process.
@@ -2281,7 +2308,8 @@ does not ask for confirmation about killing the process.
2281The raw process status, as returned by the @code{wait} system call. 2308The raw process status, as returned by the @code{wait} system call.
2282 2309
2283@item status 2310@item status
2284The process status, as @code{process-status} should return it. 2311The process status, as @code{process-status} should return it. This
2312is 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
2290message in the process buffer. 2318message in the process buffer.
2291 2319
2292@item pty_flag 2320@item pty_flag
2293Non-@code{nil} if communication with the subprocess uses a pty; 2321Non-zero if communication with the subprocess uses a pty; zero if it
2294@code{nil} if it uses a pipe. 2322uses a pipe.
2295 2323
2296@item infd 2324@item infd
2297The file descriptor for input from the process. 2325The file descriptor for input from the process.