summaryrefslogtreecommitdiff
path: root/lisp/completion.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/completion.el')
-rw-r--r--lisp/completion.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/completion.el b/lisp/completion.el
index b29a325f732..a8080ac8f5a 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -1311,7 +1311,7 @@ The completion is altered appropriately if NUM-USES and/or LAST-USE-TIME
are specified."
(interactive (interactive-completion-string-reader "Completion to add"))
(check-completion-length string)
- (let* ((current-completion-source (if (interactive-p)
+ (let* ((current-completion-source (if (called-interactively-p 'interactive)
cmpl-source-interactive
current-completion-source))
(entry (add-completion-to-head string)))
@@ -1324,7 +1324,7 @@ are specified."
"Add STRING if it isn't already listed, and mark it permanent."
(interactive
(interactive-completion-string-reader "Completion to add permanently"))
- (let ((current-completion-source (if (interactive-p)
+ (let ((current-completion-source (if (called-interactively-p 'interactive)
cmpl-source-interactive
current-completion-source)))
(add-completion string nil t)))