aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-08 14:25:08 -0700
committerDan Nicolaescu2010-07-08 14:25:08 -0700
commit5842a27bbfb7efa6872824e501bc7ec98b631553 (patch)
treed173899af9cbed9d90d94cfc710e6ecc06dd1f6b /src/buffer.c
parent71c44c04bb996abe77db8efd88255fde06532b10 (diff)
downloademacs-5842a27bbfb7efa6872824e501bc7ec98b631553.tar.gz
emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.zip
Convert DEFUNs to standard C.
* src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c138
1 files changed, 47 insertions, 91 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b8f19e96c43..46e1b90ac34 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -190,8 +190,7 @@ nsberror (Lisp_Object spec)
190DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, 190DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0,
191 doc: /* Return non-nil if OBJECT is a buffer which has not been killed. 191 doc: /* Return non-nil if OBJECT is a buffer which has not been killed.
192Value is nil if OBJECT is not a buffer or if it has been killed. */) 192Value is nil if OBJECT is not a buffer or if it has been killed. */)
193 (object) 193 (Lisp_Object object)
194 Lisp_Object object;
195{ 194{
196 return ((BUFFERP (object) && ! NILP (XBUFFER (object)->name)) 195 return ((BUFFERP (object) && ! NILP (XBUFFER (object)->name))
197 ? Qt : Qnil); 196 ? Qt : Qnil);
@@ -202,8 +201,7 @@ DEFUN ("buffer-list", Fbuffer_list, Sbuffer_list, 0, 1, 0,
202If the optional arg FRAME is a frame, we return the buffer list 201If the optional arg FRAME is a frame, we return the buffer list
203in the proper order for that frame: the buffers in FRAME's `buffer-list' 202in the proper order for that frame: the buffers in FRAME's `buffer-list'
204frame parameter come first, followed by the rest of the buffers. */) 203frame parameter come first, followed by the rest of the buffers. */)
205 (frame) 204 (Lisp_Object frame)
206 Lisp_Object frame;
207{ 205{
208 Lisp_Object general; 206 Lisp_Object general;
209 general = Fmapcar (Qcdr, Vbuffer_alist); 207 general = Fmapcar (Qcdr, Vbuffer_alist);
@@ -266,8 +264,7 @@ DEFUN ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0,
266BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME 264BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME
267is a string and there is no buffer with that name, return nil. If 265is a string and there is no buffer with that name, return nil. If
268BUFFER-OR-NAME is a buffer, return it as given. */) 266BUFFER-OR-NAME is a buffer, return it as given. */)
269 (buffer_or_name) 267 (register Lisp_Object buffer_or_name)
270 register Lisp_Object buffer_or_name;
271{ 268{
272 if (BUFFERP (buffer_or_name)) 269 if (BUFFERP (buffer_or_name))
273 return buffer_or_name; 270 return buffer_or_name;
@@ -281,8 +278,7 @@ DEFUN ("get-file-buffer", Fget_file_buffer, Sget_file_buffer, 1, 1, 0,
281The buffer's `buffer-file-name' must match exactly the expansion of FILENAME. 278The buffer's `buffer-file-name' must match exactly the expansion of FILENAME.
282If there is no such live buffer, return nil. 279If there is no such live buffer, return nil.
283See also `find-buffer-visiting'. */) 280See also `find-buffer-visiting'. */)
284 (filename) 281 (register Lisp_Object filename)
285 register Lisp_Object filename;
286{ 282{
287 register Lisp_Object tail, buf, tem; 283 register Lisp_Object tail, buf, tem;
288 Lisp_Object handler; 284 Lisp_Object handler;
@@ -337,8 +333,7 @@ buffer does not keep undo information.
337 333
338If BUFFER-OR-NAME is a buffer instead of a string, return it as given, 334If BUFFER-OR-NAME is a buffer instead of a string, return it as given,
339even if it is dead. The return value is never nil. */) 335even if it is dead. The return value is never nil. */)
340 (buffer_or_name) 336 (register Lisp_Object buffer_or_name)
341 register Lisp_Object buffer_or_name;
342{ 337{
343 register Lisp_Object buffer, name; 338 register Lisp_Object buffer, name;
344 register struct buffer *b; 339 register struct buffer *b;
@@ -533,8 +528,7 @@ NAME should be a string which is not the name of an existing buffer.
533Optional argument CLONE non-nil means preserve BASE-BUFFER's state, 528Optional argument CLONE non-nil means preserve BASE-BUFFER's state,
534such as major and minor modes, in the indirect buffer. 529such as major and minor modes, in the indirect buffer.
535CLONE nil means the indirect buffer's state is reset to default values. */) 530CLONE nil means the indirect buffer's state is reset to default values. */)
536 (base_buffer, name, clone) 531 (Lisp_Object base_buffer, Lisp_Object name, Lisp_Object clone)
537 Lisp_Object base_buffer, name, clone;
538{ 532{
539 Lisp_Object buf, tem; 533 Lisp_Object buf, tem;
540 struct buffer *b; 534 struct buffer *b;
@@ -829,8 +823,7 @@ Otherwise modify name by appending `<NUMBER>', incrementing NUMBER
829\(starting at 2) until an unused name is found, and then return that name. 823\(starting at 2) until an unused name is found, and then return that name.
830Optional second argument IGNORE specifies a name that is okay to use (if 824Optional second argument IGNORE specifies a name that is okay to use (if
831it is in the sequence to be tried) even if a buffer with that name exists. */) 825it is in the sequence to be tried) even if a buffer with that name exists. */)
832 (name, ignore) 826 (register Lisp_Object name, Lisp_Object ignore)
833 register Lisp_Object name, ignore;
834{ 827{
835 register Lisp_Object gentemp, tem; 828 register Lisp_Object gentemp, tem;
836 int count; 829 int count;
@@ -864,8 +857,7 @@ DEFUN ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0,
864 doc: /* Return the name of BUFFER, as a string. 857 doc: /* Return the name of BUFFER, as a string.
865BUFFER defaults to the current buffer. 858BUFFER defaults to the current buffer.
866Return nil if BUFFER has been killed. */) 859Return nil if BUFFER has been killed. */)
867 (buffer) 860 (register Lisp_Object buffer)
868 register Lisp_Object buffer;
869{ 861{
870 if (NILP (buffer)) 862 if (NILP (buffer))
871 return current_buffer->name; 863 return current_buffer->name;
@@ -876,8 +868,7 @@ Return nil if BUFFER has been killed. */)
876DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, 868DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
877 doc: /* Return name of file BUFFER is visiting, or nil if none. 869 doc: /* Return name of file BUFFER is visiting, or nil if none.
878No argument or nil as argument means use the current buffer. */) 870No argument or nil as argument means use the current buffer. */)
879 (buffer) 871 (register Lisp_Object buffer)
880 register Lisp_Object buffer;
881{ 872{
882 if (NILP (buffer)) 873 if (NILP (buffer))
883 return current_buffer->filename; 874 return current_buffer->filename;
@@ -890,8 +881,7 @@ DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer,
890 doc: /* Return the base buffer of indirect buffer BUFFER. 881 doc: /* Return the base buffer of indirect buffer BUFFER.
891If BUFFER is not indirect, return nil. 882If BUFFER is not indirect, return nil.
892BUFFER defaults to the current buffer. */) 883BUFFER defaults to the current buffer. */)
893 (buffer) 884 (register Lisp_Object buffer)
894 register Lisp_Object buffer;
895{ 885{
896 struct buffer *base; 886 struct buffer *base;
897 Lisp_Object base_buffer; 887 Lisp_Object base_buffer;
@@ -915,9 +905,7 @@ DEFUN ("buffer-local-value", Fbuffer_local_value,
915 doc: /* Return the value of VARIABLE in BUFFER. 905 doc: /* Return the value of VARIABLE in BUFFER.
916If VARIABLE does not have a buffer-local binding in BUFFER, the value 906If VARIABLE does not have a buffer-local binding in BUFFER, the value
917is the default binding of the variable. */) 907is the default binding of the variable. */)
918 (variable, buffer) 908 (register Lisp_Object variable, register Lisp_Object buffer)
919 register Lisp_Object variable;
920 register Lisp_Object buffer;
921{ 909{
922 register struct buffer *buf; 910 register struct buffer *buf;
923 register Lisp_Object result; 911 register Lisp_Object result;
@@ -1015,8 +1003,7 @@ Most elements look like (SYMBOL . VALUE), describing one variable.
1015For a symbol that is locally unbound, just the symbol appears in the value. 1003For a symbol that is locally unbound, just the symbol appears in the value.
1016Note that storing new VALUEs in these elements doesn't change the variables. 1004Note that storing new VALUEs in these elements doesn't change the variables.
1017No argument or nil as argument means use current buffer as BUFFER. */) 1005No argument or nil as argument means use current buffer as BUFFER. */)
1018 (buffer) 1006 (register Lisp_Object buffer)
1019 register Lisp_Object buffer;
1020{ 1007{
1021 register struct buffer *buf; 1008 register struct buffer *buf;
1022 register Lisp_Object result; 1009 register Lisp_Object result;
@@ -1058,8 +1045,7 @@ DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p,
1058 0, 1, 0, 1045 0, 1, 0,
1059 doc: /* Return t if BUFFER was modified since its file was last read or saved. 1046 doc: /* Return t if BUFFER was modified since its file was last read or saved.
1060No argument or nil as argument means use current buffer as BUFFER. */) 1047No argument or nil as argument means use current buffer as BUFFER. */)
1061 (buffer) 1048 (register Lisp_Object buffer)
1062 register Lisp_Object buffer;
1063{ 1049{
1064 register struct buffer *buf; 1050 register struct buffer *buf;
1065 if (NILP (buffer)) 1051 if (NILP (buffer))
@@ -1077,8 +1063,7 @@ DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p,
1077 1, 1, 0, 1063 1, 1, 0,
1078 doc: /* Mark current buffer as modified or unmodified according to FLAG. 1064 doc: /* Mark current buffer as modified or unmodified according to FLAG.
1079A non-nil FLAG means mark the buffer modified. */) 1065A non-nil FLAG means mark the buffer modified. */)
1080 (flag) 1066 (register Lisp_Object flag)
1081 register Lisp_Object flag;
1082{ 1067{
1083 register int already; 1068 register int already;
1084 register Lisp_Object fn; 1069 register Lisp_Object fn;
@@ -1147,8 +1132,7 @@ DEFUN ("restore-buffer-modified-p", Frestore_buffer_modified_p,
1147 doc: /* Like `set-buffer-modified-p', with a difference concerning redisplay. 1132 doc: /* Like `set-buffer-modified-p', with a difference concerning redisplay.
1148It is not ensured that mode lines will be updated to show the modified 1133It is not ensured that mode lines will be updated to show the modified
1149state of the current buffer. Use with care. */) 1134state of the current buffer. Use with care. */)
1150 (flag) 1135 (Lisp_Object flag)
1151 Lisp_Object flag;
1152{ 1136{
1153#ifdef CLASH_DETECTION 1137#ifdef CLASH_DETECTION
1154 Lisp_Object fn; 1138 Lisp_Object fn;
@@ -1178,8 +1162,7 @@ DEFUN ("buffer-modified-tick", Fbuffer_modified_tick, Sbuffer_modified_tick,
1178Each buffer has a tick counter which is incremented each time the 1162Each buffer has a tick counter which is incremented each time the
1179text in that buffer is changed. It wraps around occasionally. 1163text in that buffer is changed. It wraps around occasionally.
1180No argument or nil as argument means use current buffer as BUFFER. */) 1164No argument or nil as argument means use current buffer as BUFFER. */)
1181 (buffer) 1165 (register Lisp_Object buffer)
1182 register Lisp_Object buffer;
1183{ 1166{
1184 register struct buffer *buf; 1167 register struct buffer *buf;
1185 if (NILP (buffer)) 1168 if (NILP (buffer))
@@ -1203,8 +1186,7 @@ values returned by two individual calls of `buffer-chars-modified-tick',
1203you can tell whether a character change occurred in that buffer in 1186you can tell whether a character change occurred in that buffer in
1204between these calls. No argument or nil as argument means use current 1187between these calls. No argument or nil as argument means use current
1205buffer as BUFFER. */) 1188buffer as BUFFER. */)
1206 (buffer) 1189 (register Lisp_Object buffer)
1207 register Lisp_Object buffer;
1208{ 1190{
1209 register struct buffer *buf; 1191 register struct buffer *buf;
1210 if (NILP (buffer)) 1192 if (NILP (buffer))
@@ -1230,8 +1212,7 @@ If UNIQUE is non-nil, come up with a new name using
1230Interactively, you can set UNIQUE with a prefix argument. 1212Interactively, you can set UNIQUE with a prefix argument.
1231We return the name we actually gave the buffer. 1213We return the name we actually gave the buffer.
1232This does not change the name of the visited file (if any). */) 1214This does not change the name of the visited file (if any). */)
1233 (newname, unique) 1215 (register Lisp_Object newname, Lisp_Object unique)
1234 register Lisp_Object newname, unique;
1235{ 1216{
1236 register Lisp_Object tem, buf; 1217 register Lisp_Object tem, buf;
1237 1218
@@ -1278,8 +1259,7 @@ If the optional third argument FRAME is non-nil, use that frame's
1278buffer list instead of the selected frame's buffer list. 1259buffer list instead of the selected frame's buffer list.
1279If no other buffer exists, the buffer `*scratch*' is returned. 1260If no other buffer exists, the buffer `*scratch*' is returned.
1280If BUFFER is omitted or nil, some interesting buffer is returned. */) 1261If BUFFER is omitted or nil, some interesting buffer is returned. */)
1281 (buffer, visible_ok, frame) 1262 (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame)
1282 register Lisp_Object buffer, visible_ok, frame;
1283{ 1263{
1284 Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer); 1264 Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer);
1285 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons; 1265 register Lisp_Object tail, buf, notsogood, tem, pred, add_ons;
@@ -1350,8 +1330,7 @@ DEFUN ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo,
1350 0, 1, "", 1330 0, 1, "",
1351 doc: /* Start keeping undo information for buffer BUFFER. 1331 doc: /* Start keeping undo information for buffer BUFFER.
1352No argument or nil as argument means do this for the current buffer. */) 1332No argument or nil as argument means do this for the current buffer. */)
1353 (buffer) 1333 (register Lisp_Object buffer)
1354 register Lisp_Object buffer;
1355{ 1334{
1356 Lisp_Object real_buffer; 1335 Lisp_Object real_buffer;
1357 1336
@@ -1392,8 +1371,7 @@ is running.
1392 1371
1393Any processes that have this buffer as the `process-buffer' are killed 1372Any processes that have this buffer as the `process-buffer' are killed
1394with SIGHUP. */) 1373with SIGHUP. */)
1395 (buffer_or_name) 1374 (Lisp_Object buffer_or_name)
1396 Lisp_Object buffer_or_name;
1397{ 1375{
1398 Lisp_Object buffer; 1376 Lisp_Object buffer;
1399 register struct buffer *b; 1377 register struct buffer *b;
@@ -1682,8 +1660,7 @@ For the *scratch* buffer, use `initial-major-mode', otherwise choose a mode
1682according to `default-major-mode'. 1660according to `default-major-mode'.
1683Use this function before selecting the buffer, since it may need to inspect 1661Use this function before selecting the buffer, since it may need to inspect
1684the current buffer's major mode. */) 1662the current buffer's major mode. */)
1685 (buffer) 1663 (Lisp_Object buffer)
1686 Lisp_Object buffer;
1687{ 1664{
1688 int count; 1665 int count;
1689 Lisp_Object function; 1666 Lisp_Object function;
@@ -1770,8 +1747,7 @@ its buffer, use `pop-to-buffer' for displaying the buffer.
1770WARNING: This is NOT the way to work on another buffer temporarily 1747WARNING: This is NOT the way to work on another buffer temporarily
1771within a Lisp program! Use `set-buffer' instead. That avoids 1748within a Lisp program! Use `set-buffer' instead. That avoids
1772messing with the window-buffer correspondences. */) 1749messing with the window-buffer correspondences. */)
1773 (buffer_or_name, norecord) 1750 (Lisp_Object buffer_or_name, Lisp_Object norecord)
1774 Lisp_Object buffer_or_name, norecord;
1775{ 1751{
1776 if (EQ (buffer_or_name, Fwindow_buffer (selected_window))) 1752 if (EQ (buffer_or_name, Fwindow_buffer (selected_window)))
1777 { 1753 {
@@ -1800,7 +1776,7 @@ messing with the window-buffer correspondences. */)
1800 1776
1801DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, 1777DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0,
1802 doc: /* Return the current buffer as a Lisp object. */) 1778 doc: /* Return the current buffer as a Lisp object. */)
1803 () 1779 (void)
1804{ 1780{
1805 register Lisp_Object buf; 1781 register Lisp_Object buf;
1806 XSETBUFFER (buf, current_buffer); 1782 XSETBUFFER (buf, current_buffer);
@@ -1986,8 +1962,7 @@ also `save-excursion' when you want to make a buffer current
1986temporarily. This function does not display the buffer, so its effect 1962temporarily. This function does not display the buffer, so its effect
1987ends when the current command terminates. Use `switch-to-buffer' or 1963ends when the current command terminates. Use `switch-to-buffer' or
1988`pop-to-buffer' to switch buffers permanently. */) 1964`pop-to-buffer' to switch buffers permanently. */)
1989 (buffer_or_name) 1965 (register Lisp_Object buffer_or_name)
1990 register Lisp_Object buffer_or_name;
1991{ 1966{
1992 register Lisp_Object buffer; 1967 register Lisp_Object buffer;
1993 buffer = Fget_buffer (buffer_or_name); 1968 buffer = Fget_buffer (buffer_or_name);
@@ -2012,7 +1987,7 @@ set_buffer_if_live (Lisp_Object buffer)
2012DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, 1987DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
2013 Sbarf_if_buffer_read_only, 0, 0, 0, 1988 Sbarf_if_buffer_read_only, 0, 0, 0,
2014 doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) 1989 doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */)
2015 () 1990 (void)
2016{ 1991{
2017 if (!NILP (current_buffer->read_only) 1992 if (!NILP (current_buffer->read_only)
2018 && NILP (Vinhibit_read_only)) 1993 && NILP (Vinhibit_read_only))
@@ -2032,8 +2007,7 @@ from the selected window if it is displayed there. If the selected
2032window is dedicated to its buffer, delete that window if there are other 2007window is dedicated to its buffer, delete that window if there are other
2033windows on the same frame. If the selected window is the only window on 2008windows on the same frame. If the selected window is the only window on
2034its frame, iconify that frame. */) 2009its frame, iconify that frame. */)
2035 (buffer_or_name) 2010 (register Lisp_Object buffer_or_name)
2036 register Lisp_Object buffer_or_name;
2037{ 2011{
2038 Lisp_Object buffer; 2012 Lisp_Object buffer;
2039 2013
@@ -2087,7 +2061,7 @@ DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*",
2087 doc: /* Delete the entire contents of the current buffer. 2061 doc: /* Delete the entire contents of the current buffer.
2088Any narrowing restriction in effect (see `narrow-to-region') is removed, 2062Any narrowing restriction in effect (see `narrow-to-region') is removed,
2089so the buffer is truly empty after this. */) 2063so the buffer is truly empty after this. */)
2090 () 2064 (void)
2091{ 2065{
2092 Fwiden (); 2066 Fwiden ();
2093 2067
@@ -2161,8 +2135,7 @@ extern void r_alloc_reset_variable (POINTER_TYPE *, POINTER_TYPE *);
2161DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 2135DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2162 1, 1, 0, 2136 1, 1, 0,
2163 doc: /* Swap the text between current buffer and BUFFER. */) 2137 doc: /* Swap the text between current buffer and BUFFER. */)
2164 (buffer) 2138 (Lisp_Object buffer)
2165 Lisp_Object buffer;
2166{ 2139{
2167 struct buffer *other_buffer; 2140 struct buffer *other_buffer;
2168 CHECK_BUFFER (buffer); 2141 CHECK_BUFFER (buffer);
@@ -2300,8 +2273,7 @@ If FLAG is `to', this makes the buffer a multibyte buffer by changing
2300all eight-bit bytes to eight-bit characters. 2273all eight-bit bytes to eight-bit characters.
2301If the multibyte flag was really changed, undo information of the 2274If the multibyte flag was really changed, undo information of the
2302current buffer is cleared. */) 2275current buffer is cleared. */)
2303 (flag) 2276 (Lisp_Object flag)
2304 Lisp_Object flag;
2305{ 2277{
2306 struct Lisp_Marker *tail, *markers; 2278 struct Lisp_Marker *tail, *markers;
2307 struct buffer *other; 2279 struct buffer *other;
@@ -2599,7 +2571,7 @@ a non-nil `permanent-local' property are not eliminated by this function.
2599 2571
2600The first thing this function does is run 2572The first thing this function does is run
2601the normal hook `change-major-mode-hook'. */) 2573the normal hook `change-major-mode-hook'. */)
2602 () 2574 (void)
2603{ 2575{
2604 if (!NILP (Vrun_hooks)) 2576 if (!NILP (Vrun_hooks))
2605 call1 (Vrun_hooks, Qchange_major_mode_hook); 2577 call1 (Vrun_hooks, Qchange_major_mode_hook);
@@ -3700,8 +3672,7 @@ fix_overlays_before (struct buffer *bp, EMACS_INT prev, EMACS_INT pos)
3700 3672
3701DEFUN ("overlayp", Foverlayp, Soverlayp, 1, 1, 0, 3673DEFUN ("overlayp", Foverlayp, Soverlayp, 1, 1, 0,
3702 doc: /* Return t if OBJECT is an overlay. */) 3674 doc: /* Return t if OBJECT is an overlay. */)
3703 (object) 3675 (Lisp_Object object)
3704 Lisp_Object object;
3705{ 3676{
3706 return (OVERLAYP (object) ? Qt : Qnil); 3677 return (OVERLAYP (object) ? Qt : Qnil);
3707} 3678}
@@ -3716,9 +3687,7 @@ for the front of the overlay advance when text is inserted there
3716The fifth arg REAR-ADVANCE, if non-nil, makes the marker 3687The fifth arg REAR-ADVANCE, if non-nil, makes the marker
3717for the rear of the overlay advance when text is inserted there 3688for the rear of the overlay advance when text is inserted there
3718\(which means the text *is* included in the overlay). */) 3689\(which means the text *is* included in the overlay). */)
3719 (beg, end, buffer, front_advance, rear_advance) 3690 (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance)
3720 Lisp_Object beg, end, buffer;
3721 Lisp_Object front_advance, rear_advance;
3722{ 3691{
3723 Lisp_Object overlay; 3692 Lisp_Object overlay;
3724 struct buffer *b; 3693 struct buffer *b;
@@ -3838,8 +3807,7 @@ DEFUN ("move-overlay", Fmove_overlay, Smove_overlay, 3, 4, 0,
3838If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now. 3807If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.
3839If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current 3808If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current
3840buffer. */) 3809buffer. */)
3841 (overlay, beg, end, buffer) 3810 (Lisp_Object overlay, Lisp_Object beg, Lisp_Object end, Lisp_Object buffer)
3842 Lisp_Object overlay, beg, end, buffer;
3843{ 3811{
3844 struct buffer *b, *ob; 3812 struct buffer *b, *ob;
3845 Lisp_Object obuffer; 3813 Lisp_Object obuffer;
@@ -3948,8 +3916,7 @@ buffer. */)
3948 3916
3949DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, 3917DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0,
3950 doc: /* Delete the overlay OVERLAY from its buffer. */) 3918 doc: /* Delete the overlay OVERLAY from its buffer. */)
3951 (overlay) 3919 (Lisp_Object overlay)
3952 Lisp_Object overlay;
3953{ 3920{
3954 Lisp_Object buffer; 3921 Lisp_Object buffer;
3955 struct buffer *b; 3922 struct buffer *b;
@@ -3989,8 +3956,7 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0,
3989 3956
3990DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, 3957DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0,
3991 doc: /* Return the position at which OVERLAY starts. */) 3958 doc: /* Return the position at which OVERLAY starts. */)
3992 (overlay) 3959 (Lisp_Object overlay)
3993 Lisp_Object overlay;
3994{ 3960{
3995 CHECK_OVERLAY (overlay); 3961 CHECK_OVERLAY (overlay);
3996 3962
@@ -3999,8 +3965,7 @@ DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0,
3999 3965
4000DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, 3966DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0,
4001 doc: /* Return the position at which OVERLAY ends. */) 3967 doc: /* Return the position at which OVERLAY ends. */)
4002 (overlay) 3968 (Lisp_Object overlay)
4003 Lisp_Object overlay;
4004{ 3969{
4005 CHECK_OVERLAY (overlay); 3970 CHECK_OVERLAY (overlay);
4006 3971
@@ -4010,8 +3975,7 @@ DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0,
4010DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0, 3975DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0,
4011 doc: /* Return the buffer OVERLAY belongs to. 3976 doc: /* Return the buffer OVERLAY belongs to.
4012Return nil if OVERLAY has been deleted. */) 3977Return nil if OVERLAY has been deleted. */)
4013 (overlay) 3978 (Lisp_Object overlay)
4014 Lisp_Object overlay;
4015{ 3979{
4016 CHECK_OVERLAY (overlay); 3980 CHECK_OVERLAY (overlay);
4017 3981
@@ -4022,8 +3986,7 @@ DEFUN ("overlay-properties", Foverlay_properties, Soverlay_properties, 1, 1, 0,
4022 doc: /* Return a list of the properties on OVERLAY. 3986 doc: /* Return a list of the properties on OVERLAY.
4023This is a copy of OVERLAY's plist; modifying its conses has no effect on 3987This is a copy of OVERLAY's plist; modifying its conses has no effect on
4024OVERLAY. */) 3988OVERLAY. */)
4025 (overlay) 3989 (Lisp_Object overlay)
4026 Lisp_Object overlay;
4027{ 3990{
4028 CHECK_OVERLAY (overlay); 3991 CHECK_OVERLAY (overlay);
4029 3992
@@ -4033,8 +3996,7 @@ OVERLAY. */)
4033 3996
4034DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, 3997DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
4035 doc: /* Return a list of the overlays that contain the character at POS. */) 3998 doc: /* Return a list of the overlays that contain the character at POS. */)
4036 (pos) 3999 (Lisp_Object pos)
4037 Lisp_Object pos;
4038{ 4000{
4039 int noverlays; 4001 int noverlays;
4040 Lisp_Object *overlay_vec; 4002 Lisp_Object *overlay_vec;
@@ -4066,8 +4028,7 @@ and also contained within the specified region.
4066Empty overlays are included in the result if they are located at BEG, 4028Empty overlays are included in the result if they are located at BEG,
4067between BEG and END, or at END provided END denotes the position at the 4029between BEG and END, or at END provided END denotes the position at the
4068end of the buffer. */) 4030end of the buffer. */)
4069 (beg, end) 4031 (Lisp_Object beg, Lisp_Object end)
4070 Lisp_Object beg, end;
4071{ 4032{
4072 int noverlays; 4033 int noverlays;
4073 Lisp_Object *overlay_vec; 4034 Lisp_Object *overlay_vec;
@@ -4097,8 +4058,7 @@ DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change,
4097 doc: /* Return the next position after POS where an overlay starts or ends. 4058 doc: /* Return the next position after POS where an overlay starts or ends.
4098If there are no overlay boundaries from POS to (point-max), 4059If there are no overlay boundaries from POS to (point-max),
4099the value is (point-max). */) 4060the value is (point-max). */)
4100 (pos) 4061 (Lisp_Object pos)
4101 Lisp_Object pos;
4102{ 4062{
4103 int noverlays; 4063 int noverlays;
4104 EMACS_INT endpos; 4064 EMACS_INT endpos;
@@ -4139,8 +4099,7 @@ DEFUN ("previous-overlay-change", Fprevious_overlay_change,
4139 doc: /* Return the previous position before POS where an overlay starts or ends. 4099 doc: /* Return the previous position before POS where an overlay starts or ends.
4140If there are no overlay boundaries from (point-min) to POS, 4100If there are no overlay boundaries from (point-min) to POS,
4141the value is (point-min). */) 4101the value is (point-min). */)
4142 (pos) 4102 (Lisp_Object pos)
4143 Lisp_Object pos;
4144{ 4103{
4145 int noverlays; 4104 int noverlays;
4146 EMACS_INT prevpos; 4105 EMACS_INT prevpos;
@@ -4176,7 +4135,7 @@ the cdr has all the overlays after the overlay center.
4176Recentering overlays moves overlays between these lists. 4135Recentering overlays moves overlays between these lists.
4177The lists you get are copies, so that changing them has no effect. 4136The lists you get are copies, so that changing them has no effect.
4178However, the overlays you get are the real objects that the buffer uses. */) 4137However, the overlays you get are the real objects that the buffer uses. */)
4179 () 4138 (void)
4180{ 4139{
4181 struct Lisp_Overlay *ol; 4140 struct Lisp_Overlay *ol;
4182 Lisp_Object before = Qnil, after = Qnil, tmp; 4141 Lisp_Object before = Qnil, after = Qnil, tmp;
@@ -4197,8 +4156,7 @@ DEFUN ("overlay-recenter", Foverlay_recenter, Soverlay_recenter, 1, 1, 0,
4197 doc: /* Recenter the overlays of the current buffer around position POS. 4156 doc: /* Recenter the overlays of the current buffer around position POS.
4198That makes overlay lookup faster for positions near POS (but perhaps slower 4157That makes overlay lookup faster for positions near POS (but perhaps slower
4199for positions far away from POS). */) 4158for positions far away from POS). */)
4200 (pos) 4159 (Lisp_Object pos)
4201 Lisp_Object pos;
4202{ 4160{
4203 CHECK_NUMBER_COERCE_MARKER (pos); 4161 CHECK_NUMBER_COERCE_MARKER (pos);
4204 4162
@@ -4208,8 +4166,7 @@ for positions far away from POS). */)
4208 4166
4209DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, 4167DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0,
4210 doc: /* Get the property of overlay OVERLAY with property name PROP. */) 4168 doc: /* Get the property of overlay OVERLAY with property name PROP. */)
4211 (overlay, prop) 4169 (Lisp_Object overlay, Lisp_Object prop)
4212 Lisp_Object overlay, prop;
4213{ 4170{
4214 CHECK_OVERLAY (overlay); 4171 CHECK_OVERLAY (overlay);
4215 return lookup_char_property (XOVERLAY (overlay)->plist, prop, 0); 4172 return lookup_char_property (XOVERLAY (overlay)->plist, prop, 0);
@@ -4217,8 +4174,7 @@ DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0,
4217 4174
4218DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0, 4175DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0,
4219 doc: /* Set one property of overlay OVERLAY: give property PROP value VALUE. */) 4176 doc: /* Set one property of overlay OVERLAY: give property PROP value VALUE. */)
4220 (overlay, prop, value) 4177 (Lisp_Object overlay, Lisp_Object prop, Lisp_Object value)
4221 Lisp_Object overlay, prop, value;
4222{ 4178{
4223 Lisp_Object tail, buffer; 4179 Lisp_Object tail, buffer;
4224 int changed; 4180 int changed;