/[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.483 by handa, Fri Apr 11 10:59:02 2003 UTC revision 1.484 by monnier, Mon May 5 18:13:08 2003 UTC
# Line 183  Lisp_Object Qafter_insert_file_set_codin Line 183  Lisp_Object Qafter_insert_file_set_codin
183    
184  /* Functions to be called to create text property annotations for file.  */  /* Functions to be called to create text property annotations for file.  */
185  Lisp_Object Vwrite_region_annotate_functions;  Lisp_Object Vwrite_region_annotate_functions;
186    Lisp_Object Qwrite_region_annotate_functions;
187    
188  /* During build_annotations, each time an annotation function is called,  /* During build_annotations, each time an annotation function is called,
189     this holds the annotations made by the previous functions.  */     this holds the annotations made by the previous functions.  */
# Line 5217  build_annotations (start, end) Line 5218  build_annotations (start, end)
5218    Lisp_Object p, res;    Lisp_Object p, res;
5219    struct gcpro gcpro1, gcpro2;    struct gcpro gcpro1, gcpro2;
5220    Lisp_Object original_buffer;    Lisp_Object original_buffer;
5221    int i;    int i, used_global = 0;
5222    
5223    XSETBUFFER (original_buffer, current_buffer);    XSETBUFFER (original_buffer, current_buffer);
5224    
# Line 5227  build_annotations (start, end) Line 5228  build_annotations (start, end)
5228    while (CONSP (p))    while (CONSP (p))
5229      {      {
5230        struct buffer *given_buffer = current_buffer;        struct buffer *given_buffer = current_buffer;
5231          if (EQ (Qt, XCAR (p)) && !used_global)
5232            { /* Use the global value of the hook.  */
5233              Lisp_Object arg[2];
5234              used_global = 1;
5235              arg[0] = Fdefault_value (Qwrite_region_annotate_functions);
5236              arg[1] = XCDR (p);
5237              p = Fappend (2, arg);
5238              continue;
5239            }
5240        Vwrite_region_annotations_so_far = annotations;        Vwrite_region_annotations_so_far = annotations;
5241        res = call2 (XCAR (p), start, end);        res = call2 (XCAR (p), start, end);
5242        /* If the function makes a different buffer current,        /* If the function makes a different buffer current,
# Line 6449  inserted at the specified positions of t Line 6459  inserted at the specified positions of t
6459  insert before the first byte written).  The POSITIONs must be sorted into  insert before the first byte written).  The POSITIONs must be sorted into
6460  increasing order.  If there are several functions in the list, the several  increasing order.  If there are several functions in the list, the several
6461  lists are merged destructively.  Alternatively, the function can return  lists are merged destructively.  Alternatively, the function can return
6462  with a different buffer current and value nil.*/);  with a different buffer current; in that case it should pay attention
6463    to the annotations returned by previous functions and listed in
6464    `write-region-annotations-so-far'.*/);
6465    Vwrite_region_annotate_functions = Qnil;    Vwrite_region_annotate_functions = Qnil;
6466      staticpro (&Qwrite_region_annotate_functions);
6467      Qwrite_region_annotate_functions
6468        = intern ("write-region-annotate-functions");
6469    
6470    DEFVAR_LISP ("write-region-annotations-so-far",    DEFVAR_LISP ("write-region-annotations-so-far",
6471                 &Vwrite_region_annotations_so_far,                 &Vwrite_region_annotations_so_far,

Legend:
Removed from v.1.483  
changed lines
  Added in v.1.484

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