From 443ecb08cdd0691a8b5e7cfa203b5d5707c94f0b Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 25 Nov 2010 23:20:19 +0000 Subject: [PATCH] message.el (message-called-interactively-p): A temporary macro. message.el (message-goto-body): Use it temporarily. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/message.el | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1f1f4cb1f65..6f79bc2d252 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-11-25 Katsumi Yamaoka + + * message.el (message-called-interactively-p): A temporary macro. + (message-goto-body): Use it temporarily. + 2010-11-25 Lars Magne Ingebrigtsen * nnimap.el (nnimap-unfold-quoted-lines): Refactor out. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index bd6aa82b77a..1ee07a2d5ee 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3047,10 +3047,22 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (interactive) (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 (called-interactively-p 'any) + (when (and (message-called-interactively-p 'any) (looking-at "[ \t]*\n")) (expand-abbrev)) (goto-char (point-min))