emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108049: lisp/gnus/plstore.el: Fix


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108049: lisp/gnus/plstore.el: Fix buildbot failure with XEmacs
Date: Fri, 02 Nov 2012 02:01:21 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108049
author: Daiki Ueno <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2012-04-26 22:07:59 +0000
message:
  lisp/gnus/plstore.el: Fix buildbot failure with XEmacs
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/plstore.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-04-26 02:03:19 +0000
+++ b/lisp/gnus/ChangeLog       2012-04-26 22:07:59 +0000
@@ -1,5 +1,11 @@
 2012-04-26  Daiki Ueno  <address@hidden>
 
+       * plstore.el (plstore-called-interactively-p): New compat macro copied
+       from message.el.
+       (plstore-mode): Use it.
+
+2012-04-26  Daiki Ueno  <address@hidden>
+
        * plstore.el: Revive the editing feature.
        (plstore-mode): New mode to edit plstore file.
        (plstore-mode-toggle-display, plstore-mode-original)

=== modified file 'lisp/gnus/plstore.el'
--- a/lisp/gnus/plstore.el      2012-04-26 02:03:19 +0000
+++ b/lisp/gnus/plstore.el      2012-04-26 22:07:59 +0000
@@ -547,6 +547,18 @@
       (plstore-mode-original)
     (plstore-mode-decoded)))
 
+(eval-when-compile
+  (defmacro plstore-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)))))
+
 ;;;###autoload
 (define-derived-mode plstore-mode emacs-lisp-mode "PLSTORE"
   "Major mode for editing PLSTORE files."
@@ -554,7 +566,7 @@
   (add-hook 'write-contents-functions #'plstore--write-contents-functions)
   (define-key plstore-mode-map "\C-c\C-c" #'plstore-mode-toggle-display)
   ;; to create a new file with plstore-mode, mark it as already decoded
-  (if (called-interactively-p 'any)
+  (if (plstore-called-interactively-p 'any)
       (setq plstore-encoded t)
     (plstore-mode-decoded)))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]