您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Fcons函数代码示例

51自学网 2021-06-01 20:45:52
  C++
这篇教程C++ Fcons函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Fcons函数的典型用法代码示例。如果您正苦于以下问题:C++ Fcons函数的具体用法?C++ Fcons怎么用?C++ Fcons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Fcons函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: record_point

static voidrecord_point (ptrdiff_t pt){  bool at_boundary;  /* Don't record position of pt when undo_inhibit_record_point holds.  */  if (undo_inhibit_record_point)    return;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  run_undoable_change ();  at_boundary = ! CONSP (BVAR (current_buffer, undo_list))                || NILP (XCAR (BVAR (current_buffer, undo_list)));  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  /* If we are just after an undo boundary, and     point wasn't at start of deleted range, record where it was.  */  if (at_boundary      && current_buffer == last_boundary_buffer      && last_boundary_position != pt)    bset_undo_list (current_buffer,		    Fcons (make_number (last_boundary_position),			   BVAR (current_buffer, undo_list)));}
开发者ID:yinsuhu,项目名称:emacs,代码行数:30,


示例2: find_and_return_menu_selection

/* As above, but return the menu selection instead of storing in kb buffer.   If keymaps==1, return full prefixes to selection. */Lisp_Objectfind_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data){  Lisp_Object prefix, entry;  int i;  Lisp_Object *subprefix_stack;  int submenu_depth = 0;  prefix = entry = Qnil;  i = 0;  subprefix_stack =    (Lisp_Object *)alloca(menu_items_used * sizeof (Lisp_Object));  while (i < menu_items_used)    {      if (EQ (XVECTOR (menu_items)->contents[i], Qnil))        {          subprefix_stack[submenu_depth++] = prefix;          prefix = entry;          i++;        }      else if (EQ (XVECTOR (menu_items)->contents[i], Qlambda))        {          prefix = subprefix_stack[--submenu_depth];          i++;        }      else if (EQ (XVECTOR (menu_items)->contents[i], Qt))        {          prefix            = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];          i += MENU_ITEMS_PANE_LENGTH;        }      /* Ignore a nil in the item list.         It's meaningful only for dialog boxes.  */      else if (EQ (XVECTOR (menu_items)->contents[i], Qquote))        i += 1;      else        {          entry            = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_VALUE];          if ((EMACS_INT)client_data ==  (EMACS_INT)(&XVECTOR (menu_items)->contents[i]))            {              if (keymaps != 0)                {                  int j;                  entry = Fcons (entry, Qnil);                  if (!NILP (prefix))                    entry = Fcons (prefix, entry);                  for (j = submenu_depth - 1; j >= 0; j--)                    if (!NILP (subprefix_stack[j]))                      entry = Fcons (subprefix_stack[j], entry);                }              return entry;            }          i += MENU_ITEMS_ITEM_LENGTH;        }    }  return Qnil;}
开发者ID:stanis,项目名称:emacs,代码行数:62,


示例3: record_delete

voidrecord_delete (ptrdiff_t beg, Lisp_Object string, bool record_markers){  Lisp_Object sbeg;  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  if (PT == beg + SCHARS (string))    {      XSETINT (sbeg, -beg);      record_point (PT);    }  else    {      XSETFASTINT (sbeg, beg);      record_point (beg);    }  /* primitive-undo assumes marker adjustments are recorded     immediately before the deletion is recorded.  See bug 16818     discussion.  */  if (record_markers)    record_marker_adjustments (beg, beg + SCHARS (string));  bset_undo_list    (current_buffer,     Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list)));}
开发者ID:yinsuhu,项目名称:emacs,代码行数:29,


示例4: cons

