/[emacs]/emacs/src/fileio.c
ViewVC logotype

Diff of /emacs/src/fileio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.425 by monnier, Fri Nov 16 14:49:20 2001 UTC revision 1.426 by monnier, Sat Nov 17 01:24:01 2001 UTC
# Line 4511  actually used.  */) Line 4511  actually used.  */)
4511    RETURN_UNGCPRO (unbind_to (count, val));    RETURN_UNGCPRO (unbind_to (count, val));
4512  }  }
4513    
4514  static Lisp_Object build_annotations P_ ((Lisp_Object, Lisp_Object,  static Lisp_Object build_annotations P_ ((Lisp_Object, Lisp_Object));
4515                                            Lisp_Object));  static Lisp_Object build_annotations_2 P_ ((Lisp_Object, Lisp_Object,
4516                                                Lisp_Object, Lisp_Object));
4517    
4518  /* If build_annotations switched buffers, switch back to BUF.  /* If build_annotations switched buffers, switch back to BUF.
4519     Kill the temporary buffer that was selected in the meantime.     Kill the temporary buffer that was selected in the meantime.
# Line 4705  This does code conversion according to t Line 4706  This does code conversion according to t
4706    
4707    filename = Fexpand_file_name (filename, Qnil);    filename = Fexpand_file_name (filename, Qnil);
4708    
4709    if (! NILP (mustbenew) && !EQ (mustbenew, Qexcl))    if (!NILP (mustbenew) && !EQ (mustbenew, Qexcl))
4710      barf_or_query_if_file_exists (filename, "overwrite", 1, 0, 1);      barf_or_query_if_file_exists (filename, "overwrite", 1, 0, 1);
4711    
4712    if (STRINGP (visit))    if (STRINGP (visit))
# Line 4714  This does code conversion according to t Line 4715  This does code conversion according to t
4715      visit_file = filename;      visit_file = filename;
4716    UNGCPRO;    UNGCPRO;
4717    
   annotations = Qnil;  
   
4718    if (NILP (lockname))    if (NILP (lockname))
4719      lockname = visit_file;      lockname = visit_file;
4720    
# Line 4755  This does code conversion according to t Line 4754  This does code conversion according to t
4754    count1 = specpdl_ptr - specpdl;    count1 = specpdl_ptr - specpdl;
4755    
4756    given_buffer = current_buffer;    given_buffer = current_buffer;
4757    annotations = build_annotations (start, end, coding.pre_write_conversion);    annotations = build_annotations (start, end);
4758      if (current_buffer != given_buffer)
4759        {
4760          XSETFASTINT (start, BEGV);
4761          XSETFASTINT (end, ZV);
4762        }
4763    
4764      UNGCPRO;
4765    
4766      GCPRO5 (start, filename, annotations, visit_file, lockname);
4767    
4768      given_buffer = current_buffer;
4769      annotations = build_annotations_2 (start, end,
4770                                         coding.pre_write_conversion, annotations);
4771    if (current_buffer != given_buffer)    if (current_buffer != given_buffer)
4772      {      {
4773        XSETFASTINT (start, BEGV);        XSETFASTINT (start, BEGV);
# Line 5065  DEFUN ("car-less-than-car", Fcar_less_th Line 5077  DEFUN ("car-less-than-car", Fcar_less_th
5077     as save-excursion would do.  */     as save-excursion would do.  */
5078    
5079  static Lisp_Object  static Lisp_Object
5080  build_annotations (start, end, pre_write_conversion)  build_annotations (start, end)
5081       Lisp_Object start, end, pre_write_conversion;       Lisp_Object start, end;
5082  {  {
5083    Lisp_Object annotations;    Lisp_Object annotations;
5084    Lisp_Object p, res;    Lisp_Object p, res;
# Line 5127  build_annotations (start, end, pre_write Line 5139  build_annotations (start, end, pre_write
5139          annotations = merge (annotations, res, Qcar_less_than_car);          annotations = merge (annotations, res, Qcar_less_than_car);
5140      }      }
5141    
5142      UNGCPRO;
5143      return annotations;
5144    }
5145    
5146    static Lisp_Object
5147    build_annotations_2 (start, end, pre_write_conversion, annotations)
5148         Lisp_Object start, end, pre_write_conversion, annotations;
5149    {
5150      struct gcpro gcpro1;
5151      Lisp_Object res;
5152    
5153      GCPRO1 (annotations);
5154    /* At last, do the same for the function PRE_WRITE_CONVERSION    /* At last, do the same for the function PRE_WRITE_CONVERSION
5155       implied by the current coding-system.  */       implied by the current coding-system.  */
5156    if (!NILP (pre_write_conversion))    if (!NILP (pre_write_conversion))

Legend:
Removed from v.1.425  
changed lines
  Added in v.1.426

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26