* buffer.c (Fprevious_overlay_change): Remove var that is set
[bpt/emacs.git] / src / buffer.c
index b718bf3..a0054e3 100644 (file)
@@ -611,8 +611,8 @@ CLONE nil means the indirect buffer's state is reset to default values.  */)
   /* Make sure the base buffer has markers for its narrowing.  */
   if (NILP (BVAR (b->base_buffer, pt_marker)))
     {
-      eassert (NILP (BVAR (b, begv_marker)));
-      eassert (NILP (BVAR (b, zv_marker)));
+      eassert (NILP (BVAR (b->base_buffer, begv_marker)));
+      eassert (NILP (BVAR (b->base_buffer, zv_marker)));
 
       BVAR (b->base_buffer, pt_marker) = Fmake_marker ();
       set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer,
@@ -2520,8 +2520,7 @@ The first thing this function does is run
 the normal hook `change-major-mode-hook'.  */)
   (void)
 {
-  if (!NILP (Vrun_hooks))
-    call1 (Vrun_hooks, Qchange_major_mode_hook);
+  Frun_hooks (1, &Qchange_major_mode_hook);
 
   /* Make sure none of the bindings in local_var_alist
      remain swapped in, in their symbols.  */
@@ -4048,7 +4047,6 @@ If there are no overlay boundaries from (point-min) to POS,
 the value is (point-min).  */)
   (Lisp_Object pos)
 {
-  int noverlays;
   EMACS_INT prevpos;
   Lisp_Object *overlay_vec;
   int len;
@@ -4066,8 +4064,8 @@ the value is (point-min).  */)
   /* Put all the overlays we want in a vector in overlay_vec.
      Store the length in len.
      prevpos gets the position of the previous change.  */
-  noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
-                          (EMACS_INT *) 0, &prevpos, 1);
+  overlays_at (XINT (pos), 1, &overlay_vec, &len,
+              (EMACS_INT *) 0, &prevpos, 1);
 
   xfree (overlay_vec);
   return make_number (prevpos);
@@ -5225,12 +5223,12 @@ init_buffer (void)
 #define DEFVAR_PER_BUFFER(lname, vname, type, doc)                     \
   do {                                                                 \
     static struct Lisp_Buffer_Objfwd bo_fwd;                           \
-    defvar_per_buffer (&bo_fwd, lname, vname, type, 0);                        \
+    defvar_per_buffer (&bo_fwd, lname, vname, type);                   \
   } while (0)
 
 static void
 defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
-                  Lisp_Object *address, Lisp_Object type, char *doc)
+                  Lisp_Object *address, Lisp_Object type)
 {
   struct Lisp_Symbol *sym;
   int offset;
@@ -5241,6 +5239,7 @@ defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
   bo_fwd->type = Lisp_Fwd_Buffer_Obj;
   bo_fwd->offset = offset;
   bo_fwd->slottype = type;
+  sym->declared_special = 1;
   sym->redirect = SYMBOL_FORWARDED;
   {
     /* I tried to do the job without a cast, but it seems impossible.