summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Support (rx (and (regexp EXPR) (literal EXPR))) (Bug#36237)Noam Postavsky2019-06-251-88/+154
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/rx.el (rx-regexp): Allow non-string forms. (rx-constituents): Add literal constituent, which is like a plain STRING form, but allows arbitrary lisp expressions. (rx-literal): New function. (rx-compile-to-lisp): New variable. (rx--subforms): New helper function for handling subforms, including non-constant case. (rx-group-if, rx-and, rx-or, rx-=, rx->=, rx-repeat, rx-submatch) (rx-submatch-n, rx-kleene, rx-atomic-p): Use it to handle non-constant subforms. (rx): Document new form, wrap non-constant forms with concat call. * test/lisp/emacs-lisp/rx-tests.el (rx-tests--match): New macro. (rx-nonstring-expr, rx-nonstring-expr-non-greedy): New tests. * etc/NEWS: Announce changes.
* * lisp/emacs-lisp/cl-extra.el (cl-isqrt): Speed up bignum caseStefan Monnier2019-06-251-3/+2
|
* Move widen/narrow in tabulated lists to } and {Lars Ingebrigtsen2019-06-251-2/+2
| | | | | | | * doc/emacs/buffers.texi (Several Buffers): Document it. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Move widen/narrow to `}' and `{'.
* Preserve header lines from derived modes in tabulated listsVaidheeswaran C2019-06-251-2/+7
| | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header): Preserve header line set by derived modes (bug#21025).
* Add imenu support to package-menu-modeDamien Cassou2019-06-251-1/+23
| | | | | | | * lisp/emacs-list/package.el (package--imenu-prev-index-position-function package--imenu-extract-index-name-function): Add Imenu functions to package-menu-mode (bug#27134).
* Fix up key bindings in previous tabulated-list patchLars Ingebrigtsen2019-06-241-2/+2
| | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Actually use `w'/`c' as described in previous patch.
* Add new commands to widen/narrow tabulated list columnsLars Ingebrigtsen2019-06-241-0/+35
| | | | | | | | | | | * doc/emacs/buffers.texi: Document widen/contracting commands in tabulated list mode. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Add keystrokes. (tabulated-list-widen-current-column): New command. (tabulated-list-narrow-current-column): Ditto. The code was written by Boruch Baum and then tweaked by Drew Adams (bug#32106) before some white-space changes before the commit.
* Document syntax-ppss-contextLars Ingebrigtsen2019-06-241-0/+4
| | | | | | | * doc/lispref/syntax.texi (Parser State): Document it. * lisp/emacs-lisp/syntax.el (syntax-ppss-context): Add a doc string (bug#32504).
* (if-let): Improve docstring by mentioning let*Alex Branham2019-06-231-2/+3
| | | | | * lisp/emacs-lisp/subr-x.el (if-let): Clarify that if-let is like let*, not like let (bug#33550).
* Check validity of rx submatch-n numberMattias Engdegård2019-06-231-0/+2
| | | | * lisp/emacs-lisp/rx.el (rx-submatch): Type and range check (Bug#34373).
* (with-suppressed-warnings): Also suppress warnings when not byte-compilingStefan Monnier2019-06-221-5/+17
| | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Bind byte-compile--suppressed-warnings when possible.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-dynamic): Mark obsoleteStefan Monnier2019-06-215-8/+2
| | | | | | | | | | | | See bug#11649 for an example problem, and emacs-devel discussion «Prickliness of the "invalid byte code" stuff». * lisp/wid-edit.el, lisp/wdired.el, lisp/vc/pcvs-util.el: * lisp/progmodes/executable.el, lisp/mail/sendmail.el: * lisp/emacs-lisp/cl-seq.el, lisp/emacs-lisp/cl-macs.el: * lisp/emacs-lisp/cl-lib.el, lisp/emacs-lisp/cl-extra.el: * lisp/dired-x.el, lisp/dired-aux.el, lisp/calendar/calendar.el: Don't use byte-compile-dynamic any more.
* Clean up eieio-custom slightlyLars Ingebrigtsen2019-06-201-5/+0
| | | | * lisp/emacs-lisp/eieio-custom.el: Remove commented out code.
* Remove XEmacs compat code from checkdoc.elLars Ingebrigtsen2019-06-201-7/+3
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map): Remove XEmacs compat code.
* Move around defgeneric/defmethods in eieioLars Ingebrigtsen2019-06-192-17/+19
| | | | | | | * lisp/emacs-lisp/eieio.el (object-print): * lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string): Move the defgeneric before the defmethod, because that makes more sense.
* (with-suppressed-warnings): Make it apply to macro-expansion as wellStefan Monnier2019-06-191-20/+14
| | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Change with-suppressed-warnings so it also affects the macro-expansion of the body.
* Tweak progress reporting in update-directory-autoloadsLars Ingebrigtsen2019-06-191-6/+8
| | | | | * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Use progress reporter so say what percentage the progress is at.
* Compile any subsequence of `cond' clauses to switch (bug#36139)Mattias Engdegård2019-06-191-180/+162
| | | | | | | | | | | | | | | | | | | | A single `cond' form can how be compiled to any number of switch ops, optionally interspersed with non-switch conditions. Previously, switch ops would only be used for whole `cond' forms containing no other tests. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-vars): Rename from `byte-compile-cond-vars'. (byte-compile--default-val): Remove. (byte-compile--cond-switch-prefix): Replace `byte-compile-cond-jump-table-info'; now also returns trailing non-switch clauses. (byte-compile-cond-jump-table): New arguments; no longer compiles the default case. (byte-compile-cond): Look for and compile switches at any place in the list of clauses. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data): Add test expression.
* Compile cond with heterogeneous tests into switch (bug#36139)Mattias Engdegård2019-06-191-12/+17
| | | | | | | | | | Allow any mixture of `eq', `eql' and `equal', `memq', `memql' and `member' in a switch-like `cond' to be compiled into a single switch. * lisp/emacs-lisp/bytecomp.el (byte-compile--common-test): New. (byte-compile-cond-jump-table-info): Use most specific common test. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data): Add test cases for multi-value clause cond forms.
* Tighter pcase or-pattern member function selection (bug#36139)Mattias Engdegård2019-06-191-7/+8
| | | | | | | | | * lisp/emacs-lisp/pcase.el (pcase--u1): Use the most specific of `memq', `memql' and `member' in or-patterns with constant cases. This improves performance and may help the byte-code compiler generate a switch. * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member): Add mixed-type or-pattern test cases.
* Compile list member functions in cond to switch (bug#36139)Mattias Engdegård2019-06-192-37/+65
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info): Expand `memq', `memql' and `member' to their corresponding equality tests. (byte-compile-cond-jump-table): Cases now have multiple values. * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1) (byte-optimize-lapcode): Don't assume switch hash tables to be injective.
* Report progress during custom-make-dependencies instead of file countLars Ingebrigtsen2019-06-181-1/+5
| | | | | | | | | * lisp/cus-dep.el (custom-make-dependencies): Rewrite to use reporter to report progress instead of how many files we've processed. * lisp/emacs-lisp/byte-run.el (byte-compile-info-string): New function. (byte-compile-info-message): Use it.
* Tweak implementation of byte-compile-info-messageLars Ingebrigtsen2019-06-181-1/+1
| | | | | * lisp/emacs-lisp/byte-run.el (byte-compile-info-message): Clean up implementation.
* Output progress messages when scraping autoloads during bootstrapLars Ingebrigtsen2019-06-182-0/+9
| | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-compile-info-message): New function to outout informational messages during byte compilation. * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Use it to report progress when scraping autoloads during bootstrap (which may take half a minute).
* Compilation work-around for obsolete eieio-object-set-name-stringLars Ingebrigtsen2019-06-172-8/+8
| | | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string): Move the generic definition of this method to here from eieio.el and place it after the cl-method definition. This avoids a warning about it being obsolete when doing macro expansion.
* Work around warning from macroexpanding obsolete methodLars Ingebrigtsen2019-06-171-9/+9
| | | | | | | * lisp/emacs-lisp/eieio.el (object-print): Move method definition to before generic definition because the generic definition obsoletes the method, which will then output a warning from when macroexpanding.
* Change the eieio-declare-slots function into a macroLars Ingebrigtsen2019-06-171-2/+3
| | | | | * lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): Change into a compile-only macro.
* New function eieio-declare-slotsLars Ingebrigtsen2019-06-171-0/+4
| | | | | * lisp/emacs-lisp/eieio-core.el (eieio-declare-slots): New function to suppress compiler warnings about unknown slots.
* Fix compilation warning by having ede-target inherit from eieio-namedLars Ingebrigtsen2019-06-171-1/+2
| | | | | | | | | * lisp/cedet/ede/base.el (ede-target): Inherit from eieio-named so that if you're customizing objects via eieio-object-value-get, you can set the name. * lisp/emacs-lisp/eieio-custom.el (eieio-object-value-get): Don't use obsolete function `eieio-object-set-name-string'.
* Suppress warning about object-print in eieio.elLars Ingebrigtsen2019-06-171-6/+6
| | | | | | * lisp/emacs-lisp/eieio.el (obsolete): Suppress warning about object-print being obsolete, because there are no in-tree definitions any more.
* Add check for enabled warning before issuingLars Ingebrigtsen2019-06-171-1/+2
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-function-warn): Check whether we want the `obsolete' warning before issuing it.
* Suppress warning about object-print in eieio.elLars Ingebrigtsen2019-06-171-2/+5
| | | | | | * lisp/emacs-lisp/eieio.el (cl-print-object): Suppress the warning about object-print being obsolete, since there are no in-tree methods like that any more.
* Make with-suppressed-warnings work in cl-defmethodLars Ingebrigtsen2019-06-171-1/+1
| | | | | | * lisp/emacs-lisp/cl-generic.el (cl-defmethod): Pass the symbol name on to `byte-compile-warning-enabled-p' to make with-suppressed-warnings work in cl-defmethods, too.
* Rewrite object-print methods in cedet to be cl-print-object methodsLars Ingebrigtsen2019-06-171-1/+8
| | | | | | | | | | | | | | * lisp/cedet/semantic/db-el.el (object-print): Ditto. (object-print): Ditto. * lisp/cedet/semantic/db-global.el (object-print): Ditto. * lisp/cedet/semantic/db.el (object-print): Remove; unused. * lisp/cedet/semantic/db.el (semanticdb-debug-info): New method. (object-print): Rewritten to be cl-print-object. * lisp/emacs-lisp/eieio.el (eieio-object-name): Allow the EXTRA argument to be a list of strings.
* Tweak compilation mode used by byte-recompile-directoryGlenn Morris2019-06-161-3/+3
| | | | | | * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode): Doc fix. (byte-recompile-directory): Use emacs-lisp-compilation-mode.
* Tweak how byte-compile-print-syms fillsGlenn Morris2019-06-161-1/+4
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-print-syms): Use fill-column from the compile log buffer.
* Don't hard-code the fill-column for display-warningGlenn Morris2019-06-161-3/+9
| | | | | | | * lisp/emacs-lisp/warnings.el (warning-fill-column): New variable. (display-warning): Use warning-fill-column. * doc/lispref/display.texi (Warning Variables): Mention warning-fill-column.
* * lisp/emacs-lisp/cl-generic.el (gv-setter): Move declaration.Stefan Monnier2019-06-161-2/+2
| | | | Move it to those places where we know gv has been loaded.
* Add comment to eieio-opt about why we're requiring cl-extraLars Ingebrigtsen2019-06-161-0/+3
| | | | | * lisp/emacs-lisp/eieio-opt.el (cl-extra): Add comment about why we're not requiring cl-lib.
* Fix compilation warning about gv-setter in cl-genericLars Ingebrigtsen2019-06-161-0/+2
| | | | | * lisp/emacs-lisp/cl-generic.el (gv-setter): Declare to avoid a compilation warning.
* Fix compilation warning i eieio-baseLars Ingebrigtsen2019-06-161-1/+1
| | | | | * lisp/emacs-lisp/eieio-base.el (clone): Use eieio-object-class instead of obsolete function class-of.
* Compilation fix for previous change to eieio-optLars Ingebrigtsen2019-06-161-0/+1
| | | | | * lisp/emacs-lisp/eieio-opt.el (cl-extra): Require for cl--describe-class.
* Fix compilation warning in eieio-optLars Ingebrigtsen2019-06-161-2/+1
| | | | | * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Don't use obsolete function eieio-help-class.
* Avoid "unknown slot" compilation warning in eieio-customLars Ingebrigtsen2019-06-161-2/+7
| | | | | | | * lisp/emacs-lisp/eieio-custom.el (eieio-read-customization-group): Slot `name' may not exist in all classes, so protect against that (and avoid a compilation warning about it).
* Fix byte compilation warning in bindat.elLars Ingebrigtsen2019-06-151-2/+2
| | | | | | * lisp/emacs-lisp/bindat.el (bindat--unpack-item): Avoid a byte compilation warning by using unibyte-string instead of concat + string-make-unibyte.
* Avoid compilation warning in byte-runLars Ingebrigtsen2019-06-141-1/+4
| | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Avoid compilation warning by not using `symbol-function'.
* Remove outdated FIXMELars Ingebrigtsen2019-06-131-1/+0
| | | | | | * lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Remove comment about issuing a byte compilation warning about accessing slots via :initarg -- it was implemented a few months later.
* Escape newlines when printing functions in timer listPip Cet2019-06-131-1/+2
| | | | | * timer-list.el (list-timers): Bind `print-escape-newlines' to avoid newlines in printed representation (bug#36187).
* Compilation fix for previous changeLars Ingebrigtsen2019-06-131-0/+1
|
* Compilation warning fix for disass.elLars Ingebrigtsen2019-06-131-1/+2
| | | | | | | * lisp/emacs-lisp/disass.el (disassemble-1): Remove a string-as-unibyte that probably doesn't do anything, because the string in question should be unibyte anyway. If the assert fails, revert the patch.