When I do C-h a RET, I get an "Arithmetic error" due to a division by
zero in `apropos-score-doc'. The patch below fixes this bug. If
nobody objects, I'll commit it in a few days.
Lute.
*** lisp/apropos.el 17 Dec 2004 15:17:22 -0000 1.100
--- lisp/apropos.el 11 Feb 2005 12:55:01 -0000
***************
*** 322,334 ****
(defun apropos-score-doc (doc)
"Return apropos score for documentation string DOC."
! (if doc
! (let ((score 0)
! (l (length doc))
! i)
! (dolist (s (apropos-calc-scores doc apropos-all-words) score)
! (setq score (+ score 50 (/ (* (- l s) 50) l)))))
! 0))
(defun apropos-score-symbol (symbol &optional weight)
"Return apropos score for SYMBOL."
--- 322,334 ----
(defun apropos-score-doc (doc)
"Return apropos score for documentation string DOC."
! (let ((l (length doc)))
! (if (> l 0)
! (let ((score 0)
! i)
! (dolist (s (apropos-calc-scores doc apropos-all-words) score)
! (setq score (+ score 50 (/ (* (- l s) 50) l)))))
! 0)))
(defun apropos-score-symbol (symbol &optional weight)
"Return apropos score for SYMBOL."
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug