Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1d5e15d0
Commit
1d5e15d0
authored
Dec 26, 2005
by
Stefan Monnier
Browse files
(lazy-completion-table): Remove argument `args'.
parent
29f93de3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
19 deletions
+39
-19
lisp/ChangeLog
lisp/ChangeLog
+18
-11
lisp/subr.el
lisp/subr.el
+19
-6
lispref/minibuf.texi
lispref/minibuf.texi
+2
-2
No files found.
lisp/ChangeLog
View file @
1d5e15d0
2005-12-26 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (lazy-completion-table): Remove argument `args'.
* textmodes/bibtex.el (bibtex-strings, bibtex-reference-keys):
Don't use the `args' argument of lazy-completion-table.
2005-12-27 Nick Roberts <nickrob@snap.net.nz>
* descr-text.el (describe-char): Add optional argument for buffer.
...
...
@@ -8,12 +15,12 @@
* descr-text.el (help-fns): Require. Don't require button for
byte compilation.
(describe-text-widget): Add help echo for first button.
Use
'help-info for second.
(describe-text-widget): Add help echo for first button.
Use
'help-info for second.
(describe-property-list): Use 'help-argument-name instead of 'italic.
(describe-text-category): Prompt in minibuffer. Call help-setup-xref.
(describe-char): Use 'help-character-set. Add help echo.
Use
'help-input-method. Remove superfluous insert.
(describe-char): Use 'help-character-set. Add help echo.
Use
'help-input-method. Remove superfluous insert.
2005-12-25 Richard M. Stallman <rms@gnu.org>
...
...
@@ -35,16 +42,16 @@
* custom.el (custom-push-theme): Fix docstring.
* cus-edit.el (custom-variable-set, custom-variable-save
,
custom-variable-save): Custom-quote widget values.
* cus-edit.el (custom-variable-set, custom-variable-save
)
(
custom-variable-save): Custom-quote widget values.
(customize-save-variable): Fix custom-push-theme call.
2005-12-24 Eli Zaretskii <eliz@gnu.org>
* w32-fns.el (w32-batch-update-autoloads): New function.
* makefile.w32-in (autoloads, $(lisp)/mh-e/mh-loaddefs.el):
Use
w32-batch-update-autoloads, and don't setq generated-autoload-file
* makefile.w32-in (autoloads, $(lisp)/mh-e/mh-loaddefs.el):
Use
w32-batch-update-autoloads, and don't setq generated-autoload-file
from the command line.
2005-12-23 Chong Yidong <cyd@stupidchicken.com>
...
...
@@ -57,15 +64,15 @@
customization" button one line up.
(custom-themed): New face.
(custom-magic-alist): New value, THEMED, for theme settings.
(custom-variable-state-set, custom-face-state-set):
Check
theme-value instead of saved-value.
(custom-variable-state-set, custom-face-state-set):
Check
theme-value instead of saved-value.
(custom-variable-reset-standard, custom-face-reset-standard):
Remove theme setting entirely. Recalculate new values.
(custom-variable-set, custom-variable-set)
(custom-variable-reset-saved, custom-variable-reset-backup)
(custom-face-set, custom-face-reset-saved): Update `user' theme.
(custom-variable-save): Fix typos.
2005-12-23 Juri Linkov <juri@jurta.org>
* emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms):
...
...
lisp/subr.el
View file @
1d5e15d0
...
...
@@ -2256,20 +2256,33 @@ that can be used as the ALIST argument to `try-completion' and
((
not
,
mode
)
(
try-completion
,
string
(
,
fun
,
string
)
,
predicate
))
(
t
(
test-completion
,
string
(
,
fun
,
string
)
,
predicate
)))))))
(
defmacro
lazy-completion-table
(
var
fun
&rest
args
)
(
defmacro
lazy-completion-table
(
var
fun
)
;; We used to have `&rest args' where `args' were evaluated late (at the
;; time of the call to `fun'), which was counter intuitive. But to get
;; them to be evaluated early, we have to either use lexical-let (which is
;; not available in subr.el) or use `(lambda (,str) ...) which prevents the use
;; of lexical-let in the callers.
;; So we just removed the argument. Callers can then simply use either of:
;; (lazy-completion-table var (lambda () (fun x y)))
;; or
;; (lazy-completion-table var `(lambda () (fun ',x ',y)))
;; or
;; (lexical-let ((x x)) ((y y))
;; (lazy-completion-table var (lambda () (fun x y))))
;; depending on the behavior they want.
"Initialize variable VAR as a lazy completion table.
If the completion table VAR is used for the first time (e.g., by passing VAR
as an argument to `try-completion'), the function FUN is called with
arguments
ARGS
. FUN must return the completion table that will be stored in VAR.
If the completion table VAR is used for the first ti
d
me (e.g., by passing VAR
as an argument to `try-completion'), the function FUN is called with
no
arguments
. FUN must return the completion table that will be stored in VAR.
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
)))
(
declare
(
debug
(
symbol
lambda-expr
)))
(
let
((
str
(
make-symbol
"string"
)))
`
(
dynamic-completion-table
(
lambda
(
,
str
)
(
when
(
functionp
,
var
)
(
setq
,
var
(
,
fun
,@
args
)))
(
setq
,
var
(
,
fun
)))
,
var
))))
(
defmacro
complete-in-turn
(
a
b
)
...
...
lispref/minibuf.texi
View file @
1d5e15d0
...
...
@@ -768,13 +768,13 @@ in this list, with @code{case-fold-search} (@pxref{Searching and Case})
bound to the value of @code{completion-ignore-case}.
@end defvar
@defmac lazy-completion-table var fun
&rest args
@defmac lazy-completion-table var fun
This macro provides a way to initialize the variable @var{var} as a
collection for completion in a lazy way, not computing its actual
contents until they are first needed. You use this macro to produce a
value that you store in @var{var}. The actual computation of the
proper value is done the first time you do completion using @var{var}.
It is done by calling @var{fun} with
the
arguments
@var{args}
. The
It is done by calling @var{fun} with
no
arguments. The
value @var{fun} returns becomes the permanent value of @var{var}.
Here are two examples of use:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment