diff options
| author | Stefan Monnier | 2009-11-19 22:03:36 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-19 22:03:36 +0000 |
| commit | 31a1c4779ebf070fe4fabe06383b84a1938f900f (patch) | |
| tree | f832c42c26c47a6f5f766256f74da55145c35e51 | |
| parent | bed4c9727800580ebfb81d8f76db4d0ab22aabdb (diff) | |
| download | emacs-31a1c4779ebf070fe4fabe06383b84a1938f900f.tar.gz emacs-31a1c4779ebf070fe4fabe06383b84a1938f900f.zip | |
(symbol-complete): Use completion-in-region.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/progmodes/sym-comp.el | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e9a2cdbe0f..67bc8e91431 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2009-11-19 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-11-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/sym-comp.el (symbol-complete): Use completion-in-region. | ||
| 4 | |||
| 3 | * filecache.el (file-cache-add-file): Use push and cons. | 5 | * filecache.el (file-cache-add-file): Use push and cons. |
| 4 | (file-cache-delete-file-regexp): Use push. | 6 | (file-cache-delete-file-regexp): Use push. |
| 5 | (file-cache-complete): Use completion-in-region. | 7 | (file-cache-complete): Use completion-in-region. |
diff --git a/lisp/progmodes/sym-comp.el b/lisp/progmodes/sym-comp.el index ed49c9d1f83..a0f572266bd 100644 --- a/lisp/progmodes/sym-comp.el +++ b/lisp/progmodes/sym-comp.el | |||
| @@ -143,14 +143,9 @@ to be set buffer-locally. Variables `symbol-completion-symbol-function', | |||
| 143 | (lambda (str) | 143 | (lambda (str) |
| 144 | (car-safe (cdr-safe | 144 | (car-safe (cdr-safe |
| 145 | (funcall symbol-completion-transform-function | 145 | (funcall symbol-completion-transform-function |
| 146 | str)))))) | 146 | str))))))) |
| 147 | (minibuffer-completion-table completions) | 147 | (completion-in-region (- (point) (length pattern)) (point) |
| 148 | (minibuffer-completion-predicate predicate) | 148 | completions predicate))) |
| 149 | (ol (make-overlay (- (point) (length pattern)) (point) nil nil t))) | ||
| 150 | (overlay-put ol 'field 'sym-comp) | ||
| 151 | (unwind-protect | ||
| 152 | (call-interactively 'minibuffer-complete) | ||
| 153 | (delete-overlay ol)))) | ||
| 154 | 149 | ||
| 155 | (eval-when-compile (require 'hippie-exp)) | 150 | (eval-when-compile (require 'hippie-exp)) |
| 156 | 151 | ||