From: Colin Walters <walters@debian.org>
Subject: Re: using pcomplete for comint.el/shell.el
Date: 18 Feb 2002 16:55:21 -0500 [thread overview]
Message-ID: <1014069321.6751.133.camel@space-ghost> (raw)
In-Reply-To: <200202172249.g1HMno412827@santafe.santafe.edu>
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
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?
[-- Attachment #2: shell.patch --]
[-- Type: text/plain, Size: 1490 bytes --]
--- 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:
(require 'comint)
+(require 'pcomplete)
;;; Customization and Buffer Variables
@@ -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 ";&|")))))
-
(defun shell-dynamic-complete-command ()
"Dynamically complete the command at point.
next prev parent reply other threads:[~2002-02-18 21:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-14 23:50 using pcomplete for comint.el/shell.el Colin Walters
2002-02-15 22:49 ` Stefan Monnier
2002-02-16 1:26 ` Colin Walters
2002-02-16 8:03 ` Eli Zaretskii
2002-02-17 16:48 ` Richard Stallman
2002-02-16 21:55 ` Richard Stallman
2002-02-17 0:43 ` Colin Walters
2002-02-17 22:49 ` Richard Stallman
2002-02-18 21:30 ` John Wiegley
2002-02-18 21:55 ` Colin Walters [this message]
2002-02-18 22:21 ` John Wiegley
2002-02-19 21:31 ` Richard Stallman
2002-02-23 21:39 ` Colin Walters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1014069321.6751.133.camel@space-ghost \
--to=walters@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).