[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3717: M-x man completion
From: |
Stefan Monnier |
Subject: |
bug#3717: M-x man completion |
Date: |
Wed, 02 Dec 2009 19:53:20 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> "boundary"
> Speaking of boundaries, I wonder if perl "::" would be a good boundary,
> since it's basically a directory separator in disguise. I'll give it a
> go - though I'm not a sophisticated completions user, so I wonder if
> I'll notice the difference :).
> (cond ((eq (car-safe action) 'boundaries) ;; emacs23
> (let* ((suffix (cdr action))
> ;; after last "::", or after start of string
> ;; (page names don't have newlines, so ".*" is ok)
> (start (if (string-match ".*::" str) (match-end 0) 0))
> ;; first "::", or end of string
> (end (string-match "::\\|\\'" suffix)))
> (cons 'boundaries (cons start end))))
The `completion-boundaries' info is really a meta-information about what
`all-completions' returns. So it doesn't make sense to only change
`bundaries' without changing the `all-completions' behavior accodingly.
This said: adding ":" to completion-pcm-word-delimiters would be easier
and would work probably as well if not better,
Stefan
bug#3717: M-x man completion, jidanni, 2009/12/15