summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
Commit message (Collapse)AuthorAgeFilesLines
...
* * lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings): New var.Stefan Monnier2013-06-131-23/+12
| | | | | | | | | | | | | | (byte-compile-preprocess): Use it. (byte-compile-file-form-defalias): Try a bit harder to use macros we can't quite recognize. (byte-compile-add-to-list): Remove. * lisp/emacs-lisp/cconv.el (cconv-warnings-only): New function. (cconv-closure-convert): Add assertion. * lisp/emacs-lisp/map-ynp.el: Use lexical-binding. (map-y-or-n-p): Remove unused vars `tail' and `object'. Factor out some repeated code. * etc/NEWS (utf-8 for el): Move to the incompatible section.
* Improve previous bytecomp fixGlenn Morris2013-06-071-3/+6
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-char-before) (byte-compile-backward-char, byte-compile-backward-word): Improve previous change, to handle non-explicit nil.
* bytecomp fix for bug#14565Glenn Morris2013-06-061-9/+12
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-char-before) (byte-compile-backward-char, byte-compile-backward-word): Handle explicit nil arguments.
* Fix compilation error with simultaneous dynamic+lexical scoping.Stefan Monnier2013-06-041-74/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add warning when a defvar appears after the first let-binding. * lisp/emacs-lisp/bytecomp.el (byte-compile-lexical-variables): New var. (byte-compile-close-variables): Initialize it. (byte-compile--declare-var): New function. (byte-compile-file-form-defvar) (byte-compile-file-form-define-abbrev-table) (byte-compile-file-form-custom-declare-variable): Use it. (byte-compile-make-lambda-lexenv): Change the argument. Simplify. (byte-compile-lambda): Share call to byte-compile-arglist-vars. (byte-compile-bind): Handle dynamic bindings that shadow lexical bindings. (byte-compile-unbind): Make arg non-optional. (byte-compile-let): Simplify. * lisp/emacs-lisp/cconv.el (byte-compile-lexical-variables): Declare var. (cconv--analyse-function, cconv-analyse-form): Populate it. Protect byte-compile-bound-variables to limit the scope of defvars. (cconv-analyse-form): Add missing rule for (defvar <foo>). Remove unneeded rule for `declare'. * lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin): Use macroexp-let2 so as to avoid depending on cl-adjoin at run-time. * lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use backquotes. * lisp/emacs-lisp/macroexp.el (macroexp--compiling-p): New function. (macroexp--warn-and-return): Use it.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Doc fix.Glenn Morris2013-05-271-2/+3
|
* Tweak byte-compile-file-form-autoload warningsGlenn Morris2013-05-221-12/+17
| | | | | | * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Always delete the autoloaded function from the noruntime and unresolved functions lists.
* Silence byte-compiler warnings.Juanma Barranquero2013-05-081-1/+1
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header): * lisp/faces.el (crm-separator): Silence byte-compiler. * lisp/progmodes/gud.el (gdb-speedbar-auto-raise, gud-tooltip-mode) (tool-bar-map): Remove unneeded defvars.
* No longer include timestamp in header of .elc filesGlenn Morris2013-04-201-5/+1
| | | | | | | | | | | This removes needless differences between files compiled at different times or by different people, or from sources in different locations. Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00187.html * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header): No longer include timestamp etc information. * etc/NEWS: Mention this.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use let.Stefan Monnier2013-02-251-4/+2
|
* Implement CLASH_DETECTION for MS-Windows.Eli Zaretskii2013-02-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/filelock.c [WINDOWSNT]: Include w32.h. (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime function of that name. Up-case the macro arguments. (IS_LOCK_FILE): New macro. (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK. (create_lock_file): New function, with body extracted from lock_file_1. [WINDOWSNT]: Implement lock files by writing a regular file with the lock information as its contents. (read_lock_data): New function, on Posix platforms just calls emacs_readlinkat. [WINDOWSNT]: Read the lock info from the file. (current_lock_owner): Call read_lock_data instead of calling emacs_readlinkat directly. (lock_file) [WINDOWSNT]: Run the file name through dostounix_filename. src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case just check if the process by that PID exists. src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is also present, as doing so will fail to error out if the file already exists. src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h. nt/inc/ms-w32.h (BOOT_TIME_FILE): Define. nt/config.nt (CLASH_DETECTION): Define to 1. lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files that match "\`\.#", to avoid compiling lock files, even if they are readable (as they are on MS-Windows). doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the exclusive means of locking files. etc/NEWS: Mention support for lock files on MS-Windows.
* Avoid recursive byte-compile-files fighting over input/output buffersGlenn Morris2013-02-231-3/+18
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-level): New. (byte-compile-file, byte-compile-from-buffer): Use separate input/output buffers for each level of recursive byte-compile-file calls. Fixes: debbugs:13787
* Remove all references to buffer-file-type and related features.Eli Zaretskii2013-02-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/xdisp.c (decode_mode_spec): Remove handling of %t. lisp/net/ange-ftp.el (ange-ftp-insert-file-contents): Don't reference buffer-file-type. lisp/mail/feedmail.el (feedmail-force-binary-write): Doc fix. (feedmail-run-the-queue, feedmail-dump-message-to-queue) (feedmail-send-it-immediately): Don't bind buffer-file-type, bind coding-system-for-write instead. lisp/jka-compr.el (jka-compr-write-region): Don't bind buffer-file-type. lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't bind buffer-file-type. lisp/files.el (file-name-buffer-file-type-alist): Remove defvar. (insert-file-contents-literally): Remove reference to file-name-buffer-file-type-alist. lisp/dos-w32.el (file-name-buffer-file-type-alist): Deprecate and make-obsolete. (find-buffer-file-type-match, find-buffer-file-type): Remove. (find-buffer-file-type-coding-system): Remove references to find-buffer-file-type-match, find-buffer-file-type, and buffer-file-type. Don't put find-buffer-file-type-coding-system into file-coding-system-alist. (find-file-binary, find-file-text): Bind coding-system-for-read instead of file-name-buffer-file-type-alist. lisp/erc/erc-dcc.el (erc-dcc-get-file): Don't reference buffer-file-type. doc/emacs/msdog.texi (Text and Binary): Delete the description of file-name-buffer-file-type-alist. doc/lispref/modes.texi (%-Constructs): Remove the description of %t. doc/lispref/nonascii.texi (MS-DOS File Types): Delete node. Fixes: debbugs:12989
* Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-2/+2
|\
| * Update copyright notices for 2013.Paul Eggert2013-01-011-2/+2
| |
* | Merge from emacs-24; up to 2012-11-19T11:36:02Z!yamaoka@jpl.orgGlenn Morris2012-11-231-0/+3
|\ \ | |/
| * * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Setup default value forStefan Monnier2012-11-231-0/+3
| | | | | | | | | | | | lexical-binding. Fixes: debbugs:12938
* | * lisp/emacs-lisp/bytecomp.el (byte-compile): Fix handling of closures.Stefan Monnier2012-11-201-2/+2
| |
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Don't turnStefan Monnier2012-11-091-1/+2
| | | | | | | | (funcall '(lambda ..) ..) into ((lambda ..) ..).
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):Stefan Monnier2012-11-081-12/+27
| | | | | | | | | | | | | | Byte-compile *before* eval in eval-and-compile. (byte-compile-log-warning): Remove redundant inhibit-read-only. (byte-compile-file-form-autoload): Don't hide actual definition. (byte-compile-maybe-guarded): Accept `functionp' as well.
* | Decouple "noruntime" and "cl-functions" bytecomp warningsGlenn Morris2012-11-021-10/+1
|/ | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Decouple "noruntime" and "cl-functions" warnings.
* Fix spurious "cl--defsubst-expand might not be defined at runtime"Stefan Monnier2012-10-111-5/+3
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to long-ago changes to the format of load-history. * src/eval.c (Fautoload): Remember previous autoload status in load-history.
* * lisp/emacs-lisp/bytecomp.el (byte-compiler-abbreviate-file): New function.Stefan Monnier2012-10-011-4/+12
| | | | | | (byte-compile-warning-prefix, byte-compile-file): Use it. Fixes: debbugs:12508
* * bytecomp.el (byte-compile-cl-file-p): Only "cl.el" counts as cl these days.Glenn Morris2012-09-281-1/+1
| | | | | Remove no longer appropriate file-local suppression of CL warnings in lisp/emacs-lisp/cl-*.el files.
* * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): New function.Stefan Monnier2012-09-201-11/+5
| | | | | | | | (macroexp--expand-all): Use it. (macroexp--funcall-and-return): Remove by folding it into its sole caller (macroexp--warn-and-return). * lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Use macroexp--obsolete-warning.
* byte-compile-warning-prefix tweakGlenn Morris2012-09-121-0/+4
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not compiling a file, try using load-file-name.
* byte-compile-setq-default fix for bug#12195Glenn Morris2012-08-141-14/+16
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-setq-default): Optimize away setq-default with no args, as is done for setq.
* * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Doc fix.Glenn Morris2012-08-141-12/+11
|
* Fixes: debbugs:12197Andreas Schwab2012-08-141-2/+3
| | | | | * emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is non-nil always load the compiled file if it exists.
* Autoload more carefully from Lisp. Follow aliases for function properties.Stefan Monnier2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (autoloadp): New function. (symbol-file): Use it. (function-get): New function. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and autoload-do-load. * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function) (lisp-indent-function): * lisp/emacs-lisp/gv.el (gv-get): * lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): * lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form): Use function-get. * lisp/emacs-lisp/cl.el: Don't propagate function properties any more. * src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp, add argument, tune behavior, and adjust all callers. * lisp/speedbar.el (speedbar-add-localized-speedbar-support): * lisp/emacs-lisp/disass.el (disassemble-internal): * lisp/desktop.el (desktop-load-file): * lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name) (describe-function-1): * lisp/emacs-lisp/find-func.el (find-function-noselect): * lisp/emacs-lisp/elp.el (elp-instrument-function): * lisp/emacs-lisp/advice.el (ad-has-proper-definition): * lisp/apropos.el (apropos-safe-documentation, apropos-macrop): * lisp/emacs-lisp/debug.el (debug-on-entry): * lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
* Don't warn on toggle-read-only calls.Chong Yidong2012-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify the documentation of toggle-read-only, and audit the code tree for uses of toggle-read-only; where appropriate, switch to setting the variable buffer-read-only or calling toggle-read-only with a (new) second arg. * lisp/files.el (toggle-read-only): Doc fix and code cleanup. New arg to allow printing the message when called from Lisp. * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Remove toggle-read-only. * lisp/bindings.el (mode-line-toggle-read-only): * lisp/dired.el (dired-toggle-read-only): * lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call toggle-read-only with non-nil second arg. * lisp/bs.el (bs-toggle-readonly): * lisp/buff-menu.el (Buffer-menu-toggle-read-only): Remove with-no-warnings around toggle-read-only. * lisp/ffap.el (ffap--toggle-read-only): Accept a list of buffers. Remove with-no-warnings around toggle-read-only. (ffap-read-only, ffap-read-only-other-window) (ffap-read-only-other-frame): Callers changed. * lisp/help-mode.el: Don't require view package. (help-mode-finish): Set buffer-read-only instead of calling toggle-read-only. * lisp/emacs-lisp/eieio-custom.el (eieio-customize-object): * lisp/vc/ediff.el (ediff-set-read-only-in-buf-A): Set buffer-read-only directly. * lisp/gnus/smime.el (smime-certificate-info): Set buffer-read-only directly, instead of calling toggle-read-only with a (bogus) argument. * doc/emacs/buffers.texi (Misc Buffer): Document view-read-only. * doc/lispref/buffers.texi (Read Only Buffers): Document toggle-read-only changes. Reword to account for the fact that read-only is currently not supported in overlay properties.
* Fix byte-recompile-directory.Eli Zaretskii2012-07-121-1/+1
| | | | | lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Use cl-incf, not incf.
* Reduce use of (require 'cl).Stefan Monnier2012-07-101-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | * admin/bzrmerge.el: Use cl-lib. * leim/quail/hangul.el: Don't require CL. * leim/quail/ipa.el: Use cl-lib. * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el: * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el: * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el: * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el: * international/quail.el, info-xref.el, imenu.el, image-mode.el: * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el: * battery.el, avoid.el, abbrev.el: Use cl-lib. * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el: * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el: * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el: * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el: * calculator.el, autorevert.el, apropos.el: Don't require CL. * emacs-bytecomp.el (byte-recompile-directory, display-call-tree) (byte-compile-unfold-bcf, byte-compile-check-variable): * emacs-byte-opt.el (byte-compile-trueconstp) (byte-compile-nilconstp): * emacs-autoload.el (make-autoload): Use pcase. * face-remap.el (text-scale-adjust): Simplify pcase patterns.
* * lisp/emacs-lisp/bytecomp.el (byte-compile): Don't signal an error if theStefan Monnier2012-07-041-15/+25
| | | | function is already compiled.
* Spelling fixes.Paul Eggert2012-07-021-3/+3
|
* Make inlining of other-mode interpreted functions work.Stefan Monnier2012-06-271-8/+33
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--refiy-function): New fun. (byte-compile): Use it to fix compilation of lexical-binding closures. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Compile the function, if needed. Fixes: debbugs:11799
* Provide generalized variables in core Elisp.Stefan Monnier2012-06-221-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/gv.el: New file. * lisp/subr.el (push, pop): Extend to generalized variables. * lisp/loadup.el (macroexp): Unload if preloaded and uncompiled. * lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove. * lisp/emacs-lisp/cl-macs.el: Require gv. Use gv-define-setter, gv-define-simple-setter, and gv-define-expander. Remove setf-methods defined in gv. Rename cl-setf -> setf. (cl-setf, cl-do-pop, cl-get-setf-method): Remove. (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf) (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el. (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with gv-letplace. (cl-defstruct): Don't define setf-method any more. * lisp/emacs-lisp/cl.el (flet): Don't autoload. (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt) (define-setf-expander, defsetf, define-modify-macro) (cl-struct-setf-expander): Move from cl-lib.el. * lisp/emacs-lisp/syntax.el: * lisp/emacs-lisp/ewoc.el: * lisp/emacs-lisp/smie.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push. (timer--time): Use gv-define-simple-setter. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let² to avoid coding-system problems in subr.el. Adjust all users. (macroexp--maxsize, macroexp-small-p): New functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf. * lisp/scroll-bar.el (scroll-bar-mode): * lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode) (normal-erase-is-backspace-mode): Don't use the `eq' place. * lisp/winner.el (winner-configuration, winner-make-point-alist) (winner-set-conf, winner-get-point, winner-set): Don't abuse letf. * lisp/files.el (locate-file-completion-table): Avoid list*. Fixes: debbugs:11657
* * lisp/emacs-lisp/byte-opt.el (featurep): Move compiler-macro...Stefan Monnier2012-06-131-0/+10
| | | | | | * lisp/emacs-lisp/bytecomp.el (featurep): ...here. Fixes: debbugs:11692
* Use lexical-binding for all of CL, and clean up its namespace.Stefan Monnier2012-06-111-3/+3
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-lib.el: Use lexical-binding. (cl-map-extents, cl-maclisp-member): Remove. (cl--set-elt, cl--set-nthcdr, cl--set-buffer-substring) (cl--set-substring, cl--block-wrapper, cl--block-throw) (cl--compiling-file, cl--mapcar-many, cl--do-subst): Use "cl--" prefix. * lisp/emacs-lisp/cl-extra.el: Use lexical-binding. (cl--mapcar-many, cl--map-keymap-recursively, cl--map-intervals) (cl--map-overlays, cl--set-frame-visible-p, cl--progv-save) (cl--progv-before, cl--progv-after, cl--finite-do, cl--set-getf) (cl--do-remf, cl--do-prettyprint): Use "cl--" prefix. * lisp/emacs-lisp/cl-seq.el: Use lexical-binding. (cl--parsing-keywords, cl--check-key, cl--check-test-nokey) (cl--check-test, cl--check-match): Use "cl--" prefix and backquotes. (cl--alist, cl--sublis-rec, cl--nsublis-rec, cl--tree-equal-rec): * lisp/emacs-lisp/cl-macs.el (cl--lambda-list-keywords): Use "cl--" prefix. * lisp/edmacro.el (edmacro-mismatch): Simplify to remove dependence on CL's internals.
* Reduce use of cl in lisp/emacs-lisp/.Stefan Monnier2012-06-101-21/+21
| | | | | | | | | * lisp/emacs-lisp/timer.el, lisp/emacs-lisp/syntax.el, lisp/emacs-lisp/smie.el: * lisp/emacs-lisp/ewoc.el, lisp/emacs-lisp/cconv.el,lisp/emacs-lisp/derived.el: * lisp/emacs-lisp/byte-opt.el, lisp/emacs-lisp/autoload.el: Convert to cl-lib. * lisp/emacs-lisp/easymenu.el, lisp/emacs-lisp/easy-mmode.el: * lisp/emacs-lisp/bytecomp.el: Use pcase instead of `cl'. * lisp/emacs-lisp/cl-lib.el: Get rid of special cl-macs auto load.
* Cleanup cl-macs namespace. Add macro helpers in macroexp.el.Stefan Monnier2012-06-071-32/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*, macroexp-if) (macroexp-let², macroexp--const-symbol-p, macroexp-const-p) (macroexp-copyable-p): New functions and macros. * emacs-lisp/edebug.el (edebug-unwrap): * emacs-lisp/disass.el (disassemble-internal): Use macroexp-progn. * emacs-lisp/pcase.el: Use macroexp-let*, macroexp-if, ... (pcase--let*): Remove. * emacs-lisp/bytecomp.el (byte-compile-const-symbol-p) (byte-compile-constp): Remove. Use macroexp--const-symbol-p and macroexp-const-p instead. * emacs-lisp/byte-opt.el: Use macroexp-const-p and macroexp-progn. * emacs-lisp/cl-macs.el: Clean up the name space by using "cl--" instead of "cl-" for internal definitions. Use macroexp-const-p. (cl-old-bc-file-form): Remove var. (cl-const-exprs-p): Remove fun. (cl-labels, cl-macrolet): Use backquote. (cl-lexical-let): Use cl-symbol-macrolet. Don't use cl-defun-expander. (cl-defun-expander, cl-byte-compile-compiler-macro): Remove fun. (cl-define-setf-expander): Rename from cl-define-setf-method. * emacs-lisp/cl.el: Adjust alias for define-setf-method. * international/mule-cmds.el: Don't require CL. (view-hello-file): Don't use `letf'.
* Add native compiler-macro support.Stefan Monnier2012-06-051-8/+6
| | | | | | | | | | | | * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Support compiler-macros directly. Properly follow aliases and apply the compiler macros more thoroughly. * lisp/emacs-lisp/cl.el: Don't copy compiler-macro properties any more since macroexpand now properly follows aliases. * lisp/emacs-lisp/cl-macs.el (toplevel, cl-define-compiler-macro) (cl-compiler-macroexpand): Use new prop. * lisp/emacs-lisp/byte-opt.el (featurep): Optimize earlier. * lisp/emacs-lisp/cl-lib.el (custom-print-functions): Add compatibility alias.
* * lisp/emacs-lisp/bytecomp.el: Fix last change.Stefan Monnier2012-06-011-5/+14
| | | | | | | | (byte-compile-output-docform): Re-add the print-circle bindings. (byte-compile-fix-header): Use #$ just because it's shorter. (byte-compile-output-file-form): Remove defun/defmacro. Fixes: debbugs:11594
* Merge from emacs-24; up to 2012-04-24T21:47:24Z!michael.albinus@gmx.deChong Yidong2012-05-311-7/+5
|\
| * Fix long filename handling of byte-compile-fix-header.Stefan Monnier2012-05-311-7/+5
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle arbitrary file name lengths (Bug#11585).
* | * lisp/emacs-lisp/byte-run.el (defmacro, defun): Move from C.Stefan Monnier2012-05-291-262/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (macro-declaration-function): Move var from C code. (macro-declaration-function): Define function with defalias. * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't handle defun/defmacro any more. * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature): Provide fallback for unknown arglist. (byte-compile-arglist-warn): Change calling convention. (byte-compile-output-file-form): Move print-vars binding. (byte-compile-output-docform): Simplify accordingly. (byte-compile-file-form-defun, byte-compile-file-form-defmacro) (byte-compile-defmacro-declaration): Remove. (byte-compile-file-form-defmumble): Generalize to defalias. (byte-compile-output-as-comment): Return byte-positions. Simplify callers accordingly. (byte-compile-lambda): Use `assert'. (byte-compile-defun, byte-compile-defmacro): Remove. (byte-compile-file-form-defalias): Use byte-compile-file-form-defmumble. (byte-compile-defalias-warn): Remove. * src/eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function): Move to byte-run.el. (Fautoload): Do the hash-doc more carefully. * src/data.c (Fdefalias): Purify definition, except for keymaps. (Qdefun): Move from eval.c. * src/lisp.h (Qdefun): Remove. * src/lread.c (read1): Tiny simplification. * lib-src/make-docfile.c: Improve comment style. (search_lisp_doc_at_eol): New function. (scan_lisp_file): Use it.
* | Fix minor corner case bugs in byte compilation and pcase.Stefan Monnier2012-05-291-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Don't re-preprocess functions from byte-compile-function-environment. * lisp/emacs-lisp/bytecomp.el (byte-compile-constp): Treat #'v as a constant. (byte-compile-close-variables): Bind byte-compile--outbuffer here... (byte-compile-from-buffer): ...rather than here. * lisp/emacs-lisp/pcase.el (pcase--expand): Accept different sets of vars in different alternative patterns. (pcase-codegen): Be more careful to preserve identity. (pcase--u1): Don't forget to mark vars as used.
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-root-dir): New var.Stefan Monnier2012-05-191-24/+27
| | | | | | | | (byte-compile-warning-prefix, batch-byte-compile-file): Use it.
* | * lisp/emacs-lisp/bytecomp.elStefan Monnier2012-05-021-13/+1
|/ | | | | | | | | (byte-compile-file-form-custom-declare-variable): Compile all elements, since cconv.el might have introduced :fun-body, internal-make-closure, and friends for bytecomp to handle. * lisp/custom.el (defcustom): Avoid ((λ ..) ..). Fixes: debbugs:11391
* * emacs-lisp/bytecomp.el (byte-compile-constants-vector): Allow moreStefan Monnier2012-03-261-3/+4
| | | | than 197 variables.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar):Stefan Monnier2012-02-091-42/+32
| | | | | | | | | Don't fallback on byte-compile-defvar. Optimize (defvar foo) away. (byte-compile-tmp-var): New const. (byte-compile-defvar): Use it to minimize .elc size. Just use `defvar' rather than simulate it. Fixes: debbugs:10761