aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/syntax.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2001-10-28 05:43:36 +0000
committerStefan Monnier <[email protected]>2001-10-28 05:43:36 +0000
commite8ac59b819d6f88488f6b688b05a916c306c56b0 (patch)
tree2a464752281e0df853e5d3aa0ca29ba87bb5b43a /lisp/emacs-lisp/syntax.el
parent8259bf101d65c173629530ad9a9a12668a0b0e0a (diff)
(syntax-ppss-stats): Be more robust when dividing by 0.
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
-rw-r--r--lisp/emacs-lisp/syntax.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 0eef9671b4..f00c8752dd 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