/* Add a new watch to watch-descriptor WD watching FILENAME and using   IMASK and CALLBACK.  Return a cons (DESCRIPTOR . ID) uniquely   identifying the new watch.  */static Lisp_Objectadd_watch (int wd, Lisp_Object filename,	   uint32_t imask, Lisp_Object callback){  Lisp_Object descriptor = INTEGER_TO_CONS (wd);  Lisp_Object tail = assoc_no_quit (descriptor, watch_list);  Lisp_Object watch, watch_id;  Lisp_Object mask = INTEGER_TO_CONS (imask);  EMACS_INT id = 0;  if (NILP (tail))    {      tail = list1 (descriptor);      watch_list = Fcons (tail, watch_list);    }  else    {      /* Assign a watch ID that is not already in use, by looking	 for a gap in the existing sorted list.  */      for (; ! NILP (XCDR (tail)); tail = XCDR (tail), id++)	if (!EQ (XCAR (XCAR (XCDR (tail))), make_number (id)))	  break;      if (MOST_POSITIVE_FIXNUM < id)	emacs_abort ();    }  /* Insert the newly-assigned ID into the previously-discovered gap,     which is possibly at the end of the list.  Inserting it there     keeps the list sorted.  */  watch_id = make_number (id);  watch = list4 (watch_id, filename, callback, mask);  XSETCDR (tail, Fcons (watch, XCDR (tail)));  return Fcons (descriptor, watch_id);}
开发者ID:davidswelt,项目名称:aquamacs-emacs,代码行数:38,


示例5: record_insert

voidrecord_insert (ptrdiff_t beg, ptrdiff_t length){  Lisp_Object lbeg, lend;  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  record_point (beg);  /* If this is following another insertion and consecutive with it     in the buffer, combine the two.  */  if (CONSP (BVAR (current_buffer, undo_list)))    {      Lisp_Object elt;      elt = XCAR (BVAR (current_buffer, undo_list));      if (CONSP (elt)	  && INTEGERP (XCAR (elt))	  && INTEGERP (XCDR (elt))	  && XINT (XCDR (elt)) == beg)	{	  XSETCDR (elt, make_number (beg + length));	  return;	}    }  XSETFASTINT (lbeg, beg);  XSETINT (lend, beg + length);  bset_undo_list (current_buffer,		  Fcons (Fcons (lbeg, lend), BVAR (current_buffer, undo_list)));}
开发者ID:yinsuhu,项目名称:emacs,代码行数:31,


示例6: init_libxml2_functions

static boolinit_libxml2_functions (void){#ifdef WINDOWSNT    if (libxml2_loaded_p ())        return true;    else    {        HMODULE library;        if (!(library = w32_delayed_load (Qlibxml2)))        {            message1 ("libxml2 library not found");            return false;        }        if (! load_dll_functions (library))            goto bad_library;        Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qt), Vlibrary_cache);        return true;    }bad_library:    Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qnil), Vlibrary_cache);    return false;#else  /* !WINDOWSNT */    return true;#endif	/* !WINDOWSNT */}
开发者ID:cpitclaudel,项目名称:emacs,代码行数:31,


示例7: kqueue_generate_event

/* Generate a file notification event.  */static voidkqueue_generate_event (Lisp_Object watch_object, Lisp_Object actions,		       Lisp_Object file, Lisp_Object file1){  Lisp_Object flags, action, entry;  struct input_event event;  /* Check, whether all actions shall be monitored.  */  flags = Fnth (make_number (2), watch_object);  action = actions;  do {    if (NILP (action))      break;    entry = XCAR (action);    if (NILP (Fmember (entry, flags))) {      action = XCDR (action);      actions = Fdelq (entry, actions);    } else      action = XCDR (action);  } while (1);  /* Store it into the input event queue.  */  if (! NILP (actions)) {    EVENT_INIT (event);    event.kind = FILE_NOTIFY_EVENT;    event.frame_or_window = Qnil;    event.arg = list2 (Fcons (XCAR (watch_object),			      Fcons (actions,				     NILP (file1)				     ? Fcons (file, Qnil)				     : list2 (file, file1))),		       Fnth (make_number (3), watch_object));    kbd_buffer_store_event (&event);  }}
开发者ID:minimal,项目名称:emacs,代码行数:36,


示例8: find_and_return_menu_selection

/* As above, but return the menu selection instead of storing in kb buffer.   If KEYMAPS, return full prefixes to selection. */Lisp_Objectfind_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data){  Lisp_Object prefix, entry;  int i;  Lisp_Object *subprefix_stack;  int submenu_depth = 0;  prefix = entry = Qnil;  i = 0;  subprefix_stack = alloca (menu_items_used * word_size);  while (i < menu_items_used)    {      if (EQ (AREF (menu_items, i), Qnil))        {          subprefix_stack[submenu_depth++] = prefix;          prefix = entry;          i++;        }      else if (EQ (AREF (menu_items, i), Qlambda))        {          prefix = subprefix_stack[--submenu_depth];          i++;        }      else if (EQ (AREF (menu_items, i), Qt))        {          prefix            = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);          i += MENU_ITEMS_PANE_LENGTH;        }      /* Ignore a nil in the item list.         It's meaningful only for dialog boxes.  */      else if (EQ (AREF (menu_items, i), Qquote))        i += 1;      else        {          entry            = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);          if (aref_addr (menu_items, i) == client_data)            {              if (keymaps)                {                  int j;                  entry = list1 (entry);                  if (!NILP (prefix))                    entry = Fcons (prefix, entry);                  for (j = submenu_depth - 1; j >= 0; j--)                    if (!NILP (subprefix_stack[j]))                      entry = Fcons (subprefix_stack[j], entry);                }              return entry;            }          i += MENU_ITEMS_ITEM_LENGTH;        }    }  return Qnil;}
开发者ID:0230,项目名称:deepin-emacs,代码行数:61,


