From: Jay Belanger Date: Mon, 19 May 2008 02:42:28 +0000 (+0000) Subject: (calc-get-register): Fix problem when the Calc register is empty. X-Git-Tag: emacs-pretest-23.0.90~5442 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2e4daa0e05fd40231760e7a820a140ee77868b21;p=emacs.git (calc-get-register): Fix problem when the Calc register is empty. --- diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index e1e83abe70c..65bec46db8e 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -156,9 +156,9 @@ in which case either return the contents of the Emacs register (if it is 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))))