emacs-diffs
[Top][All Lists]
Advanced

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

master bc5da2c: Avoid some uses of obsolete function interactive-p


From: Stefan Kangas
Subject: master bc5da2c: Avoid some uses of obsolete function interactive-p
Date: Sun, 23 Aug 2020 22:28:55 -0400 (EDT)

branch: master
commit bc5da2c3fb882a2df9d358e5b82869ab48a04d9a
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Avoid some uses of obsolete function interactive-p
    
    * 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               |  3 ++-
 lisp/cedet/data-debug.el            |  2 +-
 lisp/emacs-lisp/edebug.el           |  2 +-
 test/manual/cedet/cedet-utests.el   | 12 ++++++------
 test/manual/cedet/semantic-tests.el |  4 ++--
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 9b3c4fc..d4505d5 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -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
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el
index 604fc40..44cce38 100644
--- a/lisp/cedet/data-debug.el
+++ b/lisp/cedet/data-debug.el
@@ -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))
 
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index d9bbf61..7ff6d68 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -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)))
 
diff --git a/test/manual/cedet/cedet-utests.el 
b/test/manual/cedet/cedet-utests.el
index 124b499..ee6be43 100644
--- a/test/manual/cedet/cedet-utests.el
+++ b/test/manual/cedet/cedet-utests.el
@@ -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)
diff --git a/test/manual/cedet/semantic-tests.el 
b/test/manual/cedet/semantic-tests.el
index 53552be..a0899cb 100644
--- a/test/manual/cedet/semantic-tests.el
+++ b/test/manual/cedet/semantic-tests.el
@@ -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)))



reply via email to

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