]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid some uses of obsolete function interactive-p
authorStefan Kangas <stefankangas@gmail.com>
Sat, 8 Aug 2020 03:32:37 +0000 (05:32 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 24 Aug 2020 02:27:27 +0000 (04:27 +0200)
* doc/lispref/help.texi (Accessing Documentation):
* lisp/cedet/data-debug.el:
* lisp/emacs-lisp/edebug.el (edebug-wrap-def-body):
* lisp/simple.el (append-next-kill):
* test/manual/cedet/cedet-utests.el (cedet-utest, pulse-test):
* test/manual/cedet/semantic-tests.el (semantic-lex-spp-write-utest)
(semantic-symref-test-count-hits-in-tag): Use 'called-interactively-p'
instead of obsolete function 'interactive-p'.

doc/lispref/help.texi
lisp/cedet/data-debug.el
lisp/emacs-lisp/edebug.el
test/manual/cedet/cedet-utests.el
test/manual/cedet/semantic-tests.el

index 9b3c4fcb23d13eeeed293eddb7bf794e33d7018c..d4505d5c3ff81bbd5fe7370f4e79ab7a188e89f9 100644 (file)
@@ -220,7 +220,8 @@ in the *Help* buffer."
 
 @group
     ;; @r{Display the data.}
-    (help-setup-xref (list 'describe-symbols pattern) (interactive-p))
+    (help-setup-xref (list 'describe-symbols pattern)
+                 (called-interactively-p 'interactive))
     (with-help-window (help-buffer)
       (mapcar describe-func (sort sym-list 'string<)))))
 @end group
index 604fc40926c8ed19cf21f653ab72da9c5fecf0a8..44cce389cb3cef25d24934cf16b4a276c0550267 100644 (file)
@@ -38,7 +38,7 @@
 ;;   "Calculate something complicated at point, and return it."
 ;;   (interactive) ;; function not normally interactive
 ;;   (let ((stuff (do-stuff)))
-;;     (when (interactive-p)
+;;     (when (called-interactively-p 'interactive)
 ;;       (data-debug-show-stuff stuff "myStuff"))
 ;;     stuff))
 
index d9bbf6129c64418ddf1da48a1fc4f9bf9f04cf06..7ff6d68c3ecd9cf3a82a6e9139c6bd59be6e8f25 100644 (file)
@@ -1229,7 +1229,7 @@ purpose by adding an entry to this alist, and setting
   "Wrap the FORMS of a definition body."
   (if edebug-def-interactive
       `(let ((,(edebug-interactive-p-name)
-             (interactive-p)))
+             (called-interactively-p 'interactive)))
         ,(edebug-make-enter-wrapper forms))
     (edebug-make-enter-wrapper forms)))
 
index 124b49907d808e67af19c5824f407a218da6b0a6..ee6be438dd316652fa5306a863139cc8316eac91 100644 (file)
@@ -150,7 +150,7 @@ of just logging the error."
       ;; Cleanup stray input and events that are in the way.
       ;; Not doing this causes sit-for to not refresh the screen.
       ;; Doing this causes the user to need to press keys more frequently.
-      (when (and (interactive-p) (input-pending-p))
+      (when (and (called-interactively-p 'interactive) (input-pending-p))
        (if (fboundp 'read-event)
            (read-event)
          (read-char)))
@@ -497,11 +497,11 @@ When optional NO-ERROR don't throw an error if we can't run tests."
        (error (concat "Pulse test only works on versions of Emacs"
                       " that support pulsing")))
     ;; Run the tests
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "<Press a key> Pulse one line.")
       (read-char))
     (pulse-momentary-highlight-one-line (point))
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "<Press a key> Pulse a region.")
       (read-char))
     (pulse-momentary-highlight-region (point)
@@ -510,11 +510,11 @@ When optional NO-ERROR don't throw an error if we can't run tests."
                                            (forward-char 30)
                                          (error nil))
                                        (point)))
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "<Press a key> Pulse line a specific color.")
       (read-char))
     (pulse-momentary-highlight-one-line (point) 'mode-line)
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "<Press a key> Pulse a pre-existing overlay.")
       (read-char))
     (let* ((start (point-at-bol))
@@ -530,7 +530,7 @@ When optional NO-ERROR don't throw an error if we can't run tests."
          (delete-overlay o)
        (error "Non-temporary overlay was deleted!"))
       )
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "Done!"))))
 
 (provide 'cedet-utests)
index 53552be06b20d893069d863533d4e73f9fc3c830..a0899cb9326f5deb7f5535004f0f35e497ecedc6 100644 (file)
@@ -235,7 +235,7 @@ Analyze the area between BEG and END."
       (set-buffer buff)
       (semantic-lex-spp-write-test)
       (kill-buffer buff)
-      (when (not (interactive-p))
+      (when (not (called-interactively-p 'interactive))
         (kill-buffer "*SPP Write Test*"))
       )))
 
@@ -276,7 +276,7 @@ tag that contains point, and return that."
        target (lambda (start end prefix) (setq Lcount (1+ Lcount)))
        (semantic-tag-start tag)
        (semantic-tag-end tag))
-      (when (interactive-p)
+      (when (called-interactively-p 'interactive)
        (message "Found %d occurrences of %s in %.2f seconds"
                 Lcount (semantic-tag-name target)
                 (semantic-elapsed-time start nil)))