diff options
| author | Bill Wohler | 2014-02-23 18:04:35 -0800 |
|---|---|---|
| committer | Bill Wohler | 2014-02-23 18:04:35 -0800 |
| commit | 3e93bafb95608467e438ba7f725fd1f020669f8c (patch) | |
| tree | f2f90109f283e06a18caea3cb2a2623abcfb3a92 /src/casefiddle.c | |
| parent | 791c0d7634e44bb92ca85af605be84ff2ae08963 (diff) | |
| parent | e918e27fdf331e89268fc2c9d7cf838d3ecf7aa7 (diff) | |
| download | emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.tar.gz emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.zip | |
Merge from trunk; up to 2014-02-23T23:41:17Z!lekktu@gmail.com.
Diffstat (limited to 'src/casefiddle.c')
| -rw-r--r-- | src/casefiddle.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c index 7f5b99752fa..a7477bb64b2 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* GNU Emacs case conversion functions. | 1 | /* GNU Emacs case conversion functions. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985, 1994, 1997-1999, 2001-2013 Free Software Foundation, | 3 | Copyright (C) 1985, 1994, 1997-1999, 2001-2014 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| @@ -102,7 +102,7 @@ casify_object (enum case_action flag, Lisp_Object obj) | |||
| 102 | inword = (SYNTAX (c) == Sword); | 102 | inword = (SYNTAX (c) == Sword); |
| 103 | if (c != c1) | 103 | if (c != c1) |
| 104 | { | 104 | { |
| 105 | MAKE_CHAR_UNIBYTE (c); | 105 | MAKE_CHAR_UNIBYTE (c); |
| 106 | /* If the char can't be converted to a valid byte, just don't | 106 | /* If the char can't be converted to a valid byte, just don't |
| 107 | change it. */ | 107 | change it. */ |
| 108 | if (c >= 0 && c < 256) | 108 | if (c >= 0 && c < 256) |
| @@ -214,7 +214,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) | |||
| 214 | validate_region (&b, &e); | 214 | validate_region (&b, &e); |
| 215 | start = XFASTINT (b); | 215 | start = XFASTINT (b); |
| 216 | end = XFASTINT (e); | 216 | end = XFASTINT (e); |
| 217 | modify_region_1 (start, end, false); | 217 | modify_text (start, end); |
| 218 | record_change (start, end - start); | 218 | record_change (start, end - start); |
| 219 | start_byte = CHAR_TO_BYTE (start); | 219 | start_byte = CHAR_TO_BYTE (start); |
| 220 | 220 | ||
| @@ -365,7 +365,11 @@ operate_on_word (Lisp_Object arg, ptrdiff_t *newpoint) | |||
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | DEFUN ("upcase-word", Fupcase_word, Supcase_word, 1, 1, "p", | 367 | DEFUN ("upcase-word", Fupcase_word, Supcase_word, 1, 1, "p", |
| 368 | doc: /* Convert following word (or ARG words) to upper case, moving over. | 368 | doc: /* Convert to upper case from point to end of word, moving over. |
| 369 | |||
| 370 | If point is in the middle of a word, the part of that word before point | ||
| 371 | is ignored when moving forward. | ||
| 372 | |||
| 369 | With negative argument, convert previous words but do not move. | 373 | With negative argument, convert previous words but do not move. |
| 370 | See also `capitalize-word'. */) | 374 | See also `capitalize-word'. */) |
| 371 | (Lisp_Object arg) | 375 | (Lisp_Object arg) |
| @@ -380,7 +384,11 @@ See also `capitalize-word'. */) | |||
| 380 | } | 384 | } |
| 381 | 385 | ||
| 382 | DEFUN ("downcase-word", Fdowncase_word, Sdowncase_word, 1, 1, "p", | 386 | DEFUN ("downcase-word", Fdowncase_word, Sdowncase_word, 1, 1, "p", |
| 383 | doc: /* Convert following word (or ARG words) to lower case, moving over. | 387 | doc: /* Convert to lower case from point to end of word, moving over. |
| 388 | |||
| 389 | If point is in the middle of a word, the part of that word before point | ||
| 390 | is ignored when moving forward. | ||
| 391 | |||
| 384 | With negative argument, convert previous words but do not move. */) | 392 | With negative argument, convert previous words but do not move. */) |
| 385 | (Lisp_Object arg) | 393 | (Lisp_Object arg) |
| 386 | { | 394 | { |
| @@ -394,9 +402,14 @@ With negative argument, convert previous words but do not move. */) | |||
| 394 | } | 402 | } |
| 395 | 403 | ||
| 396 | DEFUN ("capitalize-word", Fcapitalize_word, Scapitalize_word, 1, 1, "p", | 404 | DEFUN ("capitalize-word", Fcapitalize_word, Scapitalize_word, 1, 1, "p", |
| 397 | doc: /* Capitalize the following word (or ARG words), moving over. | 405 | doc: /* Capitalize from point to the end of word, moving over. |
| 406 | With numerical argument ARG, capitalize the next ARG-1 words as well. | ||
| 398 | This gives the word(s) a first character in upper case | 407 | This gives the word(s) a first character in upper case |
| 399 | and the rest lower case. | 408 | and the rest lower case. |
| 409 | |||
| 410 | If point is in the middle of a word, the part of that word before point | ||
| 411 | is ignored when moving forward. | ||
| 412 | |||
| 400 | With negative argument, capitalize previous words but do not move. */) | 413 | With negative argument, capitalize previous words but do not move. */) |
| 401 | (Lisp_Object arg) | 414 | (Lisp_Object arg) |
| 402 | { | 415 | { |