/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.546 by rms, Thu May 30 17:12:15 2002 UTC revision 1.547 by kfstorm, Sat Jun 1 00:00:29 2002 UTC
# Line 3777  With prefix argument N, move N items (ne Line 3777  With prefix argument N, move N items (ne
3777        (forward-char 1))        (forward-char 1))
3778      (delete-char len)))      (delete-char len)))
3779    
3780    (defvar choose-completion-string-functions nil
3781      "List of functions which may override the standard `choose-completion-string'.
3782    Each function in the list is called in turn with arguments CHOICE BUFFER BASE-SIZE
3783    like choose-completion-string.  If a function in the list returns non-nil, that
3784    function is supposed to have inserted the completion in the minibuffer.
3785    If all functions in the list return nil, use the default completion selection.")
3786    
3787  ;; Switch to BUFFER and insert the completion choice CHOICE.  ;; Switch to BUFFER and insert the completion choice CHOICE.
3788  ;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text  ;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text
3789  ;; to keep.  If it is nil, use choose-completion-delete-max-match instead.  ;; to keep.  If it is nil, use choose-completion-delete-max-match instead.
# Line 3785  With prefix argument N, move N items (ne Line 3792  With prefix argument N, move N items (ne
3792  ;; unless it is reading a file name and CHOICE is a directory,  ;; unless it is reading a file name and CHOICE is a directory,
3793  ;; or completion-no-auto-exit is non-nil.  ;; or completion-no-auto-exit is non-nil.
3794  (defun choose-completion-string (choice &optional buffer base-size)  (defun choose-completion-string (choice &optional buffer base-size)
3795      (unless (run-hook-with-args-until-success
3796               'choose-completion-string-functions choice buffer base-size)
3797        (choose-completion-string1 choice buffer base-size)))
3798    
3799    (defun choose-completion-string1 (choice &optional buffer base-size)
3800    (let ((buffer (or buffer completion-reference-buffer))    (let ((buffer (or buffer completion-reference-buffer))
3801          (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer))))          (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer))))
3802      ;; If BUFFER is a minibuffer, barf unless it's the currently      ;; If BUFFER is a minibuffer, barf unless it's the currently

Legend:
Removed from v.1.546  
changed lines
  Added in v.1.547

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26