mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(syntax-ppss-stats): Be more robust when dividing by 0.
This commit is contained in:
parent
8259bf101d
commit
e8ac59b819
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue