mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
gmm-utils.el (gmm-called-interactively-p): Restore as a macro.
gnus-art.el (article-unsplit-urls) gnus-bookmark.el (gnus-bookmark-bmenu-list) gnus-registry.el (gnus-registry-get-article-marks) message.el (message-goto-body): Use it. (message-called-interactively-p): Remove. spam-stat.el (spam-stat-called-interactively-p): New macro. (spam-stat-score-buffer): Use it. spam.el: Silence the warnings against BBDB functions when compiling. gnus-score.el (gnus-score-decode-text-parts): Use append+mapcar instead of the cl function mapcan.
This commit is contained in:
parent
9ad948e2fd
commit
da9462398a
9 changed files with 64 additions and 34 deletions
|
|
@ -494,6 +494,18 @@ where DIFF is the difference between SCORE and 0.5."
|
|||
(setcdr (nthcdr 14 result) nil)
|
||||
result))
|
||||
|
||||
(eval-when-compile
|
||||
(defmacro spam-stat-called-interactively-p (kind)
|
||||
(condition-case nil
|
||||
(progn
|
||||
(eval '(called-interactively-p 'any))
|
||||
;; Emacs >=23.2
|
||||
`(called-interactively-p ,kind))
|
||||
;; Emacs <23.2
|
||||
(wrong-number-of-arguments '(called-interactively-p))
|
||||
;; XEmacs
|
||||
(void-function '(interactive-p)))))
|
||||
|
||||
(defun spam-stat-score-buffer ()
|
||||
"Return a score describing the spam-probability for this buffer.
|
||||
Add user supplied modifications if supplied."
|
||||
|
|
@ -511,7 +523,7 @@ Add user supplied modifications if supplied."
|
|||
(error nil)))
|
||||
(ans
|
||||
(if score1s (+ score0 score1s) score0)))
|
||||
(when (interactive-p)
|
||||
(when (spam-stat-called-interactively-p 'any)
|
||||
(message "%S" ans))
|
||||
ans))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue