changeset 40396:894b9bc4ca7a

(syntax-ppss-stats): Be more robust when dividing by 0.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 28 Oct 2001 05:43:36 +0000
parents 704bd7bfd084
children fd8872e4b12c
files lisp/emacs-lisp/syntax.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/syntax.el	Sun Oct 28 04:48:16 2001 +0000
+++ b/lisp/emacs-lisp/syntax.el	Sun Oct 28 05:43:36 2001 +0000
@@ -92,7 +92,10 @@
 (defvar syntax-ppss-stats
   [(0 . 0.0) (0 . 0.0) (0 . 0.0) (0 . 0.0) (0 . 0.0) (1 . 2500.0)])
 (defun syntax-ppss-stats ()
-  (mapcar (lambda (x) (cons (car x) (truncate (/ (cdr x) (car x)))))
+  (mapcar (lambda (x)
+	    (condition-case nil
+		(cons (car x) (truncate (/ (cdr x) (car x))))
+	      (error nil)))
 	  syntax-ppss-stats))
 
 ;;;###autoload