aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2009-10-15 01:50:17 +0000
committerStefan Monnier <[email protected]>2009-10-15 01:50:17 +0000
commitd5e637154f5084076b1a348155fc68139747acca (patch)
tree8c95bf13b4ca185b32dfa84ab9fe1b409f43632b /lisp/international
parentb0d6136e736a7c3a843bb56049ed19219312150c (diff)
Replace completion-base-size by completion-base-position to fix bugs
such as (bug#4699). * simple.el (completion-base-position): New var. (completion-base-size): Mark as obsolete. (choose-completion): Make it work for mouse events as well. Pass the new base-position to choose-completion-string. (choose-completion-guess-base-position): New function, extracted from choose-completion-delete-max-match. (choose-completion-delete-max-match): Use it. Make obsolete. (choose-completion-string): Use the new base-position info. (completion-root-regexp): Delete. (completion-setup-function): Preserve completion-base-position. Eliminate obsolete base-size manipulation. * minibuffer.el (display-completion-list): Don't mess with base-size. (minibuffer-completion-help): Set completion-base-position instead. * mouse.el (mouse-choose-completion): Redefine as a mere alias to choose-completion. * textmodes/bibtex.el (bibtex-complete): * emacs-lisp/crm.el (crm--choose-completion-string): Adjust to new calling convention. * complete.el (partial-completion-mode): Use minibufferp to avoid bumping into incompatible change to choose-completion-string-functions. * ido.el (ido-choose-completion-string): Make its calling convention more permissive. * comint.el (comint-dynamic-list-input-ring-select): Remove obsolete base-size manipulation. (comint-dynamic-list-input-ring): Use dotimes and push. * iswitchb.el (iswitchb-completion-help): Remove dead-code call to fundamental-mode. Use `or'.
Diffstat (limited to 'lisp/international')
-rw-r--r--lisp/international/quail.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index c8d1083fbe..e4c1a36a11 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -2242,13 +2242,15 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
(defun quail-mouse-choose-completion (event)
"Click on an alternative in the `*Quail Completions*' buffer to choose it."
- (interactive "e")
;; This function is an exact copy of the mouse.el function
;; `mouse-choose-completion' except that we:
- ;; 1) add two lines from `choose-completion' in simple.el to give
- ;; the `mouse-2' click a little more leeway.
;; 2) don't bury *Quail Completions* buffer, so comment a section, and
;; 3) delete/terminate the current quail selection here.
+ ;; FIXME: Consolidate with `choose-completion'. The point number
+ ;; 1 has been done, already. The point number 3 should be fairly
+ ;; easy to move to a choose-completion-string-function. So all
+ ;; that's left is point number 2.
+ (interactive "e")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(let ((buffer (window-buffer))
@@ -2288,6 +2290,7 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
;; previous implementation.
(defun quail-choose-completion-string (choice &optional buffer base-size)
(setq quail-current-str choice)
+ ;; FIXME: We need to pass `base-position' here.
(choose-completion-string choice buffer))
(defun quail-build-decode-map (map-list key decode-map num