Commit graph

149 commits

Author SHA1 Message Date
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Leo Liu
f8ccf16762 Fix format bug in defstruct
http://debbugs.gnu.org/9357
2011-08-26 17:52:07 +08:00
Stefan Monnier
673e08bbd4 * lisp/emacs-lisp/cl-macs.el (cl--make-usage-var, cl--make-usage-args):
New functions.
(cl-transform-lambda): Use them.

Fixes: debbugs:9239
2011-08-05 12:31:21 -04:00
Lars Magne Ingebrigtsen
ce887515f2 dolist doc fix.
(dolist): Mention that there's a nil block
2011-08-02 20:49:12 +02:00
Lawrence Mitchell
0794775d0d Silence byte-compiler warning with :read-only defstruct slots
* emacs-lisp/cl-macs.el (defstruct): Ignore argument to setf
method if slot is read-only.

Fixes: debbugs:9035
2011-07-16 17:52:46 +02:00
Lars Magne Ingebrigtsen
dbc44fcd08 * emacs-lisp/cl-macs.el (declare): Link to the "Declarations" node. 2011-07-15 18:01:18 +02:00
Lars Magne Ingebrigtsen
c39da69053 * emacs-lisp/cl-macs.el (declare): Doc string fix-up. 2011-07-15 16:59:42 +02:00
Lars Magne Ingebrigtsen
4bf0979f4c * emacs-lisp/cl-macs.el (declare): Add a doc string (bug#8690). 2011-07-15 15:46:52 +02:00
Stefan Monnier
2462470b9e Miscellaneous tweaks.
* lisp/emacs-lisp/cl-macs.el (dolist, dotimes): Use the same strategy for
lexical scoping as in subr.el's dolist and dotimes.
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Silence compiler warning.
* lisp/thingatpt.el (forward-whitespace): Trivial coding style fix.
* lisp/subr.el (with-output-to-temp-buffer): Provide an edebug spec.
* lisp/international/ccl.el (ccl-compile): Trivial simplification.
* lisp/help-fns.el (help-do-arg-highlight): Silence compiler warning.
* lisp/emacs-lisp/testcover.el (testcover-end): Remove spurious
`printflag' argument.
* lisp/emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy the whole obsolescence data.
2011-06-01 11:19:45 -03:00
Stefan Monnier
7200d79c65 Miscellanous cleanups in preparation for the merge.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Remove debug statement.
* lisp/emacs-lisp/bytecomp.el (byte-compile-single-version)
(byte-compile-version-cond, byte-compile-delay-out)
(byte-compile-delayed-out): Remove, unused.
* src/bytecode.c (Fbyte_code): Revert to old calling convention.
* src/lisp.h (COMPILED_PUSH_ARGS): Remove, unused.
2011-04-01 11:16:50 -04:00
Christian Ohler
a08a25d7aa * emacs-lisp/cl-macs.el (cl-block-wrapper): Fix typo that broke CL
blocks.
2011-03-20 20:48:12 +11:00
Stefan Monnier
414dbb000d * lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block, cl-block-wrapper)
(cl-block-throw, cl-byte-compile-throw): Use a compiler-macro rather
than a `byte-compile' hook to optimize away unused CL blocks, so that
also works for lexbind code.
Move the code after define-compiler-macro.
2011-03-18 20:21:27 -04:00
Stefan Monnier
ca1055060d Remove bytecomp- prefix, plus misc changes.
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to
inline lexbind interpreted functions into lexbind code.
(bytedecomp-bytes): Not a dynamic var any more.
(disassemble-offset): Get the bytes via an argument instead.
(byte-decompile-bytecode-1): Use push.
* lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use
lexical-binding.
(byte-compile-outbuffer): Rename from bytecomp-outbuffer.
* lisp/emacs-lisp/cl-macs.el (load-time-value):
* lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name.
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add byte-code-function-p.
(pcase--u1): Remove left-over code from early development.
Fix case of variable shadowing in guards and predicates.
(pcase--u1): Add a new `let' pattern.
* src/image.c (parse_image_spec): Use Ffunctionp.
* src/lisp.h: Declare Ffunctionp.
2011-03-16 16:08:39 -04:00
Stefan Monnier
ba83908c4b Misc fixes, and use lexical-binding in more files.
* lisp/subr.el (letrec): New macro.
(with-wrapper-hook): Move from lisp/simple.el and don't use CL.
* simple.el (with-wrapper-hook): Move with-wrapper-hook to subr.el.
* lisp/help-fns.el (help-function-arglist): Handle subroutines as well.
(describe-variable): Use special-variable-p to filter completions.
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't expand `declare'
in defmacros.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
Handle `declare'.
* lisp/emacs-lisp/cl.el (pushnew): Silence unfixable warning.
* lisp/emacs-lisp/cl-macs.el (defstruct, define-compiler-macro):
Mark unused arg as unused.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Use memq.
* lisp/emacs-lisp/autoload.el (make-autoload): Don't assume the macro's
first sexp is a list.
(autoload-generate-file-autoloads): Improve error message.
* lisp/emacs-lisp/advice.el (ad-arglist): Use help-function-arglist
to understand the new byte-code arg format.
* lisp/vc/smerge-mode.el:
* lisp/vc/log-view.el:
* lisp/vc/log-edit.el:
* lisp/vc/cvs-status.el:
* lisp/uniquify.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/bibtex-style.el:
* lisp/reveal.el:
* lisp/newcomment.el:
* lisp/emacs-lisp/smie.el:
* lisp/abbrev.el: Use lexical-binding.
* src/eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
(Fdefvar): Remove redundant SYMBOLP check.
(Ffunctionp): Don't signal an error for undefined aliases.
* doc/lispref/variables.texi (Converting to Lexical Binding): New node.
2011-03-11 15:04:22 -05:00
Stefan Monnier
0d6459dfb5 Merge from trunk 2011-03-06 16:22:16 -05:00
Juanma Barranquero
f6132e5a3c lisp/emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. 2011-03-01 04:59:31 +01:00
Stefan Monnier
b38b1ec071 Various compiler bug-fixes. MPC seems to run correctly now.
* lisp/files.el (lexical-binding): Add a safe-local-variable property.

* lisp/emacs-lisp/byte-opt.el (byte-inline-lapcode): Check how many elements
are added to the stack.
(byte-compile-splice-in-already-compiled-code): Don't touch lexical nor
byte-compile-depth now that byte-inline-lapcode does it for us.
(byte-compile-inline-expand): Don't inline dynbind byte code into
lexbind code, since it has to be done differently.

* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
Correctly extract arglist from `closure's.
(byte-compile-cl-warn): Compiler-macros are run earlier now.
(byte-compile-top-level): Bind byte-compile-lexical-environment to nil,
except for lambdas.
(byte-compile-form): Don't run the compiler-macro expander here.
(byte-compile-let): Merge with byte-compile-let*.
Don't preserve-body-value if the body's value was discarded.

* lisp/emacs-lisp/cconv.el (cconv--set-diff, cconv--set-diff-map)
(cconv--map-diff, cconv--map-diff-elem, cconv--map-diff-set): New funs.
(cconv--env-var): New constant.
(cconv-closure-convert-rec): Use it and use them.  Fix a typo that
ended up forgetting to remove entries from lmenvs in `let'.
For `lambda' use the outer `fvrs' when building the closure and don't
forget to remove `vars' from the `emvrs' and `lmenvs' of the body.

* lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block): Disable optimization
in lexbind, because it needs a different implementation.

