summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2002-02-25 21:04:00 +0000
committerKim F. Storm <storm@cua.dk>2002-02-25 21:04:00 +0000
commit86078cf0609c65575a543ddcdd28f791b87988a0 (patch)
tree8391af619520b413674b7bedfc549c114961bfe1 /lisp/shell.el
parente4d03691de36a4b44508225c87a5d23ad8e93b61 (diff)
downloademacs-86078cf0609c65575a543ddcdd28f791b87988a0.tar.gz
(shell-pcomplete-setup-done): New variable.
(shell-pcomplete): Use it instead of shell-pcomplete-setup-p. (shell-pcomplete-reverse): Ditto.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index a57106a82fd..7aad026343e 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -858,13 +858,15 @@ See `shell-command-regexp'."
(progn (goto-char (match-beginning 1))
(skip-chars-forward ";&|")))))
+(defvar shell-pcomplete-setup-done nil)
+
(defun shell-pcomplete ()
"Cycle forwards through completions at point, using `pcomplete'.
This function merely invokes `pcomplete', after ensuring this buffer
is set up for it."
(interactive)
- (unless (prog1 shell-pcomplete-setup-p
- (setq shell-pcomplete-setup-p t))
+ (unless shell-pcomplete-setup-done
+ (setq shell-pcomplete-setup-done t)
(pcomplete-comint-setup 'shell-dynamic-complete-functions))
;; Convince pcomplete we are calling it directly
(setq this-command 'pcomplete)
@@ -875,8 +877,8 @@ is set up for it."
This function merely invokes `pcomplete-reverse', after ensuring this
buffer is set up for it."
(interactive)
- (unless (prog1 shell-pcomplete-setup-p
- (setq shell-pcomplete-setup-p t))
+ (unless shell-pcomplete-setup-done
+ (setq shell-pcomplete-setup-done t)
(pcomplete-comint-setup 'shell-dynamic-complete-functions))
;; Convince pcomplete we are calling it directly
(setq this-command 'pcomplete-reverse)