/[emacs]/emacs/lisp/emacs-lisp/crm.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/crm.el

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

revision 1.2 by gerd, Thu Apr 27 19:00:09 2000 UTC revision 1.3 by monnier, Fri Nov 30 01:13:59 2001 UTC
# Line 41  Line 41 
41  ;; `crm-default-separator' (comma).  The separator character may be  ;; `crm-default-separator' (comma).  The separator character may be
42  ;; changed by modifying the value of `crm-separator'.  ;; changed by modifying the value of `crm-separator'.
43    
44  ;; Continguous strings of non-separator-characters are referred to as  ;; Contiguous strings of non-separator-characters are referred to as
45  ;; 'elements'.  In the aforementioned example, the elements are:  ;; 'elements'.  In the aforementioned example, the elements are:
46  ;; 'alice', 'bob', and 'eve'.  ;; 'alice', 'bob', and 'eve'.
47    
# Line 529  This keymap inherits from the keymap nam Line 529  This keymap inherits from the keymap nam
529  The only difference is that TAB is bound to `crm-minibuffer-complete' in  The only difference is that TAB is bound to `crm-minibuffer-complete' in
530  the inheriting keymap.  the inheriting keymap.
531    
532  If REQUIRE-MACTH is non-nil, the keymap `crm-local-must-match-map' is used.  If REQUIRE-MATCH is non-nil, the keymap `crm-local-must-match-map' is used.
533  This keymap inherits from the keymap named `minibuffer-local-must-match-map'.  This keymap inherits from the keymap named `minibuffer-local-must-match-map'.
534  The inheriting keymap binds RET to `crm-minibuffer-complete-and-exit'  The inheriting keymap binds RET to `crm-minibuffer-complete-and-exit'
535  and TAB to `crm-minibuffer-complete'."  and TAB to `crm-minibuffer-complete'."
# Line 574  The default value for the separator char Line 574  The default value for the separator char
574  `crm-default-separator' (comma).  The separator character may be  `crm-default-separator' (comma).  The separator character may be
575  changed by modifying the value of `crm-separator'.  changed by modifying the value of `crm-separator'.
576    
577  Continguous strings of non-separator-characters are referred to as  Contiguous strings of non-separator-characters are referred to as
578  'elements'.  In the aforementioned example, the elements are: 'alice',  'elements'.  In the aforementioned example, the elements are: 'alice',
579  'bob', and 'eve'.  'bob', and 'eve'.
580    
# Line 590  INHERIT-INPUT-METHOD." Line 590  INHERIT-INPUT-METHOD."
590    (let ((minibuffer-completion-table (function crm-collection-fn))    (let ((minibuffer-completion-table (function crm-collection-fn))
591          (minibuffer-completion-predicate predicate)          (minibuffer-completion-predicate predicate)
592          ;; see completing_read in src/minibuf.c          ;; see completing_read in src/minibuf.c
593          (minibuffer-completion-confirm (if (eq require-match t)          (minibuffer-completion-confirm
594                                             nil           (unless (eq require-match t) require-match))
                                          t))  
595          (crm-completion-table table)          (crm-completion-table table)
596          crm-last-exact-completion          crm-last-exact-completion
597          crm-current-element          crm-current-element
# Line 600  INHERIT-INPUT-METHOD." Line 599  INHERIT-INPUT-METHOD."
599          crm-right-of-element          crm-right-of-element
600          crm-beginning-of-element          crm-beginning-of-element
601          crm-end-of-element          crm-end-of-element
602          map)          (map (if require-match
603      (if require-match                   crm-local-must-match-map
604          ;; use `crm-local-must-match-map'                 crm-local-completion-map)))
         (setq map crm-local-must-match-map)  
       ;; use `minibuffer-local-completion-map'  
       (setq map minibuffer-local-completion-map))  
605      (split-string (read-from-minibuffer      (split-string (read-from-minibuffer
606                     prompt initial-input map                     prompt initial-input map
607                     nil hist def inherit-input-method)                     nil hist def inherit-input-method)
608                    crm-separator)))                    crm-separator)))
609    
610  ;; testing and debugging  ;; testing and debugging
611  ;;; (defun crm-init-test-environ ()  ;; (defun crm-init-test-environ ()
612  ;;;   "Set up some variables for testing."  ;;   "Set up some variables for testing."
613  ;;;   (interactive)  ;;   (interactive)
614  ;;;   (setq my-prompt "Prompt: ")  ;;   (setq my-prompt "Prompt: ")
615  ;;;   (setq my-table  ;;   (setq my-table
616  ;;;     '(("hi") ("there") ("man") ("may") ("mouth") ("ma")  ;;      '(("hi") ("there") ("man") ("may") ("mouth") ("ma")
617  ;;;       ("a") ("ab") ("abc") ("abd") ("abf") ("zab") ("acb")  ;;        ("a") ("ab") ("abc") ("abd") ("abf") ("zab") ("acb")
618  ;;;       ("da") ("dab") ("dabc") ("dabd") ("dabf") ("dzab") ("dacb")  ;;        ("da") ("dab") ("dabc") ("dabd") ("dabf") ("dzab") ("dacb")
619  ;;;       ("fda") ("fdab") ("fdabc") ("fdabd") ("fdabf") ("fdzab") ("fdacb")  ;;        ("fda") ("fdab") ("fdabc") ("fdabd") ("fdabf") ("fdzab") ("fdacb")
620  ;;;       ("gda") ("gdab") ("gdabc") ("gdabd") ("gdabf") ("gdzab") ("gdacb")  ;;        ("gda") ("gdab") ("gdabc") ("gdabd") ("gdabf") ("gdzab") ("gdacb")
621  ;;;       ))  ;;        ))
622  ;;;   (setq my-separator ","))  ;;   (setq my-separator ","))
623    
624  ;(completing-read-multiple my-prompt my-table)  ;(completing-read-multiple my-prompt my-table)
625  ;(completing-read-multiple my-prompt my-table nil t)  ;(completing-read-multiple my-prompt my-table nil t)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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