示例9: record_point

static voidrecord_point (EMACS_INT pt){  int at_boundary;  /* Don't record position of pt when undo_inhibit_record_point holds.  */  if (undo_inhibit_record_point)    return;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  if ((current_buffer != last_undo_buffer)      /* Don't call Fundo_boundary for the first change.  Otherwise we	 risk overwriting last_boundary_position in Fundo_boundary with	 PT of the current buffer and as a consequence not insert an	 undo boundary because last_boundary_position will equal pt in	 the test at the end of the present function (Bug#731).  */      && (MODIFF > SAVE_MODIFF))    Fundo_boundary ();  last_undo_buffer = current_buffer;  if (CONSP (BVAR (current_buffer, undo_list)))    {      /* Set AT_BOUNDARY to 1 only when we have nothing other than         marker adjustment before undo boundary.  */      Lisp_Object tail = BVAR (current_buffer, undo_list), elt;      while (1)	{	  if (NILP (tail))	    elt = Qnil;	  else	    elt = XCAR (tail);	  if (NILP (elt) || ! (CONSP (elt) && MARKERP (XCAR (elt))))	    break;	  tail = XCDR (tail);	}      at_boundary = NILP (elt);    }  else    at_boundary = 1;  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  /* If we are just after an undo boundary, and     point wasn't at start of deleted range, record where it was.  */  if (at_boundary      && current_buffer == last_boundary_buffer      && last_boundary_position != pt)    BVAR (current_buffer, undo_list)      = Fcons (make_number (last_boundary_position), BVAR (current_buffer, undo_list));}
开发者ID:Sunmonds,项目名称:emacs,代码行数:56,


示例10: make_dom

static Lisp_Objectmake_dom (xmlNode *node){  if (node->type == XML_ELEMENT_NODE)    {      Lisp_Object result = Fcons (intern ((char *) node->name), Qnil);      xmlNode *child;      xmlAttr *property;      Lisp_Object plist = Qnil;      /* First add the attributes. */      property = node->properties;      while (property != NULL)	{	  if (property->children &&	      property->children->content)	    {	      char *content = (char *) property->children->content;	      plist = Fcons (Fcons (intern ((char *) property->name),				    build_string (content)),			     plist);	    }	  property = property->next;	}      result = Fcons (Fnreverse (plist), result);      /* Then add the children of the node. */      child = node->children;      while (child != NULL)	{	  result = Fcons (make_dom (child), result);	  child = child->next;	}      return Fnreverse (result);    }  else if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE)    {      if (node->content)	return build_string ((char *) node->content);      else	return Qnil;    }  else if (node->type == XML_COMMENT_NODE)    {      if (node->content)	return list3 (intern ("comment"), Qnil,		      build_string ((char *) node->content));      else	return Qnil;    }  else    return Qnil;}
开发者ID:RenWenshan,项目名称:emacs,代码行数:54,


