diff options
| author | Dmitry Gutov | 2015-11-14 13:02:35 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-11-14 13:02:35 +0200 |
| commit | f234fc2cb319de1e5e2eca1a84450ec220ce7955 (patch) | |
| tree | 37134b43d4270bf955757a7c7f571756b493c7a8 /src | |
| parent | 4d71d2471aaf341791fd728287bf8db62aebb3ba (diff) | |
| parent | 138ad3d93b7abe08ac399f582aa6c8aac869e17e (diff) | |
| download | emacs-f234fc2cb319de1e5e2eca1a84450ec220ce7955.tar.gz emacs-f234fc2cb319de1e5e2eca1a84450ec220ce7955.zip | |
Merge branch 'master' into emacs-25
Diffstat (limited to 'src')
| -rw-r--r-- | src/casefiddle.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/casefiddle.c b/src/casefiddle.c index b94ea8e212e..6a2983ef018 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c | |||
| @@ -306,14 +306,30 @@ See also `capitalize-region'. */) | |||
| 306 | return Qnil; | 306 | return Qnil; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | DEFUN ("downcase-region", Fdowncase_region, Sdowncase_region, 2, 2, "r", | 309 | DEFUN ("downcase-region", Fdowncase_region, Sdowncase_region, 2, 3, |
| 310 | "(list (region-beginning) (region-end) (region-noncontiguous-p))", | ||
| 310 | doc: /* Convert the region to lower case. In programs, wants two arguments. | 311 | doc: /* Convert the region to lower case. In programs, wants two arguments. |
| 311 | These arguments specify the starting and ending character numbers of | 312 | These arguments specify the starting and ending character numbers of |
| 312 | the region to operate on. When used as a command, the text between | 313 | the region to operate on. When used as a command, the text between |
| 313 | point and the mark is operated on. */) | 314 | point and the mark is operated on. */) |
| 314 | (Lisp_Object beg, Lisp_Object end) | 315 | (Lisp_Object beg, Lisp_Object end, Lisp_Object region_noncontiguous_p) |
| 315 | { | 316 | { |
| 316 | casify_region (CASE_DOWN, beg, end); | 317 | Lisp_Object bounds = Qnil; |
| 318 | |||
| 319 | if (!NILP (region_noncontiguous_p)) | ||
| 320 | { | ||
| 321 | bounds = call1 (Fsymbol_value (intern ("region-extract-function")), | ||
| 322 | intern ("bounds")); | ||
| 323 | |||
| 324 | while (CONSP (bounds)) | ||
| 325 | { | ||
| 326 | casify_region (CASE_DOWN, XCAR (XCAR (bounds)), XCDR (XCAR (bounds))); | ||
| 327 | bounds = XCDR (bounds); | ||
| 328 | } | ||
| 329 | } | ||
| 330 | else | ||
| 331 | casify_region (CASE_DOWN, beg, end); | ||
| 332 | |||
| 317 | return Qnil; | 333 | return Qnil; |
| 318 | } | 334 | } |
| 319 | 335 | ||