summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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.
* | Fix rx-any with range with ?\] and ?-Noam Postavsky2016-12-181-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/rx.el: Make sure not to produce a circular list (Bug#25123). * test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test.
* | Make seq-into return the sequence when no conversion neededNicolas Petton2016-12-161-6/+22
| | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when no conversion is needed. * test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add a regression test checking for identity.
* | Fix circular list handling in seq-mapnNicolas Petton2016-12-151-1/+4
| | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments. * test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists): Add a regression test.
* | Replace ldefs-boot with a much smaller filePhillip Lord2016-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (bootstrap-build,generate-ldefs-boot): New targets. (bootstrap): Depend on bootstrap-build. * admin/ldefs-clean.el: New file. * lisp/Makefile.in (compile-first): Depend on loaddefs.el * lisp/ldefs-boot.el: Remove. * lisp/ldefs-boot-auto.el: New file. * lisp/ldefs-boot-manual.el: New file. * lisp/loadup.el: Load ldefs-boot-manual.el. * src/emacs.c (generating_ldefs_boot): New variable. (main): Check whether we are generating ldefs. * src/eval.c (autoload-do-load): Dump autoload forms to stderr when requested. * src/lisp.h (generating_ldefs_boot): New variable. * admin/gitmerge.el, admin/make-tarball.txt, admin/notes/copyright, lisp/Makefile.in, lisp/cus-dep.el, lisp/emacs-lisp/elint.el, lisp/finder.el, lisp/loadup.el, msdos/mainmake.v2: Update reference to ldefs-boot. * admin/update_autogen: Alter mechanism for ldefs-boot generation.
* | Minor fix for define-derived-modeGlenn Morris2016-12-121-5/+6
| | | | | | | | | | | | * lisp/emacs-lisp/derived.el (define-derived-mode): Do not let eg eval-defun reset the values of syntax or abbrev tables, since they might have been defined externally. (Bug#16160)
* | Move backtrace to ELisp using a new mapbacktrace primitiveClément Pit--Claudel2016-12-121-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/eval.c (get_backtrace_starting_at, backtrace_frame_apply) (Fmapbacktrace, Fbacktrace_frame_internal): New functions. (get_backtrace_frame, Fbacktrace_debug): Use `get_backtrace_starting_at'. * lisp/subr.el (backtrace--print-frame): New function. (backtrace): Reimplement using `backtrace--print-frame' and `mapbacktrace'. (backtrace-frame): Reimplement using `backtrace-frame--internal'. * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Pass a base to `mapbacktrace' instead of searching for "(debug" in the output of `backtrace'. * test/lisp/subr-tests.el (subr-test-backtrace-simple-tests) (subr-test-backtrace-integration-test): New tests. * doc/lispref/debugging.texi (Internals of Debugger): Document `mapbacktrace' and missing argument BASE of `backtrace-frame'.
* | Minor advice.el fixGlenn Morris2016-12-121-1/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/advice.el (ad-preactivate-advice): Avoid setting the function definition of nil. This was happening during bootstrap of org-compat.el, apparently due to eager macro expansion of code behind a (featurep 'xemacs) test.
* | Do not allow nil to be defined as a functionGlenn Morris2016-12-101-0/+1
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defun): * src/data.c (Ffset): Do not allow "nil". (Bug#25110)
* | Add some sanity checking of defun arglistNicolas Richard2016-12-101-0/+4
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defun): Check for malformed argument lists. (Bug#15715)
* | Retain message logging in map-y-or-n-pGlenn Morris2016-12-071-2/+1
| | | | | | | | | | * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Stop disabling logging to Messages buffer. (Bug#13326)
* | Merge from origin/emacs-25Paul Eggert2016-12-071-1/+1
|\| | | | | | | 35ce3fb Don't assume window-point and point are the same
| * Don't assume window-point and point are the sameNoam Postavsky2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | The function `cursor-sensor--detect' calls `bobp' to decide whether to check properties at (1- (window-point)). However, (window-point) may be at beginning of buffer, even if (point) is not. In this case an `args-out-of-range' error will be signaled (Bug#25104). * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Check the value of (window-point) against (point-min), rather than (bobp) to decide if (1- (window-point)) is accessible.
* | Docstring improvement for seq-some (bug#25129)Nicolas Petton2016-12-071-1/+2
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-some): Make the docstring less confusing regarding the returned value.
* | Fix ert-tests when running compiledNoam Postavsky2016-12-061-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/ert-tests.el (ert-test-deftest): Don't test for specific macroexpansion, just check result of evaluation. (ert-test-record-backtrace): Don't hardcode representation of closure in expected backtrace, this lets the test succeed even when the test code is compiled. * lisp/emacs-lisp/ert.el (ert--expand-should-1): Also pass `byte-compile-macro-environment' to `macroexpand', this allows the `should' macro to properly handle macroexpansion of macros that were defined in the same file when it's being compiled (Bug #17851).