Mercurial > hg > xemacs-beta
comparison src/editfns.c @ 110:fe104dbd9147 r20-1b7
Import from CVS: tag r20-1b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:19:45 +0200 |
parents | c7528f8e288d |
children | 8619ce7e4c50 |
comparison
equal
deleted
inserted
replaced
109:e183fc049578 | 110:fe104dbd9147 |
---|---|
1914 } | 1914 } |
1915 | 1915 |
1916 | 1916 |
1917 DEFUN ("char-equal", Fchar_equal, 2, 3, 0, /* | 1917 DEFUN ("char-equal", Fchar_equal, 2, 3, 0, /* |
1918 Return t if two characters match, optionally ignoring case. | 1918 Return t if two characters match, optionally ignoring case. |
1919 Both arguments must be characters (i.e. integers). | 1919 Both arguments must be characters (i.e. NOT integers). |
1920 Case is ignored if `case-fold-search' is non-nil in BUFFER. | 1920 Case is ignored if `case-fold-search' is non-nil in BUFFER. |
1921 If BUFFER is nil, the current buffer is assumed. | 1921 If BUFFER is nil, the current buffer is assumed. |
1922 */ | 1922 */ |
1923 (c1, c2, buffer)) | 1923 (c1, c2, buffer)) |
1924 { | 1924 { |
1933 if (!NILP (buf->case_fold_search) | 1933 if (!NILP (buf->case_fold_search) |
1934 ? DOWNCASE (buf, x1) == DOWNCASE (buf, x2) | 1934 ? DOWNCASE (buf, x1) == DOWNCASE (buf, x2) |
1935 : x1 == x2) | 1935 : x1 == x2) |
1936 return Qt; | 1936 return Qt; |
1937 return Qnil; | 1937 return Qnil; |
1938 } | |
1939 | |
1940 DEFUN ("char=", Fchar_Equal, 2, 3, 0, /* | |
1941 Return t if two characters match, case is significant. | |
1942 Both arguments must be characters (i.e. NOT integers). | |
1943 The optional buffer argument is for symmetry and is ignored. | |
1944 */ | |
1945 (c1, c2, buffer)) | |
1946 { | |
1947 Emchar x1, x2; | |
1948 | |
1949 CHECK_CHAR_COERCE_INT (c1); | |
1950 CHECK_CHAR_COERCE_INT (c2); | |
1951 x1 = XCHAR (c1); | |
1952 x2 = XCHAR (c2); | |
1953 | |
1954 return x1 == x2 ? Qt : Qnil; | |
1938 } | 1955 } |
1939 | 1956 |
1940 #if 0 /* Undebugged FSFmacs code */ | 1957 #if 0 /* Undebugged FSFmacs code */ |
1941 /* Transpose the markers in two regions of the current buffer, and | 1958 /* Transpose the markers in two regions of the current buffer, and |
1942 adjust the ones between them if necessary (i.e.: if the regions | 1959 adjust the ones between them if necessary (i.e.: if the regions |
2059 defsymbol (&Qregion_beginning, "region-beginning"); | 2076 defsymbol (&Qregion_beginning, "region-beginning"); |
2060 defsymbol (&Qregion_end, "region-end"); | 2077 defsymbol (&Qregion_end, "region-end"); |
2061 defsymbol (&Qformat, "format"); | 2078 defsymbol (&Qformat, "format"); |
2062 | 2079 |
2063 DEFSUBR (Fchar_equal); | 2080 DEFSUBR (Fchar_equal); |
2081 DEFSUBR (Fchar_Equal); | |
2064 DEFSUBR (Fgoto_char); | 2082 DEFSUBR (Fgoto_char); |
2065 DEFSUBR (Fstring_to_char); | 2083 DEFSUBR (Fstring_to_char); |
2066 DEFSUBR (Fchar_to_string); | 2084 DEFSUBR (Fchar_to_string); |
2067 DEFSUBR (Fbuffer_substring); | 2085 DEFSUBR (Fbuffer_substring); |
2068 | 2086 |
2149 - \"Motion\" commands do not change whether the region is active or not. | 2167 - \"Motion\" commands do not change whether the region is active or not. |
2150 | 2168 |
2151 set-mark-command (C-SPC) pushes a mark and activates the region. Moving the | 2169 set-mark-command (C-SPC) pushes a mark and activates the region. Moving the |
2152 cursor with normal motion commands (C-n, C-p, etc) will cause the region | 2170 cursor with normal motion commands (C-n, C-p, etc) will cause the region |
2153 between point and the recently-pushed mark to be highlighted. It will | 2171 between point and the recently-pushed mark to be highlighted. It will |
2154 remain highlighted until some non-motion comand is executed. | 2172 remain highlighted until some non-motion command is executed. |
2155 | 2173 |
2156 exchange-point-and-mark (\\[exchange-point-and-mark]) activates the region. So if you mark a | 2174 exchange-point-and-mark (\\[exchange-point-and-mark]) activates the region. So if you mark a |
2157 region and execute a command that operates on it, you can reactivate the | 2175 region and execute a command that operates on it, you can reactivate the |
2158 same region with \\[exchange-point-and-mark] (or perhaps \\[exchange-point-and-mark] \\[exchange-point-and-mark]) to operate on it | 2176 same region with \\[exchange-point-and-mark] (or perhaps \\[exchange-point-and-mark] \\[exchange-point-and-mark]) to operate on it |
2159 again. | 2177 again. |