summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* * 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
| |