]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-user-define-edit): Don't find substring of nil.
authorJay Belanger <jay.p.belanger@gmail.com>
Thu, 26 May 2005 12:24:05 +0000 (12:24 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Thu, 26 May 2005 12:24:05 +0000 (12:24 +0000)
lisp/calc/calc-prog.el

index 230b0f6a6c55cc51001b5a1bfd40b8a9bdf521df..0a24fbf574cd03d2b703eb998edd14555ba98f34 100644 (file)
                               (get func 'calc-user-defn)))
                     (kys (concat "z" (char-to-string (car def))))
                     (intcmd (symbol-name (cdr def)))
-                    (algcmd (substring (symbol-name func) 9)))
+                    (algcmd (if func (substring (symbol-name func) 9) "")))
               (if (and defn (calc-valid-formula-func func))
                   (let ((niceexpr (math-format-nice-expr defn (frame-width))))
                     (calc-wrapper