[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Mon, 13 Jun 2005 16:45:51 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.461 emacs/lisp/subr.el:1.462
*** emacs/lisp/subr.el:1.461 Fri Jun 10 14:06:47 2005
--- emacs/lisp/subr.el Mon Jun 13 20:45:50 2005
***************
*** 1923,1928 ****
--- 1923,1929 ----
The result of the `dynamic-completion-table' form is a function
that can be used as the ALIST argument to `try-completion' and
`all-completion'. See Info node `(elisp)Programmed Completion'."
+ (declare (debug (lambda-expr)))
(let ((win (make-symbol "window"))
(string (make-symbol "string"))
(predicate (make-symbol "predicate"))
***************
*** 1944,1955 ****
If completion is requested in the minibuffer, FUN will be called in the buffer
from which the minibuffer was entered. The return value of
`lazy-completion-table' must be used to initialize the value of VAR."
(let ((str (make-symbol "string")))
`(dynamic-completion-table
(lambda (,str)
(unless (listp ,var)
! (setq ,var (funcall ',fun ,@args)))
,var))))
;;; Matching and substitution
--- 1945,1973 ----
If completion is requested in the minibuffer, FUN will be called in the buffer
from which the minibuffer was entered. The return value of
`lazy-completion-table' must be used to initialize the value of VAR."
+ (declare (debug (symbol lambda-expr def-body)))
(let ((str (make-symbol "string")))
`(dynamic-completion-table
(lambda (,str)
(unless (listp ,var)
! (setq ,var (,fun ,@args)))
,var))))
+
+ (defmacro complete-in-turn (a b)
+ "Create a completion table that first tries completion in A and then in B.
+ A and B should not be costly (or side-effecting) expressions."
+ (declare (debug (def-form def-form)))
+ `(lambda (string predicate mode)
+ (cond
+ ((eq mode t)
+ (or (all-completions string ,a predicate)
+ (all-completions string ,b predicate)))
+ ((eq mode nil)
+ (or (try-completion string ,a predicate)
+ (try-completion string ,b predicate)))
+ (t
+ (or (test-completion string ,a predicate)
+ (test-completion string ,b predicate))))))
;;; Matching and substitution
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/08
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Juanma Barranquero, 2005/06/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/13
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/14
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Stefan Monnier, 2005/06/15
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/20
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Juanma Barranquero, 2005/06/21
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/22
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M . Stallman, 2005/06/25
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Luc Teirlinck, 2005/06/27