Mercurial > emacs
changeset 108934:e039f2da3d28
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).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 03 Jun 2010 13:17:50 -0400 |
parents | b465aa3255ed |
children | 44a0c766b765 |
files | lisp/ChangeLog lisp/cedet/semantic/lex-spp.el |
diffstat | 2 files changed, 30 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jun 03 17:34:35 2010 +0200 +++ b/lisp/ChangeLog Thu Jun 03 13:17:50 2010 -0400 @@ -1,3 +1,9 @@ +2010-06-03 Eric Ludlam <zappo@gnu.org> + + * 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 <rgm@gnu.org> * desktop.el (desktop-clear-preserve-buffers):
--- a/lisp/cedet/semantic/lex-spp.el Thu Jun 03 17:34:35 2010 +0200 +++ b/lisp/cedet/semantic/lex-spp.el Thu Jun 03 13:17:50 2010 -0400 @@ -1121,37 +1121,31 @@ (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)) - ) + (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")) -) + (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 ;;