[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5524: 23.1.92; `initials' completion style doesn't work as documente
From: |
Stefan Monnier |
Subject: |
bug#5524: 23.1.92; `initials' completion style doesn't work as documented |
Date: |
Thu, 04 Feb 2010 23:22:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
> Completion of acronyms and initialisms.
> E.g. can complete M-x lch to list-command-history
> and C-x C-f ~/sew to ~/src/emacs/work.
> While the M-x example works, the find-file example doesn't (with emacs
> -Q). For example, I have ~/repos/org/uni.org, but
> C-x C-f ~/rou TAB
> says [no match]. Same for
Thanks for using this feature ;-)
Indeed, it broke recently, but the patch below should make it work
again,
Stefan
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el 2010-01-13 08:35:10 +0000
+++ lisp/minibuffer.el 2010-02-05 04:17:38 +0000
@@ -2063,9 +2063,12 @@
;; 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 "")))
+ (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