aboutsummaryrefslogtreecommitdiffstats
path: root/src/casefiddle.c
diff options
context:
space:
mode:
authorBill Wohler2014-02-23 18:04:35 -0800
committerBill Wohler2014-02-23 18:04:35 -0800
commit3e93bafb95608467e438ba7f725fd1f020669f8c (patch)
treef2f90109f283e06a18caea3cb2a2623abcfb3a92 /src/casefiddle.c
parent791c0d7634e44bb92ca85af605be84ff2ae08963 (diff)
parente918e27fdf331e89268fc2c9d7cf838d3ecf7aa7 (diff)
downloademacs-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.c25
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
3Copyright (C) 1985, 1994, 1997-1999, 2001-2013 Free Software Foundation, 3Copyright (C) 1985, 1994, 1997-1999, 2001-2014 Free Software Foundation,
4Inc. 4Inc.
5 5
6This file is part of GNU Emacs. 6This 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
367DEFUN ("upcase-word", Fupcase_word, Supcase_word, 1, 1, "p", 367DEFUN ("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
370If point is in the middle of a word, the part of that word before point
371is ignored when moving forward.
372
369With negative argument, convert previous words but do not move. 373With negative argument, convert previous words but do not move.
370See also `capitalize-word'. */) 374See also `capitalize-word'. */)
371 (Lisp_Object arg) 375 (Lisp_Object arg)
@@ -380,7 +384,11 @@ See also `capitalize-word'. */)
380} 384}
381 385
382DEFUN ("downcase-word", Fdowncase_word, Sdowncase_word, 1, 1, "p", 386DEFUN ("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
389If point is in the middle of a word, the part of that word before point
390is ignored when moving forward.
391
384With negative argument, convert previous words but do not move. */) 392With 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
396DEFUN ("capitalize-word", Fcapitalize_word, Scapitalize_word, 1, 1, "p", 404DEFUN ("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.
406With numerical argument ARG, capitalize the next ARG-1 words as well.
398This gives the word(s) a first character in upper case 407This gives the word(s) a first character in upper case
399and the rest lower case. 408and the rest lower case.
409
410If point is in the middle of a word, the part of that word before point
411is ignored when moving forward.
412
400With negative argument, capitalize previous words but do not move. */) 413With negative argument, capitalize previous words but do not move. */)
401 (Lisp_Object arg) 414 (Lisp_Object arg)
402{ 415{