示例11: gcpro_popup_callbacks

void gcpro_popup_callbacks(LWLIB_ID id){	struct popup_data *pdata;	Lisp_Object lid = make_int(id);	Lisp_Object lpdata;	assert(NILP(assq_no_quit(lid, Vpopup_callbacks)));	pdata = alloc_lcrecord_type(struct popup_data, &lrecord_popup_data);	pdata->id = id;	pdata->last_menubar_buffer = Qnil;	pdata->menubar_contents_up_to_date = 0;	XSETPOPUP_DATA(lpdata, pdata);	Vpopup_callbacks = Fcons(Fcons(lid, lpdata), Vpopup_callbacks);}
开发者ID:hroptatyr,项目名称:sxemacs,代码行数:14,


示例12: record_first_change

voidrecord_first_change (void){  struct buffer *base_buffer = current_buffer;  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  if (base_buffer->base_buffer)    base_buffer = base_buffer->base_buffer;  bset_undo_list (current_buffer,		  Fcons (Fcons (Qt, Fvisited_file_modtime ()),			 BVAR (current_buffer, undo_list)));}
开发者ID:yinsuhu,项目名称:emacs,代码行数:15,


示例13: record_point

/* Record point, if necessary, as it was at beginning of this command.   BEG is the position of point that will naturally occur as a result   of the undo record that will be added just after this command   terminates.  */static voidrecord_point (ptrdiff_t beg){  /* Don't record position of pt when undo_inhibit_record_point holds.  */  if (undo_inhibit_record_point)    return;  bool at_boundary;  /* Check whether we are at a boundary now, in case we record the  first change. FIXME: This check is currently dependent on being  called before record_first_change, but could be made not to by  ignoring timestamp undo entries */  at_boundary = ! CONSP (BVAR (current_buffer, undo_list))                || NILP (XCAR (BVAR (current_buffer, undo_list)));  /* If this is the first change since save, then record this.*/  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  /* We may need to record point if we are immediately after a     boundary, so that this will be restored correctly after undo. We     do not need to do this if point is at the start of a change     region since it will be restored there anyway, and we must not do     this if the buffer has changed since the last command, since the     value of point that we have will be for that buffer, not this.*/  if (at_boundary      && point_before_last_command_or_undo != beg      && buffer_before_last_command_or_undo == current_buffer )    bset_undo_list (current_buffer,		    Fcons (make_number (point_before_last_command_or_undo),			   BVAR (current_buffer, undo_list)));}
开发者ID:Wilfred,项目名称:emacs,代码行数:37,


示例14: prepare_record

/* Prepare the undo info for recording a change. */static voidprepare_record (void){  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);}
开发者ID:Wilfred,项目名称:emacs,代码行数:8,


示例15: report_error

static voidreport_error (char *file, int fd){  if (fd)    close (fd);  report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil));}
开发者ID:EwanDawson,项目名称:emacs,代码行数:7,


示例16: cons

/* Initialize the cache.  Cache is (in pseudo-BNF):   CACHE		= nil | INITIALIZED-CACHE   INITIALIZED-CACHE	= cons (RING, BEGV-LINE)   RING			= vector (*RING-ELEMENT)   RING-ELEMENT		= nil | RING-PAIR   RING-PAIR		= cons (marker, integer)   BEGV-LINE		= integer   Line number cache should never, ever, be visible to Lisp (because   destructively modifying its elements can cause crashes.)  Debug it   using debug_print (current_buffer->text->last_number_cache).  */static voidallocate_line_number_cache (struct buffer *b){  b->text->line_number_cache = Fcons (make_vector (LINE_NUMBER_RING_SIZE, Qnil),				      Qzero);  narrow_line_number_cache (b);}
开发者ID:kenny-thomas,项目名称:xemacs,代码行数:19,


