[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el |
Date: |
Fri, 31 May 2002 20:00:29 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.546 emacs/lisp/simple.el:1.547
*** emacs/lisp/simple.el:1.546 Thu May 30 13:12:15 2002
--- emacs/lisp/simple.el Fri May 31 20:00:29 2002
***************
*** 3777,3782 ****
--- 3777,3789 ----
(forward-char 1))
(delete-char len)))
+ (defvar choose-completion-string-functions nil
+ "List of functions which may override the standard
`choose-completion-string'.
+ Each function in the list is called in turn with arguments CHOICE BUFFER
BASE-SIZE
+ like choose-completion-string. If a function in the list returns non-nil,
that
+ function is supposed to have inserted the completion in the minibuffer.
+ If all functions in the list return nil, use the default completion
selection.")
+
;; Switch to BUFFER and insert the completion choice CHOICE.
;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text
;; to keep. If it is nil, use choose-completion-delete-max-match instead.
***************
*** 3785,3790 ****
--- 3792,3802 ----
;; unless it is reading a file name and CHOICE is a directory,
;; or completion-no-auto-exit is non-nil.
(defun choose-completion-string (choice &optional buffer base-size)
+ (unless (run-hook-with-args-until-success
+ 'choose-completion-string-functions choice buffer base-size)
+ (choose-completion-string1 choice buffer base-size)))
+
+ (defun choose-completion-string1 (choice &optional buffer base-size)
(let ((buffer (or buffer completion-reference-buffer))
(mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name
buffer))))
;; If BUFFER is a minibuffer, barf unless it's the currently
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Eli Zaretskii, 2002/05/01
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Eli Zaretskii, 2002/05/01
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Pavel JanÃk, 2002/05/02
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Markus Rost, 2002/05/19
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Kim F. Storm, 2002/05/27
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Kim F. Storm, 2002/05/28
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M. Stallman, 2002/05/30
- [Emacs-diffs] Changes to emacs/lisp/simple.el,
Kim F. Storm <=