]> code.delx.au - gnu-emacs/commitdiff
(shell-pcomplete-setup-done): New variable.
authorKim F. Storm <storm@cua.dk>
Mon, 25 Feb 2002 21:04:00 +0000 (21:04 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 25 Feb 2002 21:04:00 +0000 (21:04 +0000)
(shell-pcomplete): Use it instead of shell-pcomplete-setup-p.
(shell-pcomplete-reverse): Ditto.

lisp/shell.el

index a57106a82fd5fd9cd5f614f101b2187029b3587f..7aad026343e1bc0a6e22ae7ececfb7085fc0fc3d 100644 (file)
@@ -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)