[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ERC completion
From: |
Stefan Monnier |
Subject: |
Re: ERC completion |
Date: |
Thu, 28 Apr 2011 16:34:57 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Sorry, it isn't ignored. But rather, erc-pcompletions-at-point always
> return non-nil, even when it does not complete anything, so that my
> customization
> (setq erc-complete-functions '(erc-pcompletions-at-point
> my-dabbrev-expand))
> does not work as expected. (the intent is to have dabbrev take over if
> I'm not completing a nick)
Hmm, does the patch below help?
Stefan
=== modified file 'lisp/pcomplete.el'
--- lisp/pcomplete.el 2011-04-28 00:18:12 +0000
+++ lisp/pcomplete.el 2011-04-28 19:31:21 +0000
@@ -489,10 +489,10 @@
;; prefix from pcomplete-stub.
(beg (max (- (point) (length pcomplete-stub))
(pcomplete-begin)))
- (buftext (buffer-substring beg (point)))
- (table
+ (buftext (buffer-substring beg (point))))
+ (when completions
+ (let ((table
(cond
- ((null completions) nil)
((not (equal pcomplete-stub buftext))
;; This isn't always strictly right (e.g. if
;; FOO="toto/$FOO", then completion of /$FOO/bar may
@@ -514,8 +514,8 @@
(pcomplete-quote-argument res)
res)))))))
(pred
- ;; pare it down, if applicable
- (when (and table pcomplete-use-paring pcomplete-seen)
+ ;; Pare it down, if applicable.
+ (when (and pcomplete-use-paring pcomplete-seen)
(setq pcomplete-seen
(mapcar (lambda (f)
(funcall pcomplete-norm-func
@@ -539,7 +539,7 @@
(when pcomplete-ignore-case
(setq table
(apply-partially #'completion-table-case-fold table)))
- (list beg (point) table :predicate pred))))
+ (list beg (point) table :predicate pred))))))
;; I don't think such commands are usable before first setting up buffer-local
;; variables to parse args, so there's no point autoloading it.
- ERC completion, Antoine Levitt, 2011/04/27
- Re: ERC completion, Stefan Monnier, 2011/04/27
- Re: ERC completion, Antoine Levitt, 2011/04/28
- Re: ERC completion,
Stefan Monnier <=
- Re: ERC completion, Antoine Levitt, 2011/04/28
- Re: ERC completion, Stefan Monnier, 2011/04/28
- Re: ERC completion, Antoine Levitt, 2011/04/29
- Re: ERC completion, Stefan Monnier, 2011/04/29
- Re: ERC completion, Antoine Levitt, 2011/04/29