diff options
| author | Stefan Monnier | 2011-03-01 00:03:24 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-01 00:03:24 -0500 |
| commit | d032d5e7dfabfae60f3304da02c97cd1e189b9a2 (patch) | |
| tree | 64219849ec4b697e19a1da1c2a5786b61a2c3387 /src | |
| parent | 39605a343b566a1a72e0afb61f96d085c2ef8054 (diff) | |
| download | emacs-d032d5e7dfabfae60f3304da02c97cd1e189b9a2.tar.gz emacs-d032d5e7dfabfae60f3304da02c97cd1e189b9a2.zip | |
* doc/lispref/variables.texi (Scope): Mention the availability of lexbind.
(Lexical Binding): New node.
* doc/lispref/eval.texi (Eval): Add `eval's new `lexical' arg.
* lisp/emacs-lisp/cconv.el (cconv-liftwhen): Increase threshold.
(cconv-closure-convert-rec): Convert interactive spec in empty lexenv.
(cconv-analyse-use): Improve unused vars warnings.
(cconv-analyse-form): Analyze interactive spec in empty lexenv.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Always byte-compile
the interactive spec in lexical-binding mode.
(byte-compile-refresh-preloaded): Don't reload byte-compiler files.
* lisp/custom.el (custom-initialize-default): Use defvar.
(custom-declare-variable): Set the special-variable-p flag.
* lisp/help-fns.el (help-make-usage): Drop leading underscores.
* lisp/dired.el (dired-revert, dired-make-relative): Mark unused args.
(dired-unmark-all-files): Remove unused var `query'.
(dired-overwrite-confirmed): Declare.
(dired-restore-desktop-buffer): Don't use dynamically scoped arg names.
* lisp/mpc.el: Mark unused args.
(mpc--faster-toggle): Remove unused var `songnb'.
* lisp/server.el (server-kill-buffer-running): Move before first use.
* lisp/minibuffer.el: Mark unused args.
* src/callint.c (quotify_arg): Simplify the logic.
(Fcall_interactively): Use lexical binding when evaluating the
interactive spec of a lexically bound function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/callint.c | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e7902b8c083..c638e1fa4b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-03-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * callint.c (quotify_arg): Simplify the logic. | ||
| 4 | (Fcall_interactively): Use lexical binding when evaluating the | ||
| 5 | interactive spec of a lexically bound function. | ||
| 6 | |||
| 1 | 2011-02-25 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2011-02-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * eval.c (Qcurry): Remove. | 9 | * eval.c (Qcurry): Remove. |
diff --git a/src/callint.c b/src/callint.c index 253f2b9dd09..a0efc4bbfe4 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -121,8 +121,9 @@ usage: (interactive &optional ARGS) */) | |||
| 121 | Lisp_Object | 121 | Lisp_Object |
| 122 | quotify_arg (register Lisp_Object exp) | 122 | quotify_arg (register Lisp_Object exp) |
| 123 | { | 123 | { |
| 124 | if (!INTEGERP (exp) && !STRINGP (exp) | 124 | if (CONSP (exp) |
| 125 | && !NILP (exp) && !EQ (exp, Qt)) | 125 | || (SYMBOLP (exp) |
| 126 | && !NILP (exp) && !EQ (exp, Qt))) | ||
| 126 | return Fcons (Qquote, Fcons (exp, Qnil)); | 127 | return Fcons (Qquote, Fcons (exp, Qnil)); |
| 127 | 128 | ||
| 128 | return exp; | 129 | return exp; |
| @@ -169,6 +170,9 @@ check_mark (int for_region) | |||
| 169 | static void | 170 | static void |
| 170 | fix_command (Lisp_Object input, Lisp_Object values) | 171 | fix_command (Lisp_Object input, Lisp_Object values) |
| 171 | { | 172 | { |
| 173 | /* FIXME: Instead of this ugly hack, we should provide a way for an | ||
| 174 | interactive spec to return an expression that will re-build the args | ||
| 175 | without user intervention. */ | ||
| 172 | if (CONSP (input)) | 176 | if (CONSP (input)) |
| 173 | { | 177 | { |
| 174 | Lisp_Object car; | 178 | Lisp_Object car; |
| @@ -331,11 +335,14 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 331 | else | 335 | else |
| 332 | { | 336 | { |
| 333 | Lisp_Object input; | 337 | Lisp_Object input; |
| 338 | Lisp_Object funval = Findirect_function (function, Qt); | ||
| 334 | i = num_input_events; | 339 | i = num_input_events; |
| 335 | input = specs; | 340 | input = specs; |
| 336 | /* Compute the arg values using the user's expression. */ | 341 | /* Compute the arg values using the user's expression. */ |
| 337 | GCPRO2 (input, filter_specs); | 342 | GCPRO2 (input, filter_specs); |
| 338 | specs = Feval (specs, Qnil); /* FIXME: lexbind */ | 343 | specs = Feval (specs, |
| 344 | CONSP (funval) && EQ (Qclosure, XCAR (funval)) | ||
| 345 | ? Qt : Qnil); | ||
| 339 | UNGCPRO; | 346 | UNGCPRO; |
| 340 | if (i != num_input_events || !NILP (record_flag)) | 347 | if (i != num_input_events || !NILP (record_flag)) |
| 341 | { | 348 | { |