summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorNoah Friedman <friedman@splode.com>2002-12-02 08:51:39 +0000
committerNoah Friedman <friedman@splode.com>2002-12-02 08:51:39 +0000
commit8e28519a402cdc97b2e7e578d680151deb1bc106 (patch)
tree8003a55da66c73e46e3ff26032832c259207cc9b /lisp
parent90a7967a9afaf184af086f61a0ccb675a99c4662 (diff)
downloademacs-8e28519a402cdc97b2e7e578d680151deb1bc106.tar.gz
(PC-do-completion): Do not add wildcards to pattern unless filename is
non-nil.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/complete.el33
2 files changed, 25 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4644d90c7a7..63b5174c308 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-02 Noah Friedman <friedman@splode.com>
+
+ * complete.el (PC-do-completion): Do not add wildcards to pattern
+ unless filename is non-nil.
+
2002-12-02 Andreas Schwab <schwab@suse.de>
* mwheel.el (mouse-wheel-scroll-amount): Fix customize type.
@@ -61,13 +66,13 @@
(mwheel-inhibit-click-timeout,mwheel-filter-click-events): New defuns.
(mwheel-scroll): Add mwheel-filter-click-events as pre-command-hook.
Start mwheel-inhibit-click-event-timer with timeout handler
- mwheel-inhibit-click-timeout.
-
+ mwheel-inhibit-click-timeout.
+
2002-11-28 Nick Roberts <nick@nick.uklinux.net>
* tooltip.el (tooltip-gud-tips-setup): Remove.
(tooltip-gud-debugger): Remove.
- (tooltip-gud-print-command): Use gud-minor mode instead of
+ (tooltip-gud-print-command): Use gud-minor mode instead of
tooltip-gud-tips-setup and tooltip-gud-debugger.
* gdb-ui.el (gdb-starting): Set gdb-running to t.
diff --git a/lisp/complete.el b/lisp/complete.el
index baa8a5a5f10..4f223365202 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -383,7 +383,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(delete-region beg end)
(insert str)
(setq end (+ beg (length str)))))
-
+
;; Prepare various delimiter strings
(or (equal PC-word-delimiters PC-delims)
(setq PC-delims PC-word-delimiters
@@ -392,17 +392,18 @@ of `minibuffer-completion-table' and the minibuffer contents.")
PC-delims-list (append PC-delims nil)))
;; Add wildcards if necessary
- (let ((dir (file-name-directory str))
- (file (file-name-nondirectory str)))
- (while (and (stringp dir) (not (file-directory-p dir)))
- (setq dir (directory-file-name dir))
- (setq file (concat (replace-regexp-in-string
- PC-delim-regex "*\\&"
- (file-name-nondirectory dir))
- "*/" file))
- (setq dir (file-name-directory dir)))
- (setq str (concat dir file)))
-
+ (and filename
+ (let ((dir (file-name-directory str))
+ (file (file-name-nondirectory str)))
+ (while (and (stringp dir) (not (file-directory-p dir)))
+ (setq dir (directory-file-name dir))
+ (setq file (concat (replace-regexp-in-string
+ PC-delim-regex "*\\&"
+ (file-name-nondirectory dir))
+ "*/" file))
+ (setq dir (file-name-directory dir)))
+ (setq str (concat dir file))))
+
;; Look for wildcard expansions in directory name
(and filename
(string-match "\\*.*/" str)
@@ -890,7 +891,7 @@ or properties are considered."
;;; This is adapted from lib-complete.el, by Mike Williams.
(defun PC-include-file-all-completions (file search-path &optional full)
"Return all completions for FILE in any directory on SEARCH-PATH.
-If optional third argument FULL is non-nil, returned pathnames should be
+If optional third argument FULL is non-nil, returned pathnames should be
absolute rather than relative to some directory on the SEARCH-PATH."
(setq search-path
(mapcar (lambda (dir)
@@ -900,7 +901,7 @@ absolute rather than relative to some directory on the SEARCH-PATH."
;; It's an absolute file name, so don't need search-path
(progn
(setq file (expand-file-name file))
- (file-name-all-completions
+ (file-name-all-completions
(file-name-nondirectory file) (file-name-directory file)))
(let ((subdir (file-name-directory file))
(ndfile (file-name-nondirectory file))
@@ -918,9 +919,9 @@ absolute rather than relative to some directory on the SEARCH-PATH."
(if (file-directory-p dir)
(progn
(setq file-lists
- (cons
+ (cons
(mapcar (lambda (file) (concat subdir file))
- (file-name-all-completions ndfile
+ (file-name-all-completions ndfile
(car search-path)))
file-lists))))
(setq search-path (cdr search-path))))