/[emacs]/emacs/lisp/shell.el
ViewVC logotype

Diff of /emacs/lisp/shell.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.105 by monnier, Sun Dec 2 07:39:23 2001 UTC revision 1.106 by walters, Sat Feb 23 21:34:11 2002 UTC
# Line 310  Thus, this does not include the shell's Line 310  Thus, this does not include the shell's
310         (setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map))         (setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map))
311         (define-key shell-mode-map "\C-c\C-f" 'shell-forward-command)         (define-key shell-mode-map "\C-c\C-f" 'shell-forward-command)
312         (define-key shell-mode-map "\C-c\C-b" 'shell-backward-command)         (define-key shell-mode-map "\C-c\C-b" 'shell-backward-command)
313         (define-key shell-mode-map "\t" 'comint-dynamic-complete)         (define-key shell-mode-map "\t" 'shell-pcomplete)
314           (define-key shell-mode-map "\M-\t" 'shell-pcomplete-reverse)
315         (define-key shell-mode-map "\M-?"         (define-key shell-mode-map "\M-?"
316           'comint-dynamic-list-filename-completions)           'comint-dynamic-list-filename-completions)
317         (define-key shell-mode-map [menu-bar completion]         (define-key shell-mode-map [menu-bar completion]
# Line 396  buffer." Line 397  buffer."
397    (setq comint-delimiter-argument-list shell-delimiter-argument-list)    (setq comint-delimiter-argument-list shell-delimiter-argument-list)
398    (setq comint-file-name-chars shell-file-name-chars)    (setq comint-file-name-chars shell-file-name-chars)
399    (setq comint-file-name-quote-list shell-file-name-quote-list)    (setq comint-file-name-quote-list shell-file-name-quote-list)
   (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)  
400    (make-local-variable 'paragraph-start)    (make-local-variable 'paragraph-start)
401    (setq paragraph-start comint-prompt-regexp)    (setq paragraph-start comint-prompt-regexp)
402    (make-local-variable 'font-lock-defaults)    (make-local-variable 'font-lock-defaults)
# Line 857  See `shell-command-regexp'." Line 857  See `shell-command-regexp'."
857          (progn (goto-char (match-beginning 1))          (progn (goto-char (match-beginning 1))
858                 (skip-chars-forward ";&|")))))                 (skip-chars-forward ";&|")))))
859    
860    (defun shell-pcomplete ()
861      "Cycle forwards through completions at point, using `pcomplete'.
862    This function merely invokes `pcomplete', after ensuring this buffer
863    is set up for it."
864      (interactive)
865      (unless (prog1 shell-pcomplete-setup-p
866               (setq shell-pcomplete-setup-p t))
867        (pcomplete-comint-setup 'shell-dynamic-complete-functions))
868      ;; Convince pcomplete we are calling it directly
869      (setq this-command 'pcomplete)
870      (call-interactively #'pcomplete))
871    
872    (defun shell-pcomplete-reverse ()
873      "Cycle backwards through completions at point, using `pcomplete'.
874    This function merely invokes `pcomplete-reverse', after ensuring this
875    buffer is set up for it."
876      (interactive)
877      (unless (prog1 shell-pcomplete-setup-p
878                (setq shell-pcomplete-setup-p t))
879        (pcomplete-comint-setup 'shell-dynamic-complete-functions))
880      ;; Convince pcomplete we are calling it directly
881      (setq this-command 'pcomplete-reverse)
882      (call-interactively #'pcomplete-reverse))  
883    
884  (defun shell-dynamic-complete-command ()  (defun shell-dynamic-complete-command ()
885    "Dynamically complete the command at point.    "Dynamically complete the command at point.

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26