comparison src/editfns.c @ 487:54fa1a5c2d12

[xemacs-hg @ 2001-04-28 07:48:36 by ben] misc changes, some for 21.4 remove bogus lines setting zmacs_region_stays to 0. remove debug lines. Correct general info about init file. Fix up Cygwin section. More contributions. Fix spurious setting of zmacs-region-stays to t after a non-shift motion command. Sync up with FSF 20.7, to fix bugs handling some etags line formats. Move non-window-system specific code that was duplicated in all window systems into the generic code. * gutter.el (init-gutter): Removed. (unused) Clean up the rectangle code w.r.t. selections. You'll now get the right text copied into the primary selection (but not the clipboard yet, unfortunately -- that really requires defining our own rectangle type).
author ben
date Sat, 28 Apr 2001 07:48:46 +0000
parents 1ccc32a20af4
children 183866b06e0b
comparison
equal deleted inserted replaced
486:a83afd50994d 487:54fa1a5c2d12
1488 else 1488 else
1489 { 1489 {
1490 arg = wrong_type_argument (Qchar_or_string_p, arg); 1490 arg = wrong_type_argument (Qchar_or_string_p, arg);
1491 goto retry; 1491 goto retry;
1492 } 1492 }
1493 zmacs_region_stays = 0;
1494 UNGCPRO; 1493 UNGCPRO;
1495 } 1494 }
1496 1495
1497 1496
1498 /* Callers passing one argument to Finsert need not gcpro the 1497 /* Callers passing one argument to Finsert need not gcpro the
1549 { 1548 {
1550 tem = wrong_type_argument (Qchar_or_string_p, tem); 1549 tem = wrong_type_argument (Qchar_or_string_p, tem);
1551 goto retry; 1550 goto retry;
1552 } 1551 }
1553 } 1552 }
1554 zmacs_region_stays = 0;
1555 return Qnil; 1553 return Qnil;
1556 } 1554 }
1557 1555
1558 DEFUN ("insert-string", Finsert_string, 1, 2, 0, /* 1556 DEFUN ("insert-string", Finsert_string, 1, 2, 0, /*
1559 Insert STRING into BUFFER at BUFFER's point. 1557 Insert STRING into BUFFER at BUFFER's point.
1565 (string, buffer)) 1563 (string, buffer))
1566 { 1564 {
1567 struct buffer *b = decode_buffer (buffer, 1); 1565 struct buffer *b = decode_buffer (buffer, 1);
1568 CHECK_STRING (string); 1566 CHECK_STRING (string);
1569 buffer_insert_lisp_string (b, string); 1567 buffer_insert_lisp_string (b, string);
1570 zmacs_region_stays = 0;
1571 return Qnil; 1568 return Qnil;
1572 } 1569 }
1573 1570
1574 /* Third argument in FSF is INHERIT: 1571 /* Third argument in FSF is INHERIT:
1575 1572
1636 } 1633 }
1637 #else 1634 #else
1638 buffer_insert_raw_string (b, string, n); 1635 buffer_insert_raw_string (b, string, n);
1639 #endif 1636 #endif
1640 1637
1641 zmacs_region_stays = 0;
1642 return Qnil; 1638 return Qnil;
1643 } 1639 }
1644 1640
1645 1641
1646 /* Making strings from buffer contents. */ 1642 /* Making strings from buffer contents. */
2002 Bufpos bp_start, bp_end; 1998 Bufpos bp_start, bp_end;
2003 struct buffer *buf = decode_buffer (buffer, 1); 1999 struct buffer *buf = decode_buffer (buffer, 1);
2004 2000
2005 get_buffer_range_char (buf, start, end, &bp_start, &bp_end, 0); 2001 get_buffer_range_char (buf, start, end, &bp_start, &bp_end, 0);
2006 buffer_delete_range (buf, bp_start, bp_end, 0); 2002 buffer_delete_range (buf, bp_start, bp_end, 0);
2007 zmacs_region_stays = 0;
2008 return Qnil; 2003 return Qnil;
2009 } 2004 }
2010 2005
2011 void 2006 void
2012 widen_buffer (struct buffer *b, int no_clip) 2007 widen_buffer (struct buffer *b, int no_clip)
2039 */ 2034 */
2040 (buffer)) 2035 (buffer))
2041 { 2036 {
2042 struct buffer *b = decode_buffer (buffer, 1); 2037 struct buffer *b = decode_buffer (buffer, 1);
2043 widen_buffer (b, 0); 2038 widen_buffer (b, 0);
2044 zmacs_region_stays = 0;
2045 return Qnil; 2039 return Qnil;
2046 } 2040 }
2047 2041
2048 DEFUN ("narrow-to-region", Fnarrow_to_region, 2, 3, "r", /* 2042 DEFUN ("narrow-to-region", Fnarrow_to_region, 2, 3, "r", /*
2049 Restrict editing in BUFFER to the current region. 2043 Restrict editing in BUFFER to the current region.
2075 BUF_SET_PT (buf, bp_end); 2069 BUF_SET_PT (buf, bp_end);
2076 MARK_CLIP_CHANGED; 2070 MARK_CLIP_CHANGED;
2077 /* Changing the buffer bounds invalidates any recorded current column. */ 2071 /* Changing the buffer bounds invalidates any recorded current column. */
2078 invalidate_current_column (); 2072 invalidate_current_column ();
2079 narrow_line_number_cache (buf); 2073 narrow_line_number_cache (buf);
2080 zmacs_region_stays = 0;
2081 return Qnil; 2074 return Qnil;
2082 } 2075 }
2083 2076
2084 Lisp_Object 2077 Lisp_Object
2085 save_restriction_save (void) 2078 save_restriction_save (void)