diff options
| author | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
| commit | 5842a27bbfb7efa6872824e501bc7ec98b631553 (patch) | |
| tree | d173899af9cbed9d90d94cfc710e6ecc06dd1f6b /src/buffer.c | |
| parent | 71c44c04bb996abe77db8efd88255fde06532b10 (diff) | |
| download | emacs-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.c | 138 |
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) | |||
| 190 | DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, | 190 | DEFUN ("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. |
| 192 | Value is nil if OBJECT is not a buffer or if it has been killed. */) | 192 | Value 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, | |||
| 202 | If the optional arg FRAME is a frame, we return the buffer list | 201 | If the optional arg FRAME is a frame, we return the buffer list |
| 203 | in the proper order for that frame: the buffers in FRAME's `buffer-list' | 202 | in the proper order for that frame: the buffers in FRAME's `buffer-list' |
| 204 | frame parameter come first, followed by the rest of the buffers. */) | 203 | frame 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, | |||
| 266 | BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME | 264 | BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME |
| 267 | is a string and there is no buffer with that name, return nil. If | 265 | is a string and there is no buffer with that name, return nil. If |
| 268 | BUFFER-OR-NAME is a buffer, return it as given. */) | 266 | BUFFER-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, | |||
| 281 | The buffer's `buffer-file-name' must match exactly the expansion of FILENAME. | 278 | The buffer's `buffer-file-name' must match exactly the expansion of FILENAME. |
| 282 | If there is no such live buffer, return nil. | 279 | If there is no such live buffer, return nil. |
| 283 | See also `find-buffer-visiting'. */) | 280 | See 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 | ||
| 338 | If BUFFER-OR-NAME is a buffer instead of a string, return it as given, | 334 | If BUFFER-OR-NAME is a buffer instead of a string, return it as given, |
| 339 | even if it is dead. The return value is never nil. */) | 335 | even 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. | |||
| 533 | Optional argument CLONE non-nil means preserve BASE-BUFFER's state, | 528 | Optional argument CLONE non-nil means preserve BASE-BUFFER's state, |
| 534 | such as major and minor modes, in the indirect buffer. | 529 | such as major and minor modes, in the indirect buffer. |
| 535 | CLONE nil means the indirect buffer's state is reset to default values. */) | 530 | CLONE 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. |
| 830 | Optional second argument IGNORE specifies a name that is okay to use (if | 824 | Optional second argument IGNORE specifies a name that is okay to use (if |
| 831 | it is in the sequence to be tried) even if a buffer with that name exists. */) | 825 | it 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. |
| 865 | BUFFER defaults to the current buffer. | 858 | BUFFER defaults to the current buffer. |
| 866 | Return nil if BUFFER has been killed. */) | 859 | Return 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. */) | |||
| 876 | DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, | 868 | DEFUN ("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. |
| 878 | No argument or nil as argument means use the current buffer. */) | 870 | No 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. |
| 891 | If BUFFER is not indirect, return nil. | 882 | If BUFFER is not indirect, return nil. |
| 892 | BUFFER defaults to the current buffer. */) | 883 | BUFFER 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. |
| 916 | If VARIABLE does not have a buffer-local binding in BUFFER, the value | 906 | If VARIABLE does not have a buffer-local binding in BUFFER, the value |
| 917 | is the default binding of the variable. */) | 907 | is 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. | |||
| 1015 | For a symbol that is locally unbound, just the symbol appears in the value. | 1003 | For a symbol that is locally unbound, just the symbol appears in the value. |
| 1016 | Note that storing new VALUEs in these elements doesn't change the variables. | 1004 | Note that storing new VALUEs in these elements doesn't change the variables. |
| 1017 | No argument or nil as argument means use current buffer as BUFFER. */) | 1005 | No 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. |
| 1060 | No argument or nil as argument means use current buffer as BUFFER. */) | 1047 | No 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. |
| 1079 | A non-nil FLAG means mark the buffer modified. */) | 1065 | A 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. |
| 1148 | It is not ensured that mode lines will be updated to show the modified | 1133 | It is not ensured that mode lines will be updated to show the modified |
| 1149 | state of the current buffer. Use with care. */) | 1134 | state 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, | |||
| 1178 | Each buffer has a tick counter which is incremented each time the | 1162 | Each buffer has a tick counter which is incremented each time the |
| 1179 | text in that buffer is changed. It wraps around occasionally. | 1163 | text in that buffer is changed. It wraps around occasionally. |
| 1180 | No argument or nil as argument means use current buffer as BUFFER. */) | 1164 | No 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', | |||
| 1203 | you can tell whether a character change occurred in that buffer in | 1186 | you can tell whether a character change occurred in that buffer in |
| 1204 | between these calls. No argument or nil as argument means use current | 1187 | between these calls. No argument or nil as argument means use current |
| 1205 | buffer as BUFFER. */) | 1188 | buffer 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 | |||
| 1230 | Interactively, you can set UNIQUE with a prefix argument. | 1212 | Interactively, you can set UNIQUE with a prefix argument. |
| 1231 | We return the name we actually gave the buffer. | 1213 | We return the name we actually gave the buffer. |
| 1232 | This does not change the name of the visited file (if any). */) | 1214 | This 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 | |||
| 1278 | buffer list instead of the selected frame's buffer list. | 1259 | buffer list instead of the selected frame's buffer list. |
| 1279 | If no other buffer exists, the buffer `*scratch*' is returned. | 1260 | If no other buffer exists, the buffer `*scratch*' is returned. |
| 1280 | If BUFFER is omitted or nil, some interesting buffer is returned. */) | 1261 | If 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. |
| 1352 | No argument or nil as argument means do this for the current buffer. */) | 1332 | No 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 | ||
| 1393 | Any processes that have this buffer as the `process-buffer' are killed | 1372 | Any processes that have this buffer as the `process-buffer' are killed |
| 1394 | with SIGHUP. */) | 1373 | with 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 | |||
| 1682 | according to `default-major-mode'. | 1660 | according to `default-major-mode'. |
| 1683 | Use this function before selecting the buffer, since it may need to inspect | 1661 | Use this function before selecting the buffer, since it may need to inspect |
| 1684 | the current buffer's major mode. */) | 1662 | the 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. | |||
| 1770 | WARNING: This is NOT the way to work on another buffer temporarily | 1747 | WARNING: This is NOT the way to work on another buffer temporarily |
| 1771 | within a Lisp program! Use `set-buffer' instead. That avoids | 1748 | within a Lisp program! Use `set-buffer' instead. That avoids |
| 1772 | messing with the window-buffer correspondences. */) | 1749 | messing 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 | ||
| 1801 | DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, | 1777 | DEFUN ("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 | |||
| 1986 | temporarily. This function does not display the buffer, so its effect | 1962 | temporarily. This function does not display the buffer, so its effect |
| 1987 | ends when the current command terminates. Use `switch-to-buffer' or | 1963 | ends 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) | |||
| 2012 | DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, | 1987 | DEFUN ("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 | |||
| 2032 | window is dedicated to its buffer, delete that window if there are other | 2007 | window is dedicated to its buffer, delete that window if there are other |
| 2033 | windows on the same frame. If the selected window is the only window on | 2008 | windows on the same frame. If the selected window is the only window on |
| 2034 | its frame, iconify that frame. */) | 2009 | its 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. |
| 2088 | Any narrowing restriction in effect (see `narrow-to-region') is removed, | 2062 | Any narrowing restriction in effect (see `narrow-to-region') is removed, |
| 2089 | so the buffer is truly empty after this. */) | 2063 | so 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 *); | |||
| 2161 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | 2135 | DEFUN ("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 | |||
| 2300 | all eight-bit bytes to eight-bit characters. | 2273 | all eight-bit bytes to eight-bit characters. |
| 2301 | If the multibyte flag was really changed, undo information of the | 2274 | If the multibyte flag was really changed, undo information of the |
| 2302 | current buffer is cleared. */) | 2275 | current 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 | ||
| 2600 | The first thing this function does is run | 2572 | The first thing this function does is run |
| 2601 | the normal hook `change-major-mode-hook'. */) | 2573 | the 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 | ||
| 3701 | DEFUN ("overlayp", Foverlayp, Soverlayp, 1, 1, 0, | 3673 | DEFUN ("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 | |||
| 3716 | The fifth arg REAR-ADVANCE, if non-nil, makes the marker | 3687 | The fifth arg REAR-ADVANCE, if non-nil, makes the marker |
| 3717 | for the rear of the overlay advance when text is inserted there | 3688 | for 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, | |||
| 3838 | If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now. | 3807 | If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now. |
| 3839 | If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current | 3808 | If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current |
| 3840 | buffer. */) | 3809 | buffer. */) |
| 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 | ||
| 3949 | DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, | 3917 | DEFUN ("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 | ||
| 3990 | DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, | 3957 | DEFUN ("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 | ||
| 4000 | DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, | 3966 | DEFUN ("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, | |||
| 4010 | DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0, | 3975 | DEFUN ("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. |
| 4012 | Return nil if OVERLAY has been deleted. */) | 3977 | Return 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. |
| 4023 | This is a copy of OVERLAY's plist; modifying its conses has no effect on | 3987 | This is a copy of OVERLAY's plist; modifying its conses has no effect on |
| 4024 | OVERLAY. */) | 3988 | OVERLAY. */) |
| 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 | ||
| 4034 | DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0, | 3997 | DEFUN ("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. | |||
| 4066 | Empty overlays are included in the result if they are located at BEG, | 4028 | Empty overlays are included in the result if they are located at BEG, |
| 4067 | between BEG and END, or at END provided END denotes the position at the | 4029 | between BEG and END, or at END provided END denotes the position at the |
| 4068 | end of the buffer. */) | 4030 | end 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. |
| 4098 | If there are no overlay boundaries from POS to (point-max), | 4059 | If there are no overlay boundaries from POS to (point-max), |
| 4099 | the value is (point-max). */) | 4060 | the 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. |
| 4140 | If there are no overlay boundaries from (point-min) to POS, | 4100 | If there are no overlay boundaries from (point-min) to POS, |
| 4141 | the value is (point-min). */) | 4101 | the 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. | |||
| 4176 | Recentering overlays moves overlays between these lists. | 4135 | Recentering overlays moves overlays between these lists. |
| 4177 | The lists you get are copies, so that changing them has no effect. | 4136 | The lists you get are copies, so that changing them has no effect. |
| 4178 | However, the overlays you get are the real objects that the buffer uses. */) | 4137 | However, 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. |
| 4198 | That makes overlay lookup faster for positions near POS (but perhaps slower | 4157 | That makes overlay lookup faster for positions near POS (but perhaps slower |
| 4199 | for positions far away from POS). */) | 4158 | for 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 | ||
| 4209 | DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, | 4167 | DEFUN ("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 | ||
| 4218 | DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0, | 4175 | DEFUN ("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; |