emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fileio.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c
Date: Thu, 23 May 2002 11:22:48 -0400

Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.443 emacs/src/fileio.c:1.444
*** emacs/src/fileio.c:1.443    Sat Apr 13 13:49:28 2002
--- emacs/src/fileio.c  Thu May 23 11:22:47 2002
***************
*** 3532,3538 ****
    immediate_quit = 1;
    QUIT;
    nbytes = emacs_read (non_regular_fd,
!                      BEG_ADDR + PT_BYTE - 1 + non_regular_inserted,
                       non_regular_nbytes);
    immediate_quit = 0;
    return make_number (nbytes);
--- 3532,3538 ----
    immediate_quit = 1;
    QUIT;
    nbytes = emacs_read (non_regular_fd,
!                      BEG_ADDR + PT_BYTE - BEG_BYTE + non_regular_inserted,
                       non_regular_nbytes);
    immediate_quit = 0;
    return make_number (nbytes);
***************
*** 4321,4327 ****
               here doesn't do any harm.  */
            immediate_quit = 1;
            QUIT;
!           this = emacs_read (fd, BEG_ADDR + PT_BYTE - 1 + inserted, trytry);
            immediate_quit = 0;
          }
        
--- 4321,4327 ----
               here doesn't do any harm.  */
            immediate_quit = 1;
            QUIT;
!           this = emacs_read (fd, BEG_ADDR + PT_BYTE - BEG_BYTE + inserted, 
trytry);
            immediate_quit = 0;
          }
        
***************
*** 4550,4565 ****
      }
  
    p = Vafter_insert_file_functions;
!   while (!NILP (p))
      {
!       insval = call1 (Fcar (p), make_number (inserted));
        if (!NILP (insval))
        {
          CHECK_NUMBER (insval);
          inserted = XFASTINT (insval);
        }
        QUIT;
!       p = Fcdr (p);
      }
  
    if (!NILP (visit)
--- 4550,4565 ----
      }
  
    p = Vafter_insert_file_functions;
!   while (CONSP (p))
      {
!       insval = call1 (XCAR (p), make_number (inserted));
        if (!NILP (insval))
        {
          CHECK_NUMBER (insval);
          inserted = XFASTINT (insval);
        }
        QUIT;
!       p = XCDR (p);
      }
  
    if (!NILP (visit)
***************
*** 5166,5176 ****
    annotations = Qnil;
    p = Vwrite_region_annotate_functions;
    GCPRO2 (annotations, p);
!   while (!NILP (p))
      {
        struct buffer *given_buffer = current_buffer;
        Vwrite_region_annotations_so_far = annotations;
!       res = call2 (Fcar (p), start, end);
        /* If the function makes a different buffer current,
         assume that means this buffer contains altered text to be output.
         Reset START and END from the buffer bounds
--- 5166,5176 ----
    annotations = Qnil;
    p = Vwrite_region_annotate_functions;
    GCPRO2 (annotations, p);
!   while (CONSP (p))
      {
        struct buffer *given_buffer = current_buffer;
        Vwrite_region_annotations_so_far = annotations;
!       res = call2 (XCAR (p), start, end);
        /* If the function makes a different buffer current,
         assume that means this buffer contains altered text to be output.
         Reset START and END from the buffer bounds
***************
*** 5184,5190 ****
        }
        Flength (res);   /* Check basic validity of return value */
        annotations = merge (annotations, res, Qcar_less_than_car);
!       p = Fcdr (p);
      }
  
    /* Now do the same for annotation functions implied by the file-format */
--- 5184,5190 ----
        }
        Flength (res);   /* Check basic validity of return value */
        annotations = merge (annotations, res, Qcar_less_than_car);
!       p = XCDR (p);
      }
  
    /* Now do the same for annotation functions implied by the file-format */
***************
*** 5192,5198 ****
      p = Vauto_save_file_format;
    else
      p = current_buffer->file_format;
!   for (i = 0; !NILP (p); p = Fcdr (p), ++i)
      {
        struct buffer *given_buffer = current_buffer;
        
--- 5192,5198 ----
      p = Vauto_save_file_format;
    else
      p = current_buffer->file_format;
!   for (i = 0; CONSP (p); p = XCDR (p), ++i)
      {
        struct buffer *given_buffer = current_buffer;
        
***************
*** 5201,5207 ****
        /* Value is either a list of annotations or nil if the function
           has written annotations to a temporary buffer, which is now
           current.  */
!       res = call5 (Qformat_annotate_function, Fcar (p), start, end,
                   original_buffer, make_number (i));
        if (current_buffer != given_buffer)
        {
--- 5201,5207 ----
        /* Value is either a list of annotations or nil if the function
           has written annotations to a temporary buffer, which is now
           current.  */
!       res = call5 (Qformat_annotate_function, XCAR (p), start, end,
                   original_buffer, make_number (i));
        if (current_buffer != given_buffer)
        {
***************
*** 6287,6293 ****
  inserted at the specified positions of the file being written (1 means to
  insert before the first byte written).  The POSITIONs must be sorted into
  increasing order.  If there are several functions in the list, the several
! lists are merged destructively.  */);
    Vwrite_region_annotate_functions = Qnil;
  
    DEFVAR_LISP ("write-region-annotations-so-far",
--- 6287,6294 ----
  inserted at the specified positions of the file being written (1 means to
  insert before the first byte written).  The POSITIONs must be sorted into
  increasing order.  If there are several functions in the list, the several
! lists are merged destructively.  Alternatively, the function can return
! with a different buffer current and value nil.*/);
    Vwrite_region_annotate_functions = Qnil;
  
    DEFVAR_LISP ("write-region-annotations-so-far",



reply via email to

[Prev in Thread] Current Thread [Next in Thread]