示例17: inotifyevent_to_event

static Lisp_Objectinotifyevent_to_event (Lisp_Object watch, struct inotify_event const *ev){  Lisp_Object name;  uint32_t mask;  CONS_TO_INTEGER (Fnth (make_number (3), watch), uint32_t, mask);  if (! (mask & ev->mask))    return Qnil;  if (ev->len > 0)    {      size_t const len = strlen (ev->name);      name = make_unibyte_string (ev->name, min (len, ev->len));      name = DECODE_FILE (name);    }  else    name = XCAR (XCDR (watch));  return list2 (list4 (Fcons (INTEGER_TO_CONS (ev->wd), XCAR (watch)),                       mask_to_aspects (ev->mask),                       name,		       INTEGER_TO_CONS (ev->cookie)),		Fnth (make_number (2), watch));}
开发者ID:davidswelt,项目名称:aquamacs-emacs,代码行数:25,


示例18: are

/* Generate a list from the directory_files_internal output.   Items are (INODE FILE-NAME LAST-MOD LAST-STATUS-MOD SIZE).  */Lisp_Objectkqueue_directory_listing (Lisp_Object directory_files){  Lisp_Object dl, result = Qnil;  for (dl = directory_files; ! NILP (dl); dl = XCDR (dl)) {    /* We ignore "." and "..".  */    if ((strcmp (".", SSDATA (XCAR (XCAR (dl)))) == 0) ||	(strcmp ("..", SSDATA (XCAR (XCAR (dl)))) == 0))      continue;    result = Fcons      (list5 (/* inode.  */	      Fnth (make_number (11), XCAR (dl)),	      /* filename.  */	      XCAR (XCAR (dl)),	      /* last modification time.  */	      Fnth (make_number (6), XCAR (dl)),	      /* last status change time.  */	      Fnth (make_number (7), XCAR (dl)),	      /* size.  */	      Fnth (make_number (8), XCAR (dl))),       result);  }  return result;}
开发者ID:GiantGeorgeGo,项目名称:emacs,代码行数:28,


示例19: compile_pattern

/* Compile a regexp and signal a Lisp error if anything goes wrong.  */voidcompile_pattern (Lisp_Object pattern, struct re_pattern_buffer *bufp, char *translate, int backward){  char *val;  Lisp_Object dummy;  if (EQ (pattern, last_regexp)      && translate == bufp->translate /* 92.4.10 by K.Handa */      /* 93.7.13 by K.Handa */      && NILP (current_buffer->mc_flag) == !bufp->mc_flag      && (!bufp->syntax_version	  || bufp->syntax_version == syntax_table_version)      && (!bufp->category_version	  || bufp->category_version == category_table_version))    return;  if (CONSP (pattern))			/* pre-compiled regexp */    {      Lisp_Object compiled;      val = 0;      pattern = XCONS (pattern)->car;      if (CONSP (pattern)	  && (compiled = backward ? XCONS(pattern)->cdr : XCONS(pattern)->car)	  && XTYPE (compiled) == Lisp_Vector	  && XVECTOR (compiled)->size == 4) {	/* set_pattern will set bufp->allocated to NULL */	set_pattern (compiled, bufp, translate);	return;      }      val = "Invalied pre-compiled regexp";      goto invalid_regexp;    }  CHECK_STRING (pattern, 0);  last_regexp = Qnil;  bufp->translate = translate;  bufp->syntax_version = bufp->category_version = 0; /* 93.7.13 by K.Handa */  /* 92.7.10 by T.Enami     'bufp->allocated == 0' means bufp->buffer points to pre-compiled pattern     in a lisp string, which should not be 'realloc'ed. */  if (bufp->allocated == 0) bufp->buffer = 0;   val = re_compile_pattern (XSTRING (pattern)->data,			    XSTRING (pattern)->size,			    bufp);  if (val)    {    invalid_regexp:      dummy = build_string (val);      while (1)	Fsignal (Qinvalid_regexp, Fcons (dummy, Qnil));    }  last_regexp = pattern;  return;}
开发者ID:ysei,项目名称:mule1.1-netbsd,代码行数:60,


