summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
Commit message (Collapse)AuthorAgeFilesLines
* Address a compilation warning.Glenn Morris2015-06-161-1/+1
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias): Replace 't' with '_' in pcase.
* Address some compilation warnings.Glenn Morris2015-06-161-1/+1
| | | | | | | | | | | | | * lisp/face-remap.el (text-scale-adjust): * lisp/menu-bar.el (popup-menu-normalize-position): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): * lisp/emacs-lisp/generator.el (cps--transform-1): * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): * lisp/obsolete/vc-arch.el (vc-arch-mode-line-string): * lisp/progmodes/octave.el (octave-goto-function-definition) (octave-find-definition-default-filename): Replace 't' with '_' in pcase.
* Don't quote nil and t in doc stringsPaul Eggert2015-05-211-1/+1
| | | | | This is as per "Tips for Documentation Strings" in the elisp manual. For consistency, do the same in diagnostics and comments.
* Minor declare-function improvementGlenn Morris2015-05-051-5/+11
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-macroexpand-declare-function): Handle declarations after calls. (Bug#20509)
* * lisp/emacs-lisp/bytecomp.el: Revert "Silence noninteractive compilations"Artur Malabarba2015-05-011-44/+19
| | | | | | | This reverts commit 9a7ddde977378cb5276a81476ae458889c403267. This reverts commit 3c0ea587daf8b17960b90603a70e3ac4057d883d. With message: "* lisp/emacs-lisp/bytecomp.el: Use `inhibit-message'". (Bug#20445).
* * lisp/emacs-lisp/bytecomp.el: Use `inhibit-message'Artur Malabarba2015-04-291-3/+2
| | | | | (byte-compile--message): Use `inhibit-message' instead of hiding the previous message with (message nil).
* * lisp/emacs-lisp/bytecomp.el: Silence noninteractive compilationsArtur Malabarba2015-04-121-19/+45
| | | | | | | | | | (byte-compile--interactive): New var. (byte-compile--message): New function. (byte-compile-log-1, byte-force-recompile) (byte-recompile-directory, byte-recompile-file) (byte-compile-file, compile-defun) (byte-compile-file-form-defmumble, byte-compile) (byte-compile-file-form-defalias, display-call-tree): Use it.
* Speed up byte-compilation and autoload generation by avoiding mode-hooksArtur Malabarba2015-04-121-1/+1
| | | | | | | | | | | | This prevents emacs-lisp-mode-hook from being run everytime an autoload file is generated, which can account for a fraction of package installation time depending on the hooks the user has configured. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use delay-mode-hooks. * lisp/emacs-lisp/autoload.el (autoload-find-file) (autoload-find-generated-file): Use delay-mode-hooks.
* * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Keep type=nil by default.Stefan Monnier2015-02-161-7/+7
| | | | | | | * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Add sanity checks about relationship between `type', `named', and `slots'. * lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tagcode): Adjust to new value of `cl-struct-type' property.
* Add (:documentation <form>) for dynamically-generated docstringsStefan Monnier2015-02-051-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-initial-macro-environment): Use macroexp-progn. (byte-compile-cl-warn): Don't silence use of cl-macroexpand-all. (byte-compile-file-form-defvar-function): Rename from byte-compile-file-form-define-abbrev-table. (defvaralias, byte-compile-file-form-custom-declare-variable): Use it. (byte-compile): Use byte-compile-top-level rather than byte-compile-lambda so we can compile non-values. (byte-compile-form): Add warnings for failed uses of lexical vars via quoted symbols. (byte-compile-unfold-bcf): Improve message for failed inlining. (byte-compile-make-closure): Handle new format of internal-make-closure for dynamically-generated docstrings. * lisp/emacs-lisp/cconv.el (cconv--convert-function): Add `docstring' argument. (cconv-convert): Use it to handle the new (:documentation ...) form. (cconv-analyze-form): Handle the new (:documentation ...) form. * src/eval.c (Ffunction): Handle the new (:documentation ...) form. (syms_of_eval): Declare `:documentation'.
* Don't downcase system diagnostics' first lettersPaul Eggert2015-01-211-2/+2
| | | | | | | | | | | | | | | | | | * etc/NEWS: Document this. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/ffap.el (find-file-at-point): * lisp/files.el (insert-file-1): * lisp/net/ange-ftp.el (ange-ftp-barf-if-not-directory) (ange-ftp-copy-file-internal): * lisp/progmodes/etags.el (visit-tags-table): * lisp/url/url-dav.el (url-dav-delete-directory, url-dav-delete-file) (url-dav-directory-files): Keep diagnostics consistent with system's. * lisp/erc/erc-dcc.el (erc-dcc-server): * lisp/ffap.el (ffap-machine-p): Ignore case while comparing diagnostics. * src/fileio.c (report_file_errno): Don't downcase, and simplify. Fixes: bug#19642
* lisp/emacs-lisp/eieio*.el: Rewrite our generics on top of cl-genericStefan Monnier2015-01-201-1/+1
| | | | | | | | | | | | | * lisp/emacs-lisp/eieio-generic.el: Remove. (defgeneric, defmethod): Move to eieio-compat.el. Mark obsolete. * lisp/emacs-lisp/eieio-compat.el: New file. * lisp/emacs-lisp/eieio.el: Don't require eieio-generic any more. * lisp/emacs-lisp/eieio-core.el (eieio--slot-originating-class-p): Remove unused function. (eieio-defclass): Move to eieio-compat.el. * lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): New function. (macroexp--expand-all): Use it. * lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel): Here too.
* Less 'make' chatter in batch modePaul Eggert2015-01-031-1/+1
| | | | | | | | | * admin/unidata/unidata-gen.el (unidata-gen-files): * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/files.el (save-buffer, basic-save-buffer): * lisp/international/quail.el (quail-update-leim-list-file): Don't output messages like "Generating ..." in batch mode.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Spelling fixesPaul Eggert2014-12-131-1/+1
| | | | | | | | | | | | | All uses changed. * lib-src/etags.c (analyze_regex): Rename from analyse_regex. * lisp/cedet/semantic/lex-spp.el: (semantic-lex-spp-analyzer-do-replace): Rename from semantic-lex-spp-anlyzer-do-replace. * lisp/emacs-lisp/cconv.el (cconv--analyze-use): Rename from cconv--analyse-use. (cconv--analyze-function): Rename from cconv--analyse-function. (cconv-analyze-form): Rename from cconv-analyse-form. * src/regex.c (analyze_first): Rename from analyze_first.
* * lisp: Prefer inlinable functions to macros.Stefan Monnier2014-12-051-0/+4
| | | | | | | | | | | | | | | | | * lisp/fringe.el (fringe-bitmap-p): Make it a plain function. * lisp/tooltip.el (tooltip-region-active-p): Remove. * lisp/net/shr.el (shr-char-breakable-p, shr-char-kinsoku-bol-p) (shr-char-kinsoku-eol-p, shr-char-nospace-p): Use define-inline. * lisp/url/url-future.el (url-future-done-p, url-future-completed-p) (url-future-errored-p, url-future-cancelled-p): * lisp/url/url-dav.el (url-dav-http-success-p): Use define-inline. * lisp/vc/ediff-init.el (ediff-odd-p): Remove. (ediff-background-face): Use cl-oddp instead. (ediff-buffer-live-p): Make it a defsubst.
* Fix bootstrap failure after last change to eval-and-compile.Stefan Monnier2014-11-091-24/+30
| | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Don't call byte-compile-preprocess since the result will go through cconv. (byte-compile-output-docform): Handle uninterned `name' correctly. * lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Use interned name to circumvent byte-compiler bug. * lisp/emacs-lisp/cl-extra.el (cl-get): Silence compiler warning. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Fix typo. (macroexp--compiler-macro): Remove left-over debug code.
* Merge from emacs-24; up to 117689Glenn Morris2014-11-081-2/+5
|\
| * * bytecomp.el (byte-compile-report-error): Allow the argument to be a string.Glenn Morris2014-11-081-2/+5
| | | | | | | | Due to the vague doc, it was already being used this way.
* | * lisp/emacs-lisp/bytecomp.el: Add a warning and remove a spurious warning.Stefan Monnier2014-11-081-50/+54
| | | | | | | | | | | | | | (byte-compile-initial-macro-environment): Don't compile before eval in `eval-and-compile'. (byte-compile-arglist-warn): Add check for defining macros after their first use. Check call use even if the function is fboundp.
* | Merge from emacs-24; up to 117634Glenn Morris2014-10-291-9/+14
|\ \ | |/
| * * lisp/emacs-lisp/bytecomp.el: Require cl-extra.Stefan Monnier2014-10-231-1/+5
| | | | | | | | | | | | * lisp/emacs-lisp/cl-extra.el: Add missing provide. Fixes: debbugs:18804
| * * lisp/emacs-lisp/bytecomp.el (byte-compile-and-folded): Optimize case whereStefan Monnier2014-10-221-9/+10
| | | | | | | | | | | | | | all args are copyable. (=, <, >, <=, >=): Re-enable the optimization. Fixes: debbugs:18767
* | * lisp/emacs-lisp/bytecomp.el (byte-compile--use-old-handlers): Change default.Stefan Monnier2014-10-231-1/+1
| |
* | * lisp/select.el: Use lexical-binding.Stefan Monnier2014-10-221-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gui-set-selection): Provide an implementation for non-GUI frames. * lisp/term/x-win.el: Use lexical-binding. (x-clipboard-yank): Fix up missed renamings. * lisp/term/w32-win.el (libgif-version, libjpeg-version): Silence compiler. (w32--set-selection): Fix up var names. * lisp/term/pc-win.el: Use lexical-binding. (w16-selection-exists-p): Silence compiler warning. (w16-selection-owner-p): Fix up missed renamings. * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Remove left-over debug. * lisp/frame.el (frame-notice-user-settings): Fix excessive quoting. Fixes: debbugs:18791
* | Merge from emacs-24; up to 2014-07-28T06:28:15Z!dmantipov@yandex.ruGlenn Morris2014-10-201-5/+6
|\ \ | |/
| * Restore temporarily reverted bytecomp changeStefan Monnier2014-10-201-5/+6
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (=, <, >, <=, >=): Don't optimize multi-arg case. Fixes: debbugs:18767
| * Temporarily revert previous bytecomp changeGlenn Morris2014-10-201-6/+5
| |
| * * lisp/emacs-lisp/bytecomp.el (=, <, >, <=, >=): Don't optimize multi-argStefan Monnier2014-10-191-5/+6
| | | | | | | | | | | | case. Fixes: debbugs:18767
* | * lisp/subr.el (track-mouse): New macro.Stefan Monnier2014-09-271-7/+0
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Remove track-mouse case. * lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove. * src/keyboard.c (track-mouse): Rename to internal--track-mouse. Make it into a function and change arg to be a function.
* | * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usageStefan Monnier2014-09-221-2/+5
| | | | | | | | for functions with no arguments.
* | Minor bytecomp.el fixesDaniel Colascione2014-04-211-20/+20
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Use lambda function values, not quoted lambdas. (byte-compile-recurse-toplevel): Remove extraneous &optional.
* | Correctly treat progn contents as toplevel forms when byte compilingDaniel Colascione2014-04-211-23/+44
|/
* Move some help functions from help-fns.el to help.el, which is preloaded.Glenn Morris2014-03-131-1/+0
| | | | | | | | | | | | | | They are now needed by eg the function `documentation' in some circumstances. * lisp/help-fns.el (help-split-fundoc, help-add-fundoc-usage) (help-function-arglist, help-make-usage): Move from here... * lisp/help.el (help-split-fundoc, help-add-fundoc-usage) (help-function-arglist, help-make-usage): ... to here. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Do not load help-fns. Fixes: debbugs:17001
* Replace "Maintainer: FSF" with the emacs-devel mailing addressGlenn Morris2014-02-091-1/+1
|
* "Use instead" obsolescence messages should end with "."Glenn Morris2014-02-061-1/+1
|
* Silence byte-compiler warning.Juanma Barranquero2014-01-241-3/+1
| | | | | * emacs-lisp/bytecomp.el (byte-compile-file): Remove unused local variable `file-name'.
* Use whole file-name-history'.Daniel Colascione2014-01-151-1/+1
|
* * lisp/abbrev.el (define-abbrev): Beware new meaning of fboundp.Stefan Monnier2014-01-061-8/+5
| | | | | | | | | | | * lisp/emacs-lisp/elint.el (elint-find-builtins): * lisp/emacs-lisp/eldoc.el (eldoc-symbol-function): * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn) (byte-compile-file-form-defmumble, byte-compile, byte-compile-form): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/apropos.el (apropos-safe-documentation): * lisp/subr.el (symbol-file): Remove redundant fboundp. * lisp/progmodes/idlw-shell.el (idlwave-shell-comint-filter): Use defalias.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-2/+2
|
* Make the `interactive-only' bytecomp warning like the `obsolete' oneGlenn Morris2013-11-301-8/+12
| | | | | | | | | | | | * emacs-lisp/bytecomp.el (byte-compile-form): Make the `interactive-only' warning like the `obsolete' one. * comint.el (comint-run): * files.el (insert-file-literally, insert-file): * replace.el (replace-string, replace-regexp): * simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char) (goto-line, insert-buffer, next-line, previous-line): Tweak `interactive-only' spec.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Fix a typo.Bozhidar Batsov2013-11-251-1/+1
|
* * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):Bozhidar Batsov2013-11-251-10/+16
| | | | | | | Mark as obsolete and replace it with a symbol property. (byte-compile-form): Use new 'interactive-only property. * lisp/comint.el, lisp/files.el, lisp/replace.el, lisp/simple.el: Apply new 'interactive-only properly.
* Cleanup namespace of dos-w32.el.Stefan Monnier2013-10-291-5/+16
| | | | | | | | | | | | | | | | | | | | | | | * lisp/dos-w32.el (minibuffer-history-case-insensitive-variables) (path-separator, null-device, buffer-file-coding-system) (lpr-headers-switches): Check system-type before modifying them. (find-buffer-file-type-coding-system): Mark obsolete. (w32-find-file-not-found-set-buffer-file-coding-system): Rename from find-file-not-found-set-buffer-file-coding-system. (w32-untranslated-filesystem-list, w32-untranslated-canonical-name): (w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem) (w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p): (w32-direct-print-region-helper, w32-direct-print-region-function) (w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix. * lisp/startup.el (normal-top-level-add-subdirs-to-load-path): * lisp/ps-print.el (ps-print-region-function): * lisp/lpr.el (print-region-function): Use new name. * lisp/simple.el (copy-region-as-kill): Fix call to region-extract-function. * lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler. (byte-compile-and-folded): New function. (=, <, >, <=, >=): Use it.
* Introduce new bytecodes for efficient catch/condition-case in lexbind.Stefan Monnier2013-10-031-12/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Optimize under `condition-case' and `catch' if byte-compile--use-old-handlers is nil. (disassemble-offset): Handle new bytecodes. * lisp/emacs-lisp/bytecomp.el (byte-pushcatch, byte-pushconditioncase) (byte-pophandler): New byte codes. (byte-goto-ops): Adjust accordingly. (byte-compile--use-old-handlers): New var. (byte-compile-catch): Use new byte codes depending on byte-compile--use-old-handlers. (byte-compile-condition-case--old): Rename from byte-compile-condition-case. (byte-compile-condition-case--new): New function. (byte-compile-condition-case): New function that dispatches depending on byte-compile--use-old-handlers. (byte-compile-unwind-protect): Pass a function to byte-unwind-protect when we can. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Adjust for the new compilation scheme using the new byte-codes. * src/alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist, and make them unconditional now that they're heap-allocated. * src/bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase and Bpophandler. (bcall0): New function. (exec_byte_code): Add corresponding cases. Improve error message when encountering an invalid byte-code. Let Bunwind_protect accept a function (rather than a list of expressions) as argument. * src/eval.c (catchlist): Remove (merge with handlerlist). (handlerlist, lisp_eval_depth): Not static any more. (internal_catch, internal_condition_case, internal_condition_case_1) (internal_condition_case_2, internal_condition_case_n): Use PUSH_HANDLER. (unwind_to_catch, Fthrow, Fsignal): Adjust to merged handlerlist/catchlist. (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new handlerlist which can only handle a single condition-case handler at a time. (find_handler_clause): Simplify since we only a single branch here any more. * src/lisp.h (struct handler): Merge struct handler and struct catchtag. (PUSH_HANDLER): New macro. (catchlist): Remove. (handlerlist): Always declare.
* * bytecomp.el (byte-recompile-directory): Fix is-this-a-directory logic.Glenn Morris2013-08-301-10/+10
| | | | Fixes: debbugs:15220
* * bytecomp.el (byte-compile-make-variable-buffer-local): Tweak warning.Glenn Morris2013-08-151-1/+1
| | | | Fixes: debbugs:14926
* * lisp/emacs-lisp/bytecomp.el (byte-compile-function-warn): New function,Stefan Monnier2013-08-071-35/+20
| | | | | | extracted from byte-compile-callargs-warn and byte-compile-normal-call. (byte-compile-callargs-warn, byte-compile-function-form): Use it. (byte-compile-normal-call): Remove obsolescence check.
* * lisp/emacs-lisp/bytecomp.el: Check existence of f in #'f.Stefan Monnier2013-08-071-39/+57
| | | | | | | (byte-compile-callargs-warn): Use `push'. (byte-compile-arglist-warn): Ignore higher-order "calls". (byte-compile-file-form-autoload): Use `pcase'. (byte-compile-function-form): If quoting a symbol, check that it exists.
* Check autoload's "type" argument correctly in bytecomp.elGlenn Morris2013-06-191-2/+2
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Only eval autoloaded macros. (byte-compile-autoload): Only give the macro warning for macros.