bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3717: M-x man completion


From: Kevin Ryde
Subject: bug#3717: M-x man completion
Date: Thu, 03 Dec 2009 09:41:22 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Stefan Monnier <address@hidden> 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))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]