diff options
| author | Chong Yidong | 2012-03-10 15:08:51 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-03-10 15:08:51 +0800 |
| commit | 7a2c7ca7ca06089158560f7d3e2807554d3276cf (patch) | |
| tree | d4c5eaee9165cbea458c96f8aa4b97bc72424421 /lisp | |
| parent | 82dcf4e4d8d761c26ef0a54e90e0e4a02fa4c430 (diff) | |
| download | emacs-7a2c7ca7ca06089158560f7d3e2807554d3276cf.tar.gz emacs-7a2c7ca7ca06089158560f7d3e2807554d3276cf.zip | |
Give completion field overlays high priority.
* lisp/minibuffer.el (completion-in-region, completion-help-at-point):
Give the completion field overlay a high priority.
Fixes: debbugs:6830
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 44190993887..c3b28cd8777 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-03-10 Chong Yidong <cyd@gnu.org> | 1 | 2012-03-10 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * minibuffer.el (completion-in-region, completion-help-at-point): | ||
| 4 | Give the completion field overlay a high priority (Bug#6830). | ||
| 5 | |||
| 3 | * dired.el (dired-goto-file): Recognize absolute file name | 6 | * dired.el (dired-goto-file): Recognize absolute file name |
| 4 | listings (Bug#7126). | 7 | listings (Bug#7126). |
| 5 | (dired-goto-file-1): New helper function. | 8 | (dired-goto-file-1): New helper function. |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1fdf33bf610..1a1a37258c4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1483,10 +1483,13 @@ exit." | |||
| 1483 | (minibuffer-completion-predicate predicate) | 1483 | (minibuffer-completion-predicate predicate) |
| 1484 | (ol (make-overlay start end nil nil t))) | 1484 | (ol (make-overlay start end nil nil t))) |
| 1485 | (overlay-put ol 'field 'completion) | 1485 | (overlay-put ol 'field 'completion) |
| 1486 | ;; HACK: if the text we are completing is already in a field, we | ||
| 1487 | ;; want the completion field to take priority (e.g. Bug#6830). | ||
| 1488 | (overlay-put ol 'priority 100) | ||
| 1486 | (when completion-in-region-mode-predicate | 1489 | (when completion-in-region-mode-predicate |
| 1487 | (completion-in-region-mode 1) | 1490 | (completion-in-region-mode 1) |
| 1488 | (setq completion-in-region--data | 1491 | (setq completion-in-region--data |
| 1489 | (list (current-buffer) start end collection))) | 1492 | (list (current-buffer) start end collection))) |
| 1490 | (unwind-protect | 1493 | (unwind-protect |
| 1491 | (call-interactively 'minibuffer-complete) | 1494 | (call-interactively 'minibuffer-complete) |
| 1492 | (delete-overlay ol))))) | 1495 | (delete-overlay ol))))) |
| @@ -1653,9 +1656,10 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1653 | ;; introduce a corresponding hook (plus another for word-completion, | 1656 | ;; introduce a corresponding hook (plus another for word-completion, |
| 1654 | ;; and another for force-completion, maybe?). | 1657 | ;; and another for force-completion, maybe?). |
| 1655 | (overlay-put ol 'field 'completion) | 1658 | (overlay-put ol 'field 'completion) |
| 1659 | (overlay-put ol 'priority 100) | ||
| 1656 | (completion-in-region-mode 1) | 1660 | (completion-in-region-mode 1) |
| 1657 | (setq completion-in-region--data | 1661 | (setq completion-in-region--data |
| 1658 | (list (current-buffer) start end collection)) | 1662 | (list (current-buffer) start end collection)) |
| 1659 | (unwind-protect | 1663 | (unwind-protect |
| 1660 | (call-interactively 'minibuffer-completion-help) | 1664 | (call-interactively 'minibuffer-completion-help) |
| 1661 | (delete-overlay ol)))) | 1665 | (delete-overlay ol)))) |