diff options
| author | Joakim Verona | 2010-08-27 10:58:44 +0200 |
|---|---|---|
| committer | Joakim Verona | 2010-08-27 10:58:44 +0200 |
| commit | 362120833bcbbaea94976b6701633e2ed75f6051 (patch) | |
| tree | 632690a24a934bb51a32303add5172d63b6b9e00 /src/undo.c | |
| parent | 1800c4865b15a9e1154bf1f03d87d1aaf750a527 (diff) | |
| parent | 1a868076f51b5d6f1cf78117463e6f9c614551ec (diff) | |
| download | emacs-362120833bcbbaea94976b6701633e2ed75f6051.tar.gz emacs-362120833bcbbaea94976b6701633e2ed75f6051.zip | |
merge from trunk, fix conflicts
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/undo.c b/src/undo.c index b678c5c58ba..14a8268394a 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 | ||
| 69 | static void | 69 | static void |
| 70 | record_point (pt) | 70 | record_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 | ||
| 132 | void | 131 | void |
| 133 | record_insert (beg, length) | 132 | record_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 | ||
| 168 | void | 166 | void |
| 169 | record_delete (beg, string) | 167 | record_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 | ||
| 198 | void | 194 | void |
| 199 | record_marker_adjustment (marker, adjustment) | 195 | record_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 | ||
| 223 | void | 217 | void |
| 224 | record_change (beg, length) | 218 | record_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 | ||
| 235 | void | 228 | void |
| 236 | record_first_change () | 229 | record_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 | ||
| 259 | void | 252 | void |
| 260 | record_property_change (beg, length, prop, value, buffer) | 253 | record_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); |
| @@ -297,7 +288,7 @@ DEFUN ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, | |||
| 297 | doc: /* Mark a boundary between units of undo. | 288 | doc: /* Mark a boundary between units of undo. |
| 298 | An undo command will stop at this point, | 289 | An undo command will stop at this point, |
| 299 | but another undo command will undo to the previous boundary. */) | 290 | but another undo command will undo to the previous boundary. */) |
| 300 | () | 291 | (void) |
| 301 | { | 292 | { |
| 302 | Lisp_Object tem; | 293 | Lisp_Object tem; |
| 303 | if (EQ (current_buffer->undo_list, Qt)) | 294 | if (EQ (current_buffer->undo_list, Qt)) |
| @@ -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 | ||
| 330 | void | 321 | void |
| 331 | truncate_undo_list (b) | 322 | truncate_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; |
| @@ -465,8 +455,7 @@ truncate_undo_list (b) | |||
| 465 | DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, | 455 | DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, |
| 466 | doc: /* Undo N records from the front of the list LIST. | 456 | doc: /* Undo N records from the front of the list LIST. |
| 467 | Return what remains of the list. */) | 457 | Return what remains of the list. */) |
| 468 | (n, list) | 458 | (Lisp_Object n, Lisp_Object list) |
| 469 | Lisp_Object n, list; | ||
| 470 | { | 459 | { |
| 471 | struct gcpro gcpro1, gcpro2; | 460 | struct gcpro gcpro1, gcpro2; |
| 472 | Lisp_Object next; | 461 | Lisp_Object next; |
| @@ -665,7 +654,7 @@ Return what remains of the list. */) | |||
| 665 | } | 654 | } |
| 666 | 655 | ||
| 667 | void | 656 | void |
| 668 | syms_of_undo () | 657 | syms_of_undo (void) |
| 669 | { | 658 | { |
| 670 | Qinhibit_read_only = intern_c_string ("inhibit-read-only"); | 659 | Qinhibit_read_only = intern_c_string ("inhibit-read-only"); |
| 671 | staticpro (&Qinhibit_read_only); | 660 | staticpro (&Qinhibit_read_only); |