changeset 95097:f42ba0f30bed

(calc-get-register): Fix problem when the Calc register is empty.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 19 May 2008 02:42:28 +0000
parents 6f67ecdd34a2
children a49a51d08db3
files lisp/calc/calc-yank.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-yank.el	Mon May 19 02:18:24 2008 +0000
+++ b/lisp/calc/calc-yank.el	Mon May 19 02:42:28 2008 +0000
@@ -156,9 +156,9 @@
 text) or `nil'."
   (let ((cval (cdr (assq reg calc-register-alist)))
         (val (cdr (assq reg register-alist))))
-    (if (and (stringp (car cval))
-             (stringp val))
-        (if (string= (car cval) val)
+    (if (stringp val)
+        (if (and (stringp (car cval))
+                 (string= (car cval) val))
             (cdr cval)
           val))))