emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/data.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/data.c,v
Date: Wed, 25 Jul 2007 21:03:25 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/07/25 21:03:25

Index: data.c
===================================================================
RCS file: /sources/emacs/emacs/src/data.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -b -r1.274 -r1.275
--- data.c      25 Jul 2007 06:24:57 -0000      1.274
+++ data.c      25 Jul 2007 21:03:24 -0000      1.275
@@ -750,15 +750,24 @@
      (cmd)
      Lisp_Object cmd;
 {
-  Lisp_Object fun = indirect_function (cmd);
-  Lisp_Object tmp;
+  Lisp_Object fun = indirect_function (cmd); /* Check cycles.  */
+  
+  if (NILP (fun) || EQ (fun, Qunbound))
+    return Qnil;
 
-  if (SYMBOLP (cmd)
       /* Use an `interactive-form' property if present, analogous to the
         function-documentation property. */
-      && (tmp = Fget (cmd, intern ("interactive-form")), !NILP (tmp)))
+  fun = cmd;
+  while (SYMBOLP (fun))
+    {
+      Lisp_Object tmp = Fget (fun, intern ("interactive-form"));
+      if (!NILP (tmp))
     return tmp;
-  else if (SUBRP (fun))
+      else
+       fun = Fsymbol_function (fun);
+    }
+
+  if (SUBRP (fun))
     {
       if (XSUBR (fun)->prompt)
        return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]