Commit 8f36167a authored by Colin Walters's avatar Colin Walters
Browse files

(toplevel): Revert previous change to use pcomplete.

(shell-mode): Ditto.
(shell-pcomplete-setup-done): Remove.
(shell-pcomplete): Ditto.
(shell-pcomplete-reverse): Ditto.
parent 22c663ed
......@@ -310,8 +310,7 @@ Thus, this does not include the shell's current directory.")
(setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map))
(define-key shell-mode-map "\C-c\C-f" 'shell-forward-command)
(define-key shell-mode-map "\C-c\C-b" 'shell-backward-command)
(define-key shell-mode-map "\t" 'shell-pcomplete)
(define-key shell-mode-map "\M-\t" 'shell-pcomplete-reverse)
(define-key shell-mode-map "\t" 'comint-dynamic-complete)
(define-key shell-mode-map "\M-?"
'comint-dynamic-list-filename-completions)
(define-key shell-mode-map [menu-bar completion]
......@@ -398,6 +397,7 @@ buffer."
(setq comint-delimiter-argument-list shell-delimiter-argument-list)
(setq comint-file-name-chars shell-file-name-chars)
(setq comint-file-name-quote-list shell-file-name-quote-list)
(setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
(make-local-variable 'paragraph-start)
(setq paragraph-start comint-prompt-regexp)
(make-local-variable 'font-lock-defaults)
......@@ -858,32 +858,6 @@ 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 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)
(call-interactively #'pcomplete))
(defun shell-pcomplete-reverse ()
"Cycle backwards through completions at point, using `pcomplete'.
This function merely invokes `pcomplete-reverse', after ensuring this
buffer is set up for it."
(interactive)
(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)
(call-interactively #'pcomplete-reverse))
(defun shell-dynamic-complete-command ()
"Dynamically complete the command at point.
This function is similar to `comint-dynamic-complete-filename', except that it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment