[gnus git] branch master updated: m0-5-181-gd6d90fb =1= 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.
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via d6d90fbbda04a990e100832c709d6c746d872aa3 (commit)
from a2a5a865a44c8146babf94345d4ff2a8a744440a (commit)
- Log -----------------------------------------------------------------
commit d6d90fbbda04a990e100832c709d6c746d872aa3
Author: Katsumi Yamaoka <[email protected]>
Date: Thu Dec 6 04:27:37 2012 +0000
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.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0af3ca7..9a3c1a3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,20 @@
+2012-12-05 Katsumi Yamaoka <[email protected]>
+
+ * 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.
+
2012-12-05 Sam Steingold <[email protected]>
* gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
diff --git a/lisp/gmm-utils.el b/lisp/gmm-utils.el
index 91e4965..ef60713 100644
--- a/lisp/gmm-utils.el
+++ b/lisp/gmm-utils.el
@@ -417,6 +417,18 @@ coding-system."
(write-region start end filename append visit lockname))
(write-region start end filename append visit lockname mustbenew)))
+;; `interactive-p' is obsolete since Emacs 23.2.
+(defmacro gmm-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))))
+
;; `flet' and `labels' are obsolete since Emacs 24.3.
(defmacro gmm-flet (bindings &rest body)
"Make temporary overriding function definitions.
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 6e8bef8..e25308d 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -2719,7 +2719,7 @@ If READ-CHARSET, ask for a coding system."
(while (re-search-forward
"\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
(replace-match "\\1\\3" t)))
- (when (interactive-p)
+ (when (gmm-called-interactively-p 'any)
(gnus-treat-article nil))))
(defun article-wash-html ()
diff --git a/lisp/gnus-bookmark.el b/lisp/gnus-bookmark.el
index 9f6654d..e447322 100644
--- a/lisp/gnus-bookmark.el
+++ b/lisp/gnus-bookmark.el
@@ -367,7 +367,7 @@ The leftmost column displays a D if the bookmark is flagged for
deletion, or > if it is flagged for displaying."
(interactive)
(gnus-bookmark-maybe-load-default-file)
- (if (interactive-p)
+ (if (gmm-called-interactively-p 'any)
(switch-to-buffer (get-buffer-create "*Gnus Bookmark List*"))
(set-buffer (get-buffer-create "*Gnus Bookmark List*")))
(let ((inhibit-read-only t)
diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el
index 71e0096..5e20f5f 100644
--- a/lisp/gnus-registry.el
+++ b/lisp/gnus-registry.el
@@ -982,7 +982,7 @@ only the last one's marks are returned."
(let* ((article (last articles))
(id (gnus-registry-fetch-message-id-fast article))
(marks (when id (gnus-registry-get-id-key id 'mark))))
- (when (interactive-p)
+ (when (gmm-called-interactively-p 'any)
(gnus-message 1 "Marks are %S" marks))
marks))
diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el
index f7a507f..4a47b73 100644
--- a/lisp/gnus-score.el
+++ b/lisp/gnus-score.el
@@ -1723,7 +1723,8 @@ score in `gnus-newsgroup-scored' by SCORE."
((mm-text-parts
(handle)
(cond ((stringp (car handle))
- (let ((parts (mapcan #'mm-text-parts (cdr handle))))
+ (let ((parts (apply #'append
+ (mapcar #'mm-text-parts (cdr handle)))))
(if (equal "multipart/alternative" (car handle))
;; pick the first supported alternative
(list (car parts))
@@ -1733,7 +1734,7 @@ score in `gnus-newsgroup-scored' by SCORE."
(when (string-match "^text/" (mm-handle-media-type handle))
(list handle)))
- (t (mapcan #'mm-text-parts handle))))
+ (t (apply #'append (mapcar #'mm-text-parts handle)))))
(my-mm-display-part
(handle)
(when handle
diff --git a/lisp/message.el b/lisp/message.el
index 32d0edf..9cd0a4d 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -3181,22 +3181,10 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
(push-mark)
(message-position-on-field "Summary" "Subject"))
-(eval-when-compile
- (defmacro message-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 message-goto-body ()
"Move point to the beginning of the message body."
(interactive)
- (when (and (message-called-interactively-p 'any)
+ (when (and (gmm-called-interactively-p 'any)
(looking-at "[ \t]*\n"))
(expand-abbrev))
(push-mark)
diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el
index 04f90ee..9165e41 100644
--- a/lisp/spam-stat.el
+++ b/lisp/spam-stat.el
@@ -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))
diff --git a/lisp/spam.el b/lisp/spam.el
index c3be15a..c9030f1 100644
--- a/lisp/spam.el
+++ b/lisp/spam.el
@@ -2092,7 +2092,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(declare-function gnus-extract-address-components "gnus-util" (from))
(eval-and-compile
- (when (condition-case nil
+ (condition-case nil
(progn
(require 'bbdb)
(require 'bbdb-com))
@@ -2106,8 +2106,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(defalias 'spam-enter-ham-BBDB 'ignore)
(defalias 'spam-exists-in-BBDB-p 'ignore)
(defalias 'bbdb-gethash 'ignore)
- nil))
+ nil)))
+(eval-when-compile
+ (when (featurep 'bbdb-com)
;; when the BBDB changes, we want to clear out our cache
(defun spam-clear-cache-BBDB (&rest immaterial)
(spam-clear-cache 'spam-use-BBDB))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 17 +++++++++++++++++
lisp/gmm-utils.el | 12 ++++++++++++
lisp/gnus-art.el | 2 +-
lisp/gnus-bookmark.el | 2 +-
lisp/gnus-registry.el | 2 +-
lisp/gnus-score.el | 5 +++--
lisp/message.el | 14 +-------------
lisp/spam-stat.el | 14 +++++++++++++-
lisp/spam.el | 34 ++++++++++++++++++----------------
9 files changed, 67 insertions(+), 35 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project