Mercurial > emacs
comparison lisp/cedet/semantic/lex-spp.el @ 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 | 1d1d5d9bd884 |
children | a5ad4f188e19 |
comparison
equal
deleted
inserted
replaced
108933:b465aa3255ed | 108934:e039f2da3d28 |
---|---|
1119 (dolist (sym value) | 1119 (dolist (sym value) |
1120 (princ "(") | 1120 (princ "(") |
1121 (prin1 (car sym)) | 1121 (prin1 (car sym)) |
1122 (let* ((first (car (cdr sym))) | 1122 (let* ((first (car (cdr sym))) |
1123 (rest (cdr sym))) | 1123 (rest (cdr sym))) |
1124 (when (not (listp first)) | 1124 (if (not (listp first)) |
1125 (error "Error in macro \"%s\"" (car sym))) | 1125 (insert "nil ;; bogus macro found.\n") |
1126 (when (eq (car first) 'spp-arg-list) | 1126 (when (eq (car first) 'spp-arg-list) |
1127 (princ " ") | 1127 (princ " ") |
1128 (prin1 first) | 1128 (prin1 first) |
1129 (setq rest (cdr rest)) | 1129 (setq rest (cdr rest))) |
1130 ) | 1130 |
1131 | 1131 (when rest |
1132 (when rest | 1132 (princ " . ") |
1133 (princ " . ") | 1133 (let ((len (length (cdr rest)))) |
1134 (let ((len (length (cdr rest)))) | 1134 (cond ((< len 2) |
1135 (cond ((< len 2) | 1135 (condition-case nil |
1136 (condition-case nil | 1136 (prin1 rest) |
1137 (prin1 rest) | 1137 (error |
1138 (error | 1138 (princ "nil ;; Error writing macro\n")))) |
1139 (princ "nil ;; Error writing macro\n")))) | 1139 ((< len semantic-lex-spp-macro-max-length-to-save) |
1140 ((< len semantic-lex-spp-macro-max-length-to-save) | 1140 (princ "\n ") |
1141 (princ "\n ") | 1141 (condition-case nil |
1142 (condition-case nil | 1142 (prin1 rest) |
1143 (prin1 rest) | 1143 (error |
1144 (error | 1144 (princ "nil ;; Error writing macro\n ")))) |
1145 (princ "nil ;; Error writing macro\n "))) | 1145 (t ;; Too Long! |
1146 ) | 1146 (princ "nil ;; Too Long!\n "))))))) |
1147 (t ;; Too Long! | 1147 (princ ")\n ")) |
1148 (princ "nil ;; Too Long!\n ") | 1148 (princ ")\n"))) |
1149 )))) | |
1150 ) | |
1151 (princ ")\n ") | |
1152 ) | |
1153 (princ ")\n")) | |
1154 ) | |
1155 | 1149 |
1156 ;;; MACRO TABLE DEBUG | 1150 ;;; MACRO TABLE DEBUG |
1157 ;; | 1151 ;; |
1158 (defun semantic-lex-spp-describe (&optional buffer) | 1152 (defun semantic-lex-spp-describe (&optional buffer) |
1159 "Describe the current list of spp macros for BUFFER. | 1153 "Describe the current list of spp macros for BUFFER. |