[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100296: * pcomplete.el (pcomplete-co
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100296: * pcomplete.el (pcomplete-completions-at-point): New function, |
Date: |
Fri, 14 May 2010 23:50:26 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100296
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-05-14 23:50:26 -0400
message:
* pcomplete.el (pcomplete-completions-at-point): New function,
extracted from pcomplete-std-complete.
(pcomplete-std-complete): Use it.
modified:
lisp/ChangeLog
lisp/pcomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-05-15 00:42:22 +0000
+++ b/lisp/ChangeLog 2010-05-15 03:50:26 +0000
@@ -1,3 +1,9 @@
+2010-05-15 Stefan Monnier <address@hidden>
+
+ * pcomplete.el (pcomplete-completions-at-point): New function,
+ extracted from pcomplete-std-complete.
+ (pcomplete-std-complete): Use it.
+
2010-05-15 Glenn Morris <address@hidden>
* Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
=== modified file 'lisp/pcomplete.el'
--- a/lisp/pcomplete.el 2010-04-13 01:24:10 +0000
+++ b/lisp/pcomplete.el 2010-05-15 03:50:26 +0000
@@ -444,12 +444,14 @@
;; 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.
;; ;;;###autoload
-(defun pcomplete-std-complete ()
+(defun pcomplete-completions-at-point ()
"Provide standard completion using pcomplete's completion tables.
Same as `pcomplete' but using the standard completion UI."
- (interactive)
;; FIXME: it only completes the text before point, whereas the
;; standard UI may also consider text after point.
+ ;; FIXME: the `pcomplete' UI may be used internally during
+ ;; pcomplete-completions and then throw to `pcompleted', thus
+ ;; imposing the pcomplete UI over the standard UI.
(catch 'pcompleted
(let* ((pcomplete-stub)
pcomplete-seen pcomplete-norm-func
@@ -516,7 +518,7 @@
(directory-file-name f))
pcomplete-seen))))))
- (completion-in-region
+ (list
beg (point)
;; Add a space at the end of completion. Use a terminator-regexp
;; that never matches since the terminator cannot appear
@@ -527,7 +529,14 @@
(cons pcomplete-termination-string
"\\`a\\`")
table))
- pred))))
+ :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.
+ ;; ;;;###autoload
+(defun pcomplete-std-complete ()
+ (let ((completion-at-point-functions '(pcomplete-completions-at-point)))
+ (completion-at-point)))
;;; Pcomplete's native UI.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100296: * pcomplete.el (pcomplete-completions-at-point): New function,,
Stefan Monnier <=