]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/marker.c (Fcopy_marker): Make the first arg optional.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Aug 2010 12:47:49 +0000 (14:47 +0200)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Aug 2010 12:47:49 +0000 (14:47 +0200)
src/ChangeLog
src/marker.c

index 4e4f96786d9a2cdaf77d9b0b374577aa4a4d7d89..fe97d576b9cfd6126a9fc73f0cbd62bd1922f238 100644 (file)
@@ -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
index 911d2e57706701ea16a0d7056ed53300f6c5e0cb..b5ea80562df19c781cf12fc10c1a8cdcf22b0af8 100644 (file)
@@ -806,16 +806,18 @@ marker_byte_position (Lisp_Object marker)
   return i;
 }
 \f
-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 ();