aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-04 10:34:54 -0700
committerPaul Eggert2012-09-04 10:34:54 -0700
commit1088b9226e7dac7314dab52ef0696a5f540900cd (patch)
treebfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/buffer.c
parent30934d334e8a67c8992d910428758d5b93e0f04f (diff)
downloademacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz
emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.zip
Simplify redefinition of 'abort' (Bug#12316).
Do not try to redefine the 'abort' function. Instead, redo the code so that it calls 'emacs_abort' rather than 'abort'. This removes the need for the NO_ABORT configure-time macro and makes it easier to change the abort code to do a backtrace. * configure.ac (NO_ABRT): Remove. * admin/CPP-DEFINES (NO_ABORT): Remove. * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove. * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort. * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]: Remove; sysdep.c's emacs_abort now takes its place. * src/lisp.h (emacs_abort): New decl. All calls from Emacs code to 'abort' changed to use 'emacs_abort'. * src/msdos.c (dos_abort) [defined abort]: Remove; not used. (abort) [!defined abort]: Rename to ... (emacs_abort): ... new name. * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking the place of the old 'abort' in emacs.c. * src/w32.c, src/w32fns.c (abort): Do not #undef. * src/w32.c (emacs_abort): Rename from w32_abort.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c
index f4d38e50a47..7698b72a3c6 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1242,7 +1242,7 @@ buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer)
1242 result = Fdefault_value (variable); 1242 result = Fdefault_value (variable);
1243 break; 1243 break;
1244 } 1244 }
1245 default: abort (); 1245 default: emacs_abort ();
1246 } 1246 }
1247 1247
1248 return result; 1248 return result;
@@ -2671,7 +2671,7 @@ current buffer is cleared. */)
2671 /* Make sure no markers were put on the chain 2671 /* Make sure no markers were put on the chain
2672 while the chain value was incorrect. */ 2672 while the chain value was incorrect. */
2673 if (BUF_MARKERS (current_buffer)) 2673 if (BUF_MARKERS (current_buffer))
2674 abort (); 2674 emacs_abort ();
2675 2675
2676 BUF_MARKERS (current_buffer) = markers; 2676 BUF_MARKERS (current_buffer) = markers;
2677 2677
@@ -3413,7 +3413,7 @@ overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr)
3413 } 3413 }
3414 } 3414 }
3415 if (p != overlay_str_buf + total) 3415 if (p != overlay_str_buf + total)
3416 abort (); 3416 emacs_abort ();
3417 if (pstr) 3417 if (pstr)
3418 *pstr = overlay_str_buf; 3418 *pstr = overlay_str_buf;
3419 return total; 3419 return total;
@@ -4596,7 +4596,7 @@ buffer_slot_type_mismatch (Lisp_Object newval, int type)
4596 case_Lisp_Int: predicate = Qintegerp; break; 4596 case_Lisp_Int: predicate = Qintegerp; break;
4597 case Lisp_String: predicate = Qstringp; break; 4597 case Lisp_String: predicate = Qstringp; break;
4598 case Lisp_Symbol: predicate = Qsymbolp; break; 4598 case Lisp_Symbol: predicate = Qsymbolp; break;
4599 default: abort (); 4599 default: emacs_abort ();
4600 } 4600 }
4601 4601
4602 wrong_type_argument (predicate, newval); 4602 wrong_type_argument (predicate, newval);
@@ -5277,7 +5277,7 @@ init_buffer_once (void)
5277 5277
5278 /* Need more room? */ 5278 /* Need more room? */
5279 if (idx >= MAX_PER_BUFFER_VARS) 5279 if (idx >= MAX_PER_BUFFER_VARS)
5280 abort (); 5280 emacs_abort ();
5281 last_per_buffer_idx = idx; 5281 last_per_buffer_idx = idx;
5282 5282
5283 Vbuffer_alist = Qnil; 5283 Vbuffer_alist = Qnil;
@@ -5418,7 +5418,7 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
5418 if (PER_BUFFER_IDX (offset) == 0) 5418 if (PER_BUFFER_IDX (offset) == 0)
5419 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding 5419 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding
5420 slot of buffer_local_flags */ 5420 slot of buffer_local_flags */
5421 abort (); 5421 emacs_abort ();
5422} 5422}
5423 5423
5424 5424