aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Gutov2015-11-14 13:02:35 +0200
committerDmitry Gutov2015-11-14 13:02:35 +0200
commitf234fc2cb319de1e5e2eca1a84450ec220ce7955 (patch)
tree37134b43d4270bf955757a7c7f571756b493c7a8 /src
parent4d71d2471aaf341791fd728287bf8db62aebb3ba (diff)
parent138ad3d93b7abe08ac399f582aa6c8aac869e17e (diff)
downloademacs-f234fc2cb319de1e5e2eca1a84450ec220ce7955.tar.gz
emacs-f234fc2cb319de1e5e2eca1a84450ec220ce7955.zip
Merge branch 'master' into emacs-25
Diffstat (limited to 'src')
-rw-r--r--src/casefiddle.c22
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
309DEFUN ("downcase-region", Fdowncase_region, Sdowncase_region, 2, 2, "r", 309DEFUN ("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.
311These arguments specify the starting and ending character numbers of 312These arguments specify the starting and ending character numbers of
312the region to operate on. When used as a command, the text between 313the region to operate on. When used as a command, the text between
313point and the mark is operated on. */) 314point 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