[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/shell.el,v [EMACS_22_BASE]
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/shell.el,v [EMACS_22_BASE] |
Date: |
Thu, 03 Apr 2008 05:15:04 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Chong Yidong <cyd> 08/04/03 05:15:03
Index: shell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/shell.el,v
retrieving revision 1.149.2.4
retrieving revision 1.149.2.5
diff -u -b -r1.149.2.4 -r1.149.2.5
--- shell.el 10 Jan 2008 04:04:11 -0000 1.149.2.4
+++ shell.el 3 Apr 2008 05:15:02 -0000 1.149.2.5
@@ -191,7 +191,7 @@
shell-dynamic-complete-environment-variable
shell-dynamic-complete-command
shell-replace-by-expanded-directory
- comint-dynamic-complete-filename)
+ shell-dynamic-complete-filename)
"List of functions called to perform completion.
This variable is used to initialize `comint-dynamic-complete-functions' in the
shell buffer.
@@ -1003,6 +1003,19 @@
(insert " "))
success)))
+(defun shell-dynamic-complete-filename ()
+ "Dynamically complete the filename at point.
+This completes only if point is at a suitable position for a
+filename argument."
+ (interactive)
+ (let ((opoint (point))
+ (beg (comint-line-beginning-position)))
+ (when (save-excursion
+ (goto-char (if (re-search-backward "[;|&]" beg t)
+ (match-end 0)
+ beg))
+ (re-search-forward "[^ \t][ \t]" opoint t))
+ (comint-dynamic-complete-as-filename))))
(defun shell-match-partial-variable ()
"Return the shell variable at point, or nil if none is found."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/shell.el,v [EMACS_22_BASE],
Chong Yidong <=