aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/undo.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.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/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/undo.c b/src/undo.c
index b678c5c58ba..2d491a41221 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -67,8 +67,7 @@ int undo_inhibit_record_point;
67 undo record that will be added just after this command terminates. */ 67 undo record that will be added just after this command terminates. */
68 68
69static void 69static void
70record_point (pt) 70record_point (int pt)
71 int pt;
72{ 71{
73 int at_boundary; 72 int at_boundary;
74 73
@@ -130,8 +129,7 @@ record_point (pt)
130 because we don't need to record the contents.) */ 129 because we don't need to record the contents.) */
131 130
132void 131void
133record_insert (beg, length) 132record_insert (int beg, int length)
134 int beg, length;
135{ 133{
136 Lisp_Object lbeg, lend; 134 Lisp_Object lbeg, lend;
137 135
@@ -166,9 +164,7 @@ record_insert (beg, length)
166 of the characters in STRING, at location BEG. */ 164 of the characters in STRING, at location BEG. */
167 165
168void 166void
169record_delete (beg, string) 167record_delete (int beg, Lisp_Object string)
170 int beg;
171 Lisp_Object string;
172{ 168{
173 Lisp_Object sbeg; 169 Lisp_Object sbeg;
174 170
@@ -196,9 +192,7 @@ record_delete (beg, string)
196 won't be inverted automatically by undoing the buffer modification. */ 192 won't be inverted automatically by undoing the buffer modification. */
197 193
198void 194void
199record_marker_adjustment (marker, adjustment) 195record_marker_adjustment (Lisp_Object marker, int adjustment)
200 Lisp_Object marker;
201 int adjustment;
202{ 196{
203 if (EQ (current_buffer->undo_list, Qt)) 197 if (EQ (current_buffer->undo_list, Qt))
204 return; 198 return;
@@ -221,8 +215,7 @@ record_marker_adjustment (marker, adjustment)
221 The replacement must not change the number of characters. */ 215 The replacement must not change the number of characters. */
222 216
223void 217void
224record_change (beg, length) 218record_change (int beg, int length)
225 int beg, length;
226{ 219{
227 record_delete (beg, make_buffer_string (beg, beg + length, 1)); 220 record_delete (beg, make_buffer_string (beg, beg + length, 1));
228 record_insert (beg, length); 221 record_insert (beg, length);
@@ -233,7 +226,7 @@ record_change (beg, length)
233 we can tell whether it is obsolete because the file was saved again. */ 226 we can tell whether it is obsolete because the file was saved again. */
234 227
235void 228void
236record_first_change () 229record_first_change (void)
237{ 230{
238 Lisp_Object high, low; 231 Lisp_Object high, low;
239 struct buffer *base_buffer = current_buffer; 232 struct buffer *base_buffer = current_buffer;
@@ -257,9 +250,7 @@ record_first_change ()
257 for LENGTH characters starting at position BEG in BUFFER. */ 250 for LENGTH characters starting at position BEG in BUFFER. */
258 251
259void 252void
260record_property_change (beg, length, prop, value, buffer) 253record_property_change (int beg, int length, Lisp_Object prop, Lisp_Object value, Lisp_Object buffer)
261 int beg, length;
262 Lisp_Object prop, value, buffer;
263{ 254{
264 Lisp_Object lbeg, lend, entry; 255 Lisp_Object lbeg, lend, entry;
265 struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer); 256 struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
@@ -328,8 +319,7 @@ but another undo command will undo to the previous boundary. */)
328 In some cases this works by calling undo-outer-limit-function. */ 319 In some cases this works by calling undo-outer-limit-function. */
329 320
330void 321void
331truncate_undo_list (b) 322truncate_undo_list (struct buffer *b)
332 struct buffer *b;
333{ 323{
334 Lisp_Object list; 324 Lisp_Object list;
335 Lisp_Object prev, next, last_boundary; 325 Lisp_Object prev, next, last_boundary;
@@ -665,7 +655,7 @@ Return what remains of the list. */)
665} 655}
666 656
667void 657void
668syms_of_undo () 658syms_of_undo (void)
669{ 659{
670 Qinhibit_read_only = intern_c_string ("inhibit-read-only"); 660 Qinhibit_read_only = intern_c_string ("inhibit-read-only");
671 staticpro (&Qinhibit_read_only); 661 staticpro (&Qinhibit_read_only);