示例20: unexec

voidunexec (const char *new_name, const char *old_name){  Lisp_Object data;  Lisp_Object errstring;  if (! dldump (0, new_name, RTLD_MEMORY))    return;  data = Fcons (build_string (new_name), Qnil);  synchronize_system_messages_locale ();  errstring = code_convert_string_norecord (build_string (dlerror ()),					    Vlocale_coding_system, 0);  xsignal (Qfile_error,	   Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));}
开发者ID:JamesWatling,项目名称:emacs-mac-port,代码行数:17,


示例21: make_stacking_list

/* Return a list of windows in top->bottom order */repvmake_stacking_list (void){    repv out = Qnil;    Lisp_Window *ptr;    for (ptr = lowest_window; ptr != 0; ptr = ptr->above)	out = Fcons (rep_VAL (ptr), out);    return out;}
开发者ID:baohaojun,项目名称:sawfish,代码行数:10,


示例22: record_marker_adjustment

voidrecord_marker_adjustment (Lisp_Object marker, EMACS_INT adjustment){  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  if (current_buffer != last_undo_buffer)    Fundo_boundary ();  last_undo_buffer = current_buffer;  BVAR (current_buffer, undo_list)    = Fcons (Fcons (marker, make_number (adjustment)),	     BVAR (current_buffer, undo_list));}
开发者ID:Sunmonds,项目名称:emacs,代码行数:18,


示例23: record_first_change

voidrecord_first_change (void){  struct buffer *base_buffer = current_buffer;  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  if (current_buffer != last_undo_buffer)    Fundo_boundary ();  last_undo_buffer = current_buffer;  if (base_buffer->base_buffer)    base_buffer = base_buffer->base_buffer;  BVAR (current_buffer, undo_list) =    Fcons (Fcons (Qt, INTEGER_TO_CONS (base_buffer->modtime)),	   BVAR (current_buffer, undo_list));}
开发者ID:Sunmonds,项目名称:emacs,代码行数:19,


示例24: prepare_record

/* Record point as it was at beginning of this command (if necessary)   and prepare the undo info for recording a change.   Prepare the undo info for recording a change. */static voidprepare_record (void){  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  if (MODIFF <= SAVE_MODIFF)    record_first_change ();}
开发者ID:AdrieanKhisbe,项目名称:emacs,代码行数:13,


示例25: build_syscolor_cons

static Lisp_Objectbuild_syscolor_cons (int index1, int index2){  Lisp_Object color1, color2;  struct gcpro gcpro1;  GCPRO1 (color1);  color1 = build_syscolor_string (index1);  color2 = build_syscolor_string (index2);  RETURN_UNGCPRO (Fcons (color1, color2));}
开发者ID:kenny-thomas,项目名称:xemacs,代码行数:10,


示例26: record_marker_adjustments

static voidrecord_marker_adjustments (ptrdiff_t from, ptrdiff_t to){  Lisp_Object marker;  register struct Lisp_Marker *m;  register ptrdiff_t charpos, adjustment;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  if (current_buffer != last_undo_buffer)    Fundo_boundary ();  last_undo_buffer = current_buffer;  for (m = BUF_MARKERS (current_buffer); m; m = m->next)    {      charpos = m->charpos;      eassert (charpos <= Z);      if (from <= charpos && charpos <= to)        {          /* insertion_type nil markers will end up at the beginning of             the re-inserted text after undoing a deletion, and must be             adjusted to move them to the correct place.             insertion_type t markers will automatically move forward             upon re-inserting the deleted text, so we have to arrange             for them to move backward to the correct position.  */          adjustment = (m->insertion_type ? to : from) - charpos;          if (adjustment)            {              XSETMISC (marker, m);              bset_undo_list                (current_buffer,                 Fcons (Fcons (marker, make_number (adjustment)),                        BVAR (current_buffer, undo_list)));            }        }    }}
开发者ID:aixoss,项目名称:emacs,代码行数:42,


