From: Eric M. Ludlam Date: Thu, 3 Jun 2010 17:17:50 +0000 (-0400) Subject: Fix to semantic-lex-spp-table-write-slot-value (Bug#6324). X-Git-Tag: emacs-pretest-23.2.90~139^2~148 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=988b91ce8f6f84e03123bf7d3eb31f1c7ecbcef0;p=emacs.git Fix to semantic-lex-spp-table-write-slot-value (Bug#6324). * cedet/semantic/lex-spp.el (semantic-lex-spp-table-write-slot-value): Instead of erroring on invalid values during save, just save a nil (Bug#6324). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16111657832..aafa464461d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-06-03 Eric Ludlam + + * cedet/semantic/lex-spp.el + (semantic-lex-spp-table-write-slot-value): Instead of erroring on + invalid values during save, just save a nil (Bug#6324). + 2010-06-03 Glenn Morris * desktop.el (desktop-clear-preserve-buffers): diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index e76b8cdf5df..58ad681008c 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -1121,37 +1121,31 @@ The VALUE is a spp lexical table." (prin1 (car sym)) (let* ((first (car (cdr sym))) (rest (cdr sym))) - (when (not (listp first)) - (error "Error in macro \"%s\"" (car sym))) - (when (eq (car first) 'spp-arg-list) - (princ " ") - (prin1 first) - (setq rest (cdr rest)) - ) - - (when rest - (princ " . ") - (let ((len (length (cdr rest)))) - (cond ((< len 2) - (condition-case nil - (prin1 rest) - (error - (princ "nil ;; Error writing macro\n")))) - ((< len semantic-lex-spp-macro-max-length-to-save) - (princ "\n ") - (condition-case nil - (prin1 rest) - (error - (princ "nil ;; Error writing macro\n "))) - ) - (t ;; Too Long! - (princ "nil ;; Too Long!\n ") - )))) - ) - (princ ")\n ") - ) - (princ ")\n")) -) + (if (not (listp first)) + (insert "nil ;; bogus macro found.\n") + (when (eq (car first) 'spp-arg-list) + (princ " ") + (prin1 first) + (setq rest (cdr rest))) + + (when rest + (princ " . ") + (let ((len (length (cdr rest)))) + (cond ((< len 2) + (condition-case nil + (prin1 rest) + (error + (princ "nil ;; Error writing macro\n")))) + ((< len semantic-lex-spp-macro-max-length-to-save) + (princ "\n ") + (condition-case nil + (prin1 rest) + (error + (princ "nil ;; Error writing macro\n ")))) + (t ;; Too Long! + (princ "nil ;; Too Long!\n "))))))) + (princ ")\n ")) + (princ ")\n"))) ;;; MACRO TABLE DEBUG ;;