* src/bytecode.c (exec_byte_code): Fix handling of &rest.

* src/eval.c (Vinternal_interpreter_environment): Remove.
(syms_of_eval): Do declare Vinternal_interpreter_environment as
a global lisp var, but unintern it to hide it.
(Fcommandp):
* src/data.c (Finteractive_form): Understand `closure's.
2011-02-17 16:19:13 -05:00
Glenn Morris
233ba4d924 Merge from emacs-23; up to 2010-05-26T14:19:15Z!monnier@iro.umontreal.ca. 2011-02-05 14:30:14 -08:00
Glenn Morris
a60287ff99 * lisp/emacs-lisp/cl-macs.el (return-from): Fix doc typo. 2011-02-05 14:03:44 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Glenn Morris
05907bb3aa cl-macs `loop' fix for bug#7492.
* lisp/emacs-lisp/cl-macs.el (cl-parse-loop-clause):
Avoid infinite loop over windows.
2010-12-02 09:36:45 -08:00
Stefan Monnier
db94771e23 * lisp/emacs-lisp/cl-macs.el (extent-data, extent-face, extent-priority)
(extent-end-position, extent-start-position): Remove setf method for
non-existing functions.

Fixes: debbugs:7319
2010-11-08 14:09:21 -05:00
Glenn Morris
215461a8d3 Silence cl-macs.el compilation.
* lisp/emacs-lisp/cl-macs.el (loop): Give local variable args a prefix.
(cl-parse-loop-clause, cl-loop-handle-accum): Update for above change.
2010-11-05 00:34:45 -07:00
Jan Djärv
6d7cc56382 Removed cut-buffer code.
* lisp/mouse-sel.el (mouse-sel-get-selection-function):
x-cut-buffer-or-selection-value renamed to x-selection-value.
(x-select-text): Optional push removed.

