changeset 43529:7f72a2792acc

(shell-pcomplete-setup-done): New variable. (shell-pcomplete): Use it instead of shell-pcomplete-setup-p. (shell-pcomplete-reverse): Ditto.
author Kim F. Storm <storm@cua.dk>
date Mon, 25 Feb 2002 21:04:00 +0000
parents 788ea5463404
children aee3db99fcca
files lisp/shell.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Mon Feb 25 17:44:03 2002 +0000
+++ b/lisp/shell.el	Mon Feb 25 21:04:00 2002 +0000
@@ -858,13 +858,15 @@
 	(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 @@
 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)