summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-02-04 23:21:11 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-02-04 23:21:11 -0500
commit51b23c448632f4947fb0e364b8f7d35b90c04e39 (patch)
tree21abc61a85a1130360f2c382a2bd90087b0bb267 /lisp/minibuffer.el
parent3088147c5df9ff1ca0bcd6b5bdb1f7170fab909c (diff)
downloademacs-51b23c448632f4947fb0e364b8f7d35b90c04e39.tar.gz
Make `initials' completion work for /hh -> /home/horn again (bug#5524).
* minibuffer.el (completion-initials-expand): Only check the presence of delims *within* the boundaries, since otherwise the / delim is always found for files.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index df2ff51a31a..d905b9df870 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2063,9 +2063,12 @@ filter out additional entries (because TABLE migth not obey PRED)."
;; Complete /ums to /usr/monnier/src or lch to list-command-history.
(defun completion-initials-expand (str table pred)
- (unless (or (zerop (length str))
- (string-match completion-pcm--delim-wild-regex str))
- (let ((bounds (completion-boundaries str table pred "")))
+ (let ((bounds (completion-boundaries str table pred "")))
+ (unless (or (zerop (length str))
+ ;; Only check within the boundaries, since the
+ ;; boundary char (e.g. /) might be in delim-regexp.
+ (string-match completion-pcm--delim-wild-regex str
+ (car bounds)))
(if (zerop (car bounds))
(mapconcat 'string str "-")
;; If there's a boundary, it's trickier. The main use-case