From: Stefan Monnier Date: Sun, 28 Oct 2001 05:43:36 +0000 (+0000) Subject: (syntax-ppss-stats): Be more robust when dividing by 0. X-Git-Tag: ttn-vms-21-2-B4~19088 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8ac59b819d6f88488f6b688b05a916c306c56b0;p=emacs.git (syntax-ppss-stats): Be more robust when dividing by 0. --- diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 0eef9671b46..f00c8752dd4 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -92,7 +92,10 @@ point (where the PPSS is equivalent to nil).") (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