* lisp/select.el (x-get-cut-buffer, x-set-cut-buffer): Remove.

* lisp/simple.el (interprogram-cut-function): Remove mention of PUSH.

* lisp/w32-fns.el (x-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value.
(x-cut-buffer-max): Remove.
(x-select-text): Remove argument PUSH, update documentation.

* lisp/emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove.

* lisp/term/ns-win.el (x-setup-function-keys, ns-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value
(x-selection-value): Renamed from x-cut-buffer-or-selection-value.
(x-select-text): Remove argument PUSH, update documentation.

* lisp/term/pc-win.el (x-last-selected-text):
x-cut-buffer-or-selection-value renamed to x-selection-value
(x-select-text): Remove argument PUSH, update documentation.

* lisp/term/x-win.el: Update documentation for x-last-selected-text-*.
(x-last-selected-text-cut, x-last-selected-text-cut-encoded)
(x-last-cut-buffer-coding, x-cut-buffer-max): Remove.
(x-select-text): Remove argument PUSH, update documentation.  Remove
cut-buffer code.
(x-selection-value-internal): Was previously x-selection-value.
(x-selection-value): Renamed from x-cut-buffer-or-selection-value.
Update documentation, remove cut-buffer code.  Call
x-selection-value-internal.
(x-clipboard-yank): Call x-selection-value-internal.
(x-initialize-window-system): Remove setting of x-cut-buffer-max.

* src/xselect.c: Remove declaration of cut-buffer objects and functions.
(symbol_to_x_atom): Remove mapping to XA_CUT_BUFFERn.
(x_atom_to_symbol): Remove mapping to QCUT_BUFFERn.
(Fx_get_cut_buffer_internal, Fx_store_cut_buffer_internal)
(Fx_rotate_cut_buffers_internal): Remove.
(syms_of_xselect): Remove defsubr of above.
Remove intern of QCUT_BUFFERn.

* src/xterm.c (x_term_init): Don't set dpyinfo->cut_buffers_initialized.

* src/xterm.h (struct dpyinfo): Remove cut_buffers_initialized.
2010-09-02 11:47:08 +02:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Stefan Monnier
2a64315a11 Merge from emacs-23 2010-06-16 16:08:41 -04:00
Helmut Eller
37a7e764e8 Close bug#6408.
* lisp/emacs-lisp/cl-macs.el (destructuring-bind): Bind `bind-enquote',
used by cl-do-arglist.
2010-06-12 00:06:15 -07:00
Juri Linkov
7bce851099 * emacs-lisp/cl-macs.el (window-parameter): Add defsetf with
set-window-parameter.
2010-05-19 23:37:57 +03:00
Stefan Monnier
80ac5d4d34 Use define-minor-mode in more cases.
* term/tvi970.el (tvi970-set-keypad-mode):
* simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
(normal-erase-is-backspace-mode):
* scroll-bar.el (scroll-bar-mode): Use it and define-minor-mode.
(set-scroll-bar-mode-1): (Re)move to its sole caller.
(get-scroll-bar-mode): New function.
* emacs-lisp/cl-macs.el (eq): Handle a non-variable first arg.
2010-05-04 23:45:21 -04:00
Stefan Monnier
f44379e7fe Use define-minor-mode for less obvious cases.
* emacs-lisp/easy-mmode.el (define-minor-mode): Add :variable keyword.
* emacs-lisp/cl-macs.el (terminal-parameter, eq): Add setf method.
* international/iso-ascii.el (iso-ascii-mode):
* frame.el (auto-raise-mode, auto-lower-mode):
* composite.el (global-auto-composition-mode): Use define-minor-mode.
2010-05-04 22:08:25 -04:00
Stefan Monnier
e754e83b65 Fix some of the problems in defsubst* (bug#5728).
* emacs-lisp/cl-macs.el (defsubst*): Don't substitute non-trivial args.
(cl-defsubst-expand): Do the substitutions simultaneously (bug#5728).
2010-04-08 15:59:46 -04:00
Glenn Morris
eb123b1295 Close bug#4427.
* emacs-lisp/cl-macs.el (defsubst*): Add autoload cookie.  (Bug#4427)
* emacs-lisp/cl-loaddefs.el: Regenerate.
2010-03-11 19:19:17 -08:00
Chong Yidong
c7dc1ac114 * emacs-lisp/cl-macs.el (defstruct): Doc fix (Bug#5267). 2010-01-16 15:04:29 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Dan Nicolaescu
76410c3e21 (define-compiler-macro): Purecopy the file name. 2009-11-12 06:48:03 +00:00
Chong Yidong
15120dec6b * menu-bar.el: Remove menu-bar-ediff-misc-menu from the Tools
menu.

* ediff-hook.el: Move menu-bar-ediff-misc-menu into
menu-bar-ediff-menu.

* emacs-lisp/lisp-mode.el: Add doc-string-elt property to
define-overloadable-function.

* progmodes/autoconf.el: Provide autoconf as well, so that this
file can be `require'd.

* emacs-lisp/cl-macs.el (deftype): Add to cl-loaddefs.

* emacs-lisp/autoload.el (generated-autoload-feature)
(generated-autoload-load-name): New vars.
(autoload-rubric, autoload-generate-file-autoloads): Use them.
(make-autoload): Recognize define-overloadable-function and
defclass forms (for EIEIO).

* Makefile.in (update-subdirs): Exclude cedet directory.
2009-09-27 23:25:03 +00:00
Juanma Barranquero
b4587710d3 * emacs-lisp/cl-macs.el (help-add-fundoc-usage): Declare. 2009-09-11 22:59:36 +00:00
Glenn Morris
ae2fd0421f (define-compiler-macro): Add a property that records where a macro was
defined.
2009-09-11 03:39:28 +00:00
Stefan Monnier
f9a9e6ea08 (cl-macro-environment): Provide a docstring. 2009-08-30 14:18:25 +00:00
Glenn Morris
924bfe49d8 (load-time-value): Update for the name-change `outbuffer' to
`bytecomp-outbuffer'.
2009-07-23 02:54:00 +00:00
Chong Yidong
143770f236 * emacs-lisp/cl-macs.el (lexical-let*): Doc fix (Bug#3178). 2009-05-10 22:01:20 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Glenn Morris
a54fdddbe5 Comment. 2008-11-20 02:58:34 +00:00
Glenn Morris
0ee35e515b (flet): Throw an error when trying to byte-compile a redefinition of a
function with special byte-compile handling.  (Bug#411)
2008-10-23 02:40:37 +00:00
Glenn Morris
56565c745b Simply require 'cl (silences spurious warnings).
(cl-compile-time-init): Remove function.
2008-07-16 02:50:00 +00:00
Glenn Morris
93fd3b3010 (ignore-errors): Move to subr.el. 2008-05-07 02:58:25 +00:00
Glenn Morris
d6cba7ae45 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 03:21:21 +00:00
Juanma Barranquero
20e3d3f1ca (get-setf-method): Use `string-match-p'. 2008-04-08 11:50:24 +00:00