From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: Colin Walters Newsgroups: gmane.emacs.devel Subject: Re: using pcomplete for comint.el/shell.el Date: 18 Feb 2002 16:55:21 -0500 Message-ID: <1014069321.6751.133.camel@space-ghost> References: <1013730609.754.60.camel@space-ghost> <200202162155.g1GLtP209864@aztec.santafe.edu> <1013906606.32274.59.camel@space-ghost> <200202172249.g1HMno412827@santafe.santafe.edu> NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-4m0cXYEVIc9/FKtaRGfE" X-Trace: quimby2.netfonds.no 1014070808 13285 195.204.10.66 (18 Feb 2002 22:20:08 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 18 Feb 2002 22:20:08 GMT Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16cw8l-0003SB-00 for ; Mon, 18 Feb 2002 23:20:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16cvvY-0007IX-00; Mon, 18 Feb 2002 17:06:28 -0500 Original-Received: from monk.debian.net ([216.185.54.61] helo=monk.verbum.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16cvq8-000742-00 for ; Mon, 18 Feb 2002 17:00:52 -0500 Original-Received: from space-ghost.verbum.private (freedom.cis.ohio-state.edu [164.107.60.183]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "space-ghost.verbum.org", Issuer "monk.verbum.org" (verified OK)) by monk.verbum.org (Postfix (Debian/GNU)) with ESMTP id D41CC740009E for ; Mon, 18 Feb 2002 17:00:46 -0500 (EST) Original-Received: by space-ghost.verbum.private (Postfix (Debian/GNU), from userid 1000) id 485F38FBFC6; Mon, 18 Feb 2002 16:55:22 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: <200202172249.g1HMno412827@santafe.santafe.edu> X-Mailer: Evolution/1.0 (Preview Release) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1299 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1299 --=-4m0cXYEVIc9/FKtaRGfE Content-Type: text/plain Content-Transfer-Encoding: 7bit Well, it turns out that we can't really take the approach of creating a proxy function for pcomplete in shell.el, because pcomplete looks at last-command to determine its behavior. So, is there any objection to just loading pcomplete with shell.el? --=-4m0cXYEVIc9/FKtaRGfE Content-Disposition: attachment; filename=shell.patch Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1 --- shell.el.~1.105.~ Mon Dec 3 12:24:41 2001 +++ shell.el Mon Feb 18 16:47:59 2002 @@ -104,6 +104,7 @@ ;;; Code: =20 (require 'comint) +(require 'pcomplete) =20 ;;; Customization and Buffer Variables =20 @@ -310,7 +311,8 @@ (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" 'comint-dynamic-complete) + (define-key shell-mode-map "\t" 'pcomplete) + (define-key shell-mode-map "\M-\t" 'pcomplete-reverse) (define-key shell-mode-map "\M-?" 'comint-dynamic-list-filename-completions) (define-key shell-mode-map [menu-bar completion] @@ -396,7 +398,6 @@ (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) @@ -856,7 +857,6 @@ (format "[;&|]+[\t ]*\\(%s\\)" shell-command-regexp) limit 'move arg) (progn (goto-char (match-beginning 1)) (skip-chars-forward ";&|"))))) - =20 (defun shell-dynamic-complete-command () "Dynamically complete the command at point. --=-4m0cXYEVIc9/FKtaRGfE-- _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel