]> git.eshelyaron.com Git - emacs.git/commitdiff
message.el (message-called-interactively-p): A temporary macro.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 25 Nov 2010 23:20:19 +0000 (23:20 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 25 Nov 2010 23:20:19 +0000 (23:20 +0000)
message.el (message-goto-body): Use it temporarily.

lisp/gnus/ChangeLog
lisp/gnus/message.el

index 1f1f4cb1f6500e1bca50fbb460b2af5c191bcab7..6f79bc2d2521dad13676c0b614b4aa495d77aaf1 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-25  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-called-interactively-p): A temporary macro.
+       (message-goto-body): Use it temporarily.
+
 2010-11-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnimap.el (nnimap-unfold-quoted-lines): Refactor out.
index bd6aa82b77ae1b4adb89ef251c2ed4dbff9a4800..1ee07a2d5eea0dc5eba3f59d1c2ddd805347a9e7 100644 (file)
@@ -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))