changeset 110033:2c9ea5d32862

* src/marker.c (Fcopy_marker): Make the first arg optional.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 30 Aug 2010 14:47:49 +0200
parents fcae870dab3a
children c87f89486bb7
files src/ChangeLog src/marker.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Aug 30 06:44:58 2010 +0000
+++ b/src/ChangeLog	Mon Aug 30 14:47:49 2010 +0200
@@ -1,3 +1,7 @@
+2010-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* marker.c (Fcopy_marker): Make the first arg optional.
+
 2010-08-30  Kenichi Handa  <handa@m17n.org>
 
 	* composite.c (composition_update_it): Fix computing of
--- a/src/marker.c	Mon Aug 30 06:44:58 2010 +0000
+++ b/src/marker.c	Mon Aug 30 14:47:49 2010 +0200
@@ -806,16 +806,18 @@
   return i;
 }
 
-DEFUN ("copy-marker", Fcopy_marker, Scopy_marker, 1, 2, 0,
+DEFUN ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0,
        doc: /* Return a new marker pointing at the same place as MARKER.
 If argument is a number, makes a new marker pointing
 at that position in the current buffer.
+If MARKER is not specified, the new marker does not point anywhere.
 The optional argument TYPE specifies the insertion type of the new marker;
 see `marker-insertion-type'.  */)
   (register Lisp_Object marker, Lisp_Object type)
 {
   register Lisp_Object new;
 
+  if (!NILP (marker))
   CHECK_TYPE (INTEGERP (marker) || MARKERP (marker), Qinteger_or_marker_p, marker);
 
   new = Fmake_marker ();