示例27: record_property_change

voidrecord_property_change (ptrdiff_t beg, ptrdiff_t length,			Lisp_Object prop, Lisp_Object value,			Lisp_Object buffer){  Lisp_Object lbeg, lend, entry;  struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);  if (EQ (BVAR (buf, undo_list), Qt))    return;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  /* Switch temporarily to the buffer that was changed.  */  set_buffer_internal (buf);  run_undoable_change ();  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  XSETINT (lbeg, beg);  XSETINT (lend, beg + length);  entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));  bset_undo_list (current_buffer,		  Fcons (entry, BVAR (current_buffer, undo_list)));  /* Reset the buffer */  set_buffer_internal (obuf);}
开发者ID:yinsuhu,项目名称:emacs,代码行数:32,


示例28: record_delete

voidrecord_delete (EMACS_INT beg, Lisp_Object string){  Lisp_Object sbeg;  if (EQ (BVAR (current_buffer, undo_list), Qt))    return;  if (PT == beg + SCHARS (string))    {      XSETINT (sbeg, -beg);      record_point (PT);    }  else    {      XSETFASTINT (sbeg, beg);      record_point (beg);    }  BVAR (current_buffer, undo_list)    = Fcons (Fcons (string, sbeg), BVAR (current_buffer, undo_list));}
开发者ID:Sunmonds,项目名称:emacs,代码行数:22,


示例29: record_property_change

voidrecord_property_change (ptrdiff_t beg, ptrdiff_t length,			Lisp_Object prop, Lisp_Object value,			Lisp_Object buffer){  Lisp_Object lbeg, lend, entry;  struct buffer *buf = XBUFFER (buffer);  if (EQ (BVAR (buf, undo_list), Qt))    return;  prepare_record();  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  XSETINT (lbeg, beg);  XSETINT (lend, beg + length);  entry = Fcons (Qnil, Fcons (prop, Fcons (value, Fcons (lbeg, lend))));  bset_undo_list (current_buffer,		  Fcons (entry, BVAR (current_buffer, undo_list)));}
开发者ID:Wilfred,项目名称:emacs,代码行数:22,


示例30: record_point

static voidrecord_point (ptrdiff_t pt){  bool at_boundary;  /* Don't record position of pt when undo_inhibit_record_point holds.  */  if (undo_inhibit_record_point)    return;  /* Allocate a cons cell to be the undo boundary after this command.  */  if (NILP (pending_boundary))    pending_boundary = Fcons (Qnil, Qnil);  if ((current_buffer != last_undo_buffer)      /* Don't call Fundo_boundary for the first change.  Otherwise we	 risk overwriting last_boundary_position in Fundo_boundary with	 PT of the current buffer and as a consequence not insert an	 undo boundary because last_boundary_position will equal pt in	 the test at the end of the present function (Bug#731).  */      && (MODIFF > SAVE_MODIFF))    Fundo_boundary ();  last_undo_buffer = current_buffer;  at_boundary = ! CONSP (BVAR (current_buffer, undo_list))                || NILP (XCAR (BVAR (current_buffer, undo_list)));  if (MODIFF <= SAVE_MODIFF)    record_first_change ();  /* If we are just after an undo boundary, and     point wasn't at start of deleted range, record where it was.  */  if (at_boundary      && current_buffer == last_boundary_buffer      && last_boundary_position != pt)    bset_undo_list (current_buffer,		    Fcons (make_number (last_boundary_position),			   BVAR (current_buffer, undo_list)));}
开发者ID:aixoss,项目名称:emacs,代码行数:38,



注:本文中的Fcons函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FeaturePcdGet函数代码示例
C++ FcitxLog函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。