diff lisp/allout.el @ 105372:bd2966850aac

Use `called-interactively-p' instead of `interactive-p'.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 02 Oct 2009 03:48:36 +0000
parents f8ba8d6fd250
children 009383a57ce8
line wrap: on
line diff
--- a/lisp/allout.el	Fri Oct 02 00:02:02 2009 +0000
+++ b/lisp/allout.el	Fri Oct 02 03:48:36 2009 +0000
@@ -1590,7 +1590,7 @@
 \(allout-init t)"
 
   (interactive)
-  (if (interactive-p)
+  (if (called-interactively-p 'interactive)
       (progn
 	(setq mode
 	      (completing-read
@@ -1614,7 +1614,7 @@
     (cond ((not mode)
 	   (set find-file-hook-var-name
                 (delq hook (symbol-value find-file-hook-var-name)))
-	   (if (interactive-p)
+	   (if (called-interactively-p 'interactive)
 	       (message "Allout outline mode auto-activation inhibited.")))
 	  ((eq mode 'report)
 	   (if (not (memq hook (symbol-value find-file-hook-var-name)))
@@ -2901,7 +2901,7 @@
   (let ((bol-point (point)))
     (if (allout-goto-prefix-doublechecked)
         (if (<= (point) bol-point)
-            (if (interactive-p)
+            (if (called-interactively-p 'interactive)
                 (allout-end-of-prefix)
               (point))
           (goto-char (point-min))
@@ -2968,7 +2968,7 @@
         (goto-char allout-recent-prefix-end)
       (goto-char (point-min)))
     (allout-end-of-prefix)
-    (if (and (interactive-p)
+    (if (and (called-interactively-p 'interactive)
 	     (= (point) start-point))
 	(goto-char (allout-current-bullet-pos)))))
 ;;;_   > allout-end-of-entry (&optional inclusive)
@@ -3018,7 +3018,7 @@
         (while (and (< depth allout-recent-depth)
                     (setq last-ascended (allout-ascend))))
         (goto-char allout-recent-prefix-beginning)
-        (if (interactive-p) (allout-end-of-prefix))
+        (if (called-interactively-p 'interactive) (allout-end-of-prefix))
         (and last-ascended allout-recent-depth))))
 ;;;_   > allout-ascend ()
 (defun allout-ascend (&optional dont-move-if-unsuccessful)
@@ -3046,7 +3046,7 @@
                    (goto-char bolevel)
                    (allout-depth)
                    nil))))
-    (if (interactive-p) (allout-end-of-prefix))))
+    (if (called-interactively-p 'interactive) (allout-end-of-prefix))))
 ;;;_   > allout-descend-to-depth (depth)
 (defun allout-descend-to-depth (depth)
   "Descend to depth DEPTH within current topic.
@@ -3074,7 +3074,7 @@
     (if (not (allout-ascend))
         (progn (goto-char start-point)
                (error "Can't ascend past outermost level"))
-      (if (interactive-p) (allout-end-of-prefix))
+      (if (called-interactively-p 'interactive) (allout-end-of-prefix))
       allout-recent-prefix-beginning)))
 
 ;;;_  - Linear
@@ -3219,7 +3219,7 @@
   (let ((depth (allout-depth)))
     (while (allout-previous-sibling depth nil))
     (prog1 allout-recent-depth
-      (if (interactive-p) (allout-end-of-prefix)))))
+      (if (called-interactively-p 'interactive) (allout-end-of-prefix)))))
 ;;;_   > allout-next-visible-heading (arg)
 (defun allout-next-visible-heading (arg)
   "Move to the next ARG'th visible heading line, backward if arg is negative.
@@ -3272,7 +3272,7 @@
 matches)."
   (interactive "p")
   (prog1 (allout-next-visible-heading (- arg))
-    (if (interactive-p) (allout-end-of-prefix))))
+    (if (called-interactively-p 'interactive) (allout-end-of-prefix))))
 ;;;_   > allout-forward-current-level (arg)
 (defun allout-forward-current-level (arg)
   "Position point at the next heading of the same level.
@@ -3293,7 +3293,7 @@
                     (allout-previous-sibling)
                   (allout-next-sibling)))
       (setq arg (1- arg)))
-    (if (not (interactive-p))
+    (if (not (called-interactively-p 'interactive))
         nil
       (allout-end-of-prefix)
       (if (not (zerop arg))
@@ -3306,7 +3306,7 @@
 (defun allout-backward-current-level (arg)
   "Inverse of `allout-forward-current-level'."
   (interactive "p")
-  (if (interactive-p)
+  (if (called-interactively-p 'interactive)
       (let ((current-prefix-arg (* -1 arg)))
 	(call-interactively 'allout-forward-current-level))
     (allout-forward-current-level (* -1 arg))))
@@ -4845,7 +4845,7 @@
                  (to-reveal (or (allout-chart-to-reveal chart chart-level)
                                 ;; interactive, show discontinuous children:
                                 (and chart
-                                     (interactive-p)
+                                     (called-interactively-p 'interactive)
                                      (save-excursion
                                        (allout-back-to-current-heading)
                                        (setq depth (allout-current-depth))