summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Revert two accidental commitsDima Kogan2017-01-311-54/+0
| | | | | | | | | | This reverts commit f3c77d11af65f3b319b1784b4c3cf08c51aa7997. This reverts commit 3c941b900007c9e79c00af0f21d88154f6d8af1a.
| * stashDima Kogan2017-01-301-0/+54
| |
* | bytecomp.el: Use macroexp-const-p instead of bc-cond-valid-obj2-p.Vibhav Pant2017-02-051-11/+5
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Use (macroexp-cons-p) instead of (byte-compile-cond-valid-obj2-p) to make sure that obj1/obj2 can be compared with `eq'.
* | * byte-opt.el (byte-decompile-bytecode-1): Use eq instead of =.Vibhav Pant2017-02-051-1/+1
| |
* | ; Fix typo.Vibhav Pant2017-02-051-1/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info): Fix typo in docstring.
* | ; bytecomp.el (-inline-lapcode): Fix incorrect parenthesis, refactorVibhav Pant2017-02-051-5/+5
| |
* | bytecomp.el: Inline lapcode containing `byte-switch' correctly.Vibhav Pant2017-02-051-4/+35
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-inline-lapcode): Restore value of byte-compile-depth after emitting a jump to a tag in a jump table, or default/done tags. Set the depth of final tags for byte-switch to nil after emitting any jumps to them.
* | ; * byte-opt.el (byte-decompile-bytecode-1): Add more documentation.Vibhav Pant2017-02-051-1/+3
| |
* | byte-opt.el: Replace jump tables while decompiling correctly.Vibhav Pant2017-02-051-17/+22
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Don't make a copy of the constant vector, as it isn't used with the decompiled lapcode. Make sure that the correct lapcode pair/list is being modified while replacing the jump table.
* | bytecomp.el: Don't store non-keyword symbols in jump-tables.Vibhav Pant2017-02-051-5/+7
| | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return nil when OBJ is a non-keyword symbol (i.e a variable), as the jump table can only be used when comparing variables with constant values.
* | Revert "Use maphash instead of cl-loop."Vibhav Pant2017-02-031-4/+4
| | | | | | | | This reverts commit bfa88520136dd6b187ba101e6db5a5f8f0d5e874.
* | Use maphash instead of cl-loop.Vibhav Pant2017-02-011-4/+4
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-lapcode) Use maphash instead of cl-loop
* | * lisp/emacs-lisp/bytecomp.el: Create jump tables with :purecopy tVibhav Pant2017-01-301-0/+1
| |
* | Merge remote-tracking branch 'origin/master' into feature/byte-switchVibhav Pant2017-01-306-152/+51
|\|
| * Don't warn about obsolete defgenerics when defining themNoam Postavsky2017-01-291-7/+8
| | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): The declaration code should run after the definition code (Bug#25556).
| * Move cXXXr and cXXXXr to subr.elMark Oteiza2017-01-252-143/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Mention new core Elisp. * doc/lispref/lists.texi (List Elements): Document and index the new functions. * doc/misc/cl.texi (List Functions): Change "defines" to "aliases". * lisp/subr.el (caaar, caadr, cadar, caddr, cdaar, cdadr, cddar) (cdddr, caaaar caaadr, caadar, caaddr, cadaar, cadadr, caddar): (cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar): (cddddr): New functions. * lisp/emacs-lisp/cl-lib.el (cl-caaar, cl-caadr, cl-cadar, cl-caddr): (cl-cdaar, cl-cdadr, cl-cddar cl-cdddr, cl-caaaar cl-caaadr): (cl-caadar, cl-caaddr, cl-cadaar, cl-cadadr, cl-caddar, cl-cadddr): (cl-cdaaar, cl-cdaadr, cl-cdadar, cl-cdaddr, cl-cddaar, cl-cddadr): (cl-cdddar, cl-cddddr): Alias to new subr functions. * lisp/emacs-lisp/cl.el (cl-unload-function): Remove cXXXr and cXXXXr elements.
| * Give , and .@ doc strings. Fixes bug #24561.Alan Mackenzie2017-01-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make *Help* links to ``' possible. Also make usable as such doc strings on the function-documentation property of a symbol. * lisp/emacs-lisp/backquote.el (top-level): Give , and '@ doc strings on the function-documentation property. Also give these symbols a reader-construct property. * lisp/help-fns.el (describe-function): Allow the function-documentation property to work. Use princ rather than prin1 to print the function's name when it has a reader-construct property. (help-fns-signature): Don't insert `high-usage' for a reader-construct. (describe-function-1): Adapt to process documentation on the function-documentation property. Print "a reader construct" when appropriate. * lisp/help-mode.el (help-xref-symbol-regexp): Amend this regexp also to match ``'.
| * Prevent to use tabulated-list--near-rows unboundTino Calancha2017-01-221-2/+7
| | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
| * Fix free var FOO-mode-{syntax,abbrev}-table warningsNoam Postavsky2017-01-191-0/+2
| | | | | | | | | | | | * lisp/emacs-lisp/derived.el (define-derived-mode): Unconditionally defvar the syntax and abbrev tables so that the compiler will know that they are dynamically bound variables (Bug#25446).
* | * lisp/emacs-lisp/bytecomp.el:(bc-cond-jump-table-info)add docstringVibhav Pant2017-01-261-0/+7
| |
* | * lisp/emacs-lisp/bytecomp.el: Use correct function to push nilVibhav Pant2017-01-261-1/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Use byte-compile-constant instead of byte-compile-form to push nil.
* | * lisp/emacs-lisp/disass.el: Fix spacing while showing jump tablesVibhav Pant2017-01-261-4/+8
| |
* | * lisp/emacs-lisp/disass.el: Display jump tables for switch.Vibhav Pant2017-01-261-3/+11
| |
* | * lisp/emacs-lisp/bytecomp.el:Use correct size for switch jump-tableVibhav Pant2017-01-261-1/+4
| |
* | * lisp/emacs-lisp/bytecomp.el: Simplify b-c-cond-valid-obj2-pVibhav Pant2017-01-261-5/+5
| |
* | * lisp/emacs-lisp/bytecomp.el: Fix byte-switch codegen with symbols.Vibhav Pant2017-01-261-1/+1
| |
* | * lisp/emacs-lisp/byte-opt.el: Add support for decompiling switchVibhav Pant2017-01-261-3/+24
| | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el: (byte-decompile-bytecode-1) When the constant encountered precedes a byte-switch op, replace all the addresses in the jump table with tags.
* | * lisp/emacs-lisp/bytecomp.el: Remove unused debugging statements.Vibhav Pant2017-01-211-2/+0
| |
* | * lisp/emacs-lisp/bytecomp.el: Fix errors with matching quoted formsVibhav Pant2017-01-191-1/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table-info) eval obj2 to avoid quoted forms being stored as is.
* | lisp/emacs-lisp/bytecomp.el: Use byte-switch only for quoted symbolsVibhav Pant2017-01-191-1/+3
| |
* | * lisp/emacs-lisp/bytecomp.el: Add default-case for last cond clause.Vibhav Pant2017-01-191-16/+19
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-jump-table) Add default-case for last cond clause.
* | Use byte-switch for all symbols.Vibhav Pant2017-01-191-1/+0
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el: (byte-compile-cond-valid-obj2-p) Return t for all symbols (instead for just keywords)
* | * lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use.Vibhav Pant2017-01-151-4/+3
| | | | | | | | | | * byte-opt.el: (byte-optimize-lapcode): Return nil instantly on finding the tag in a jump table.
* | * lisp/emacs-lisp/bytecomp.el: Add documentation, remove code duplicationVibhav Pant2017-01-151-21/+34
| |
* | Add new 'switch' byte-code.Vibhav Pant2017-01-152-38/+150
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 'switch' takes two arguments from the stack: the variable to test, and a jump table (implemented as a hash-table with the appropriate :test function). By looking up the value of the variable in the hash table, the interpreter can jump to the label pointed to by the value, if any. This implementation can only be used for `cond' forms of the type `(cond ((test x 'foo) 'bar) ...)`, such that the function `test` and variable `x` is same for all clauses. * lisp/emacs-lisp/bytecomp.el: * Add (byte-compile-cond-valid-obj2-p), (byte-compile-cond-vars), (byte-compile-cond-jump-table-info), (byte-compile-jump-table-add-tag), (byte-compile-cond-jump-table), byte-compile-jump-tables. * Add defcustom `byte-compile-cond-use-jump-table'. * (byte-compile-cond): Use them. * (byte-compile-lapcode): Patch tags present in jump tables, if any. * lisp/emacs-lisp//byte-opt.el: (byte-optimize-lapcode): Add checks to some peephole optimizations to prevent them from messing up any code involving `byte-switch`. * src/bytecode.c: (exec_byte_code): Add bytecode Bswitch.
* (cl-defstruct): Improve error message for slots w/o value (bug#25312)Stefan Monnier2017-01-031-1/+17
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't signal an error but emit a warning for those coders who forgot to put a default value in their slot.
* Update copyright year to 2017 in masterPaul Eggert2017-01-012-2/+2
| | | | | | Run admin/update-copyright in the master branch. This fixes files that were not already fixed in the emacs-25 branch before it was merged here.
* Merge from origin/emacs-25Paul Eggert2017-01-0183-83/+83
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Fix copyright years by handPaul Eggert2017-01-011-1/+1
| | | | | | | | | | These are dates that admin/update-copyright did not update, or updated incorrectly.
| * Update copyright year to 2017Paul Eggert2016-12-3182-82/+82
| | | | | | | | Run admin/update-copyright.
| * * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)Stefan Monnier2016-12-281-3/+3
| | | | | | | | | | (inline--dont-quote): Quote the function with #' when passing it to `apply'. Cherry picked from commit e6161f648903d821865b9610b3b6aa0f82a5dcb7.
* | Merge from origin/emacs-25Paul Eggert2017-01-011-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9adb101 Document 'describe-fontset' 229315c ; Add missing symbol quoting. 3d94931 Repair desktop restoration on text terminals 43022f9 Ignore forward-sexp-function in js-mode indentation code b19fb49 Improve documentation of 'define-coding-system' 467768f Fix Bug#25162 6db78ae Fix a typo in define-abbrev-table 5f7d906 Bump makeinfo requirement from 4.7 to 4.13 442e2f6 Fixes related to select-enable-clipboard e4ac450 Define struct predicate before acccesors 08decbd Doc fix for vc-git 5531e75 Further improve make-dist checking 953bf67 Improve previous make-dist change 129645a Make make-dist --snapshot do some sanity checks # Conflicts: # lisp/menu-bar.el
| * Define struct predicate before acccesorsNoam Postavsky2016-12-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | The accessor functions use the predicate function, which causes problems when reloading after unload-feature: the compiler-macro property is still present on the predicate symbol, and the compiler fails to find the definition when trying to inline it into the accessor function (Bug#25088). * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Move predicate definition before field accessor definitions.
| * * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix docstringPhilipp Stephani2016-12-071-3/+4
| | | | | | | | | | so that it matches the actual implementation. See https://lists.gnu.org/archive/html/help-gnu-emacs/2016-04/msg00071.html
* | Give eval-and-compile a correct edebug spec. Fixes bug #16184 properly.Alan Mackenzie2017-01-012-7/+4
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug_offset_indices): Revert abortive commit from Thu Dec 29 09:22:36 2016 +0000 which didn't really fix the bug. * lisp/emacs-lisp/byte-run.el (eval-and-compile): Change the edebug spec from t to (&rest def-form).
* | Checkdoc: use syntax functions instead of regexPhilipp Stephani2016-12-311-28/+31
| | | | | | | | | | | | | | | | | | | | | | In checkdoc.el, get rid of the error-prone regex to find definition forms, and use existing syntax-based navigation functions instead. This fixes a corner case with one-argument `defvar' forms. * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): New function. (checkdoc-next-docstring, checkdoc-defun): Use it. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--next-docstring): Add unit test.
* | Initialize edebug-offset-indices to a cons, not nil. Fixes bug #16184.Alan Mackenzie2016-12-291-3/+6
| | | | | | | | | | | | | | | | This is because there are times when this variable is changed by setcar before an atom is pushed onto it by debug-enter. This happens, for example, whilst instrumenting c-font-lock-declarations in .../lisp/progmodes/cc-fonts.el. * lisp/emacs-lisp/edebug.el (edebug-offset-indices): initialize to '(0).
* | * lisp/emacs-lisp/inline.el: Fix apply-conversion (bug#25280)Stefan Monnier2016-12-271-3/+3
| | | | | | | | (inline--dont-quote): Quote the function with #' when passing it to `apply'.
* | Checkdoc: Don't require a space before an arg listPhilipp Stephani2016-12-261-1/+1
| | | | | | | | | | | | | | | | | | See Bug#24998. * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-regexp): Don't require a space before a argument list. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--bug-24998): Add unit test.
* | * src/data.c (Fmake_variable_frame_local): RemoveStefan Monnier2016-12-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'. * src/data.c (swap_in_symval_forwarding, set_internal) (set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local) (Fmake_local_variable, Fkill_local_variable, Flocal_variable_p): Don't pay attention to ->frame_local any more. (syms_of_data): Remove Qtrapping_frame_local and don't defsubr Smake_variable_frame_local. * etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal of make-variable-frame-local. * lisp/help-fns.el (describe-variable): Don't handle the now impossible frame-local case. * lisp/subr.el (make-variable-frame-local): Remove obsolescence data. * src/frame.c (store_frame_param): * src/eval.c (specbind): Don't pay attention to ->frame_local any more. * src/widget.c (first_frame_p): Remove, unused.