New branch for lexbind, losing all history.
[bpt/emacs.git] / src / buffer.c
index 9932c64..e907c29 100644 (file)
@@ -1300,6 +1300,8 @@ If BUFFER is omitted or nil, some interesting buffer is returned.  */)
   if (NILP (frame))
     frame = selected_frame;
 
+  CHECK_FRAME (frame);
+
   tail = Vbuffer_alist;
   pred = frame_buffer_predicate (frame);
 
@@ -1785,8 +1787,6 @@ messing with the window-buffer correspondences.  */)
      (buffer_or_name, norecord)
      Lisp_Object buffer_or_name, norecord;
 {
-  char *err;
-
   if (EQ (buffer_or_name, Fwindow_buffer (selected_window)))
     {
       /* Basically a NOP.  Avoid signalling an error in the case where
@@ -2189,7 +2189,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
   other_buffer = XBUFFER (buffer);
 
   if (NILP (other_buffer->name))
-    error ("Cannot swap a dead buffer's text");    
+    error ("Cannot swap a dead buffer's text");
 
   /* Actually, it probably works just fine.
    * if (other_buffer == current_buffer)
@@ -2436,7 +2436,7 @@ current buffer is cleared.  */)
          unsigned char *p = GPT_ADDR - 1;
 
          while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--;
-         if (BASE_LEADING_CODE_P (*p))
+         if (LEADING_CODE_P (*p))
            {
              int new_gpt = GPT_BYTE - (GPT_ADDR - p);
 
@@ -4339,7 +4339,7 @@ add_overlay_mod_hooklist (functionlist, overlay)
   int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
 
   if (last_overlay_modification_hooks_used == oldsize)
-    last_overlay_modification_hooks = larger_vector 
+    last_overlay_modification_hooks = larger_vector
       (last_overlay_modification_hooks, oldsize * 2, Qnil);
   ASET (last_overlay_modification_hooks, last_overlay_modification_hooks_used,
        functionlist); last_overlay_modification_hooks_used++;
@@ -5175,7 +5175,6 @@ init_buffer_once ()
   buffer_defaults.word_wrap = Qnil;
   buffer_defaults.ctl_arrow = Qt;
   buffer_defaults.bidi_display_reordering = Qnil;
-  buffer_defaults.direction_reversed = Qnil;
   buffer_defaults.bidi_paragraph_direction = Qnil;
   buffer_defaults.cursor_type = Qt;
   buffer_defaults.extra_line_spacing = Qnil;
@@ -5262,7 +5261,6 @@ init_buffer_once ()
   XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx;
   XSETFASTINT (buffer_local_flags.category_table, idx); ++idx;
   XSETFASTINT (buffer_local_flags.bidi_display_reordering, idx); ++idx;
-  XSETFASTINT (buffer_local_flags.direction_reversed, idx); ++idx;
   XSETFASTINT (buffer_local_flags.bidi_paragraph_direction, idx); ++idx;
   XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx);
   /* Make this one a permanent local.  */
@@ -5420,6 +5418,7 @@ defvar_per_buffer (bo_fwd, namestring, address, type, doc)
   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.
@@ -5784,25 +5783,19 @@ The variable `coding-system-for-write', if non-nil, overrides this variable.
 
 This variable is never applied to a way of decoding a file while reading it.  */);
 
-  DEFVAR_PER_BUFFER ("direction-reversed",
-                    &current_buffer->direction_reversed, Qnil,
-                    doc: /* Non-nil means set beginning of lines at the right edge of the window.
-See also the variable `bidi-display-reordering'.  */);
-
   DEFVAR_PER_BUFFER ("bidi-display-reordering",
                     &current_buffer->bidi_display_reordering, Qnil,
-                    doc: /* Non-nil means reorder bidirectional text for display in the visual order.
-See also the variable `direction-reversed'.  */);
+                    doc: /* Non-nil means reorder bidirectional text for display in the visual order.  */);
 
   DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
                     &current_buffer->bidi_paragraph_direction, Qnil,
                     doc: /* *If non-nil, forces directionality of text paragraphs in the buffer.
-                            
+
 If this is nil (the default), the direction of each paragraph is
 determined by the first strong directional character of its text.
 The values of `right-to-left' and `left-to-right' override that.
 Any other value is treated as nil.
-                            
+
 This variable has no effect unless the buffer's value of
 \`bidi-display-reordering' is non-nil.  */);