1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-14 16:50:58 +00:00

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'.
This commit is contained in:
Stefan Kangas 2020-08-08 05:32:37 +02:00
parent 326fdb9ec0
commit bc5da2c3fb
5 changed files with 12 additions and 11 deletions

View 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

View 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))

View 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)))

View 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)

View 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)))