summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
* | Revert "Compilation warning fix for byte-run.el"Glenn Morris2019-06-121-4/+3
| | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Revert change that causes a bootstrap failure. ; Ref eg https://hydra.nixos.org/build/94678649
* | Compilation warning fix for byte-run.elLars Ingebrigtsen2019-06-131-3/+4
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (macro-declaration-function): Suppress warning about obsolete function used by obsolete variable.
* | (beginning-of-defun-raw): Suppress warning about syntax-begin-functionLars Ingebrigtsen2019-06-121-2/+3
| | | | | | | | | | | | | | * lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): font-lock-compile-keywords also suppresses warnings about the obsolete syntax-begin-function variable, so suppress the only other use not in syntax.el.
* | Suppress warning about pi not having a prefixLars Ingebrigtsen2019-06-121-2/+3
| | | | | | | | | | * lisp/emacs-lisp/float-sup.el (pi): Suppress warning about this obsolete variable not having a prefix.
* | Add the new macro with-suppressed-warningsLars Ingebrigtsen2019-06-122-23/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro. * doc/lispref/compile.texi (Compiler Errors): Document with-suppressed-warnings and deemphasise with-no-warnings slightly. * lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings): New internal variable. (byte-compile-warning-enabled-p): Heed byte-compile--suppressed-warnings, bound via with-suppressed-warnings. (byte-compile-initial-macro-environment): Provide a macro expansion of with-suppressed-warnings. (byte-compile-file-form-with-suppressed-warnings): New byte hunk handler for the suppressed symbol machinery. (byte-compile-suppressed-warnings): Ditto for the byteop. (byte-compile-file-form-defmumble): Ditto. (byte-compile-form, byte-compile-normal-call) (byte-compile-normal-call, byte-compile-variable-ref) (byte-compile-set-default, byte-compile-variable-set) (byte-compile-function-form, byte-compile-set-default) (byte-compile-warn-obsolete, byte-compile--declare-var): Pass the symbol being warned in to byte-compile-warning-enabled-p. * test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New function. (bytecomp-test--with-suppressed-warnings): Tests.
* | Don't keep warning about unescaped literals (Bug#36068)Noam Postavsky2019-06-101-2/+3
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Restore lost let-binding of lread--unescaped-character-literals, so that unescaped literals warning will only apply to the form just read. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): Expand test to check that we don't keep warning about old unescaped literals.
* | Use lexical-binding in password-cache.el and add testsStefan Kangas2019-06-091-1/+1
| | | | | | | | | | * lisp/password-cache.el: Use lexical-binding. * test/lisp/password-cache-tests.el: New file.
* | Merge from origin/emacs-26Glenn Morris2019-06-071-1/+3
|\| | | | | | | 2860285 Allow macros autoloaded as functions during bytecomp (Bug#36022)
| * Allow macros autoloaded as functions during bytecomp (Bug#36022)Noam Postavsky2019-06-011-1/+3
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't pass symbols which don't have a known definition to byte-compile--function-signature, it fails to compile code which previously compiled successfully (for example, gnus.el until 2019-06-01 "* lisp/gnus/gnus.el: Mark autoloaded macros as such" which autoloads some macros as if they were functions).
| * * lisp/emacs-lisp/package.el: Obey buffer-file-coding-system (bug#35739)Stefan Monnier2019-05-311-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `url-insert-file-contents` saves in buffer-file-coding-system the coding-system used to decode the contents. Preserve this as the contents is moved from buffer to string to buffer, and use it when saving the contents to file, so as to try and better preserve the original byte sequence. (package--buffer-string, package--cs): New functions. (package--check-signature): Encode `string` if a coding-system was specified in buffer-file-coding-system. (package--download-one-archive, package-install-from-archive): Obey and preserve the buffer-file-coding-system if specified. Do not merge.
* | Do not use syntax-ppss-table in syntax-propertize when nil (Bug#36095)Dario Gjorgjevski2019-06-051-1/+1
| | | | | | | | | | * lisp/emacs-lisp/syntax.el (syntax-propertize): Use (syntax-table) instead of syntax-ppss-table when the latter is nil.
* | * lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for syntax-propertize.Stefan Monnier2019-06-041-39/+40
| | | | | | | | | | | | | | | | | | | | | | `syntax-ppss` uses `syntax-ppss-table` while parsing the buffer as well as when it calls `syntax-propertize`, but `syntax-propertize` can also be called directly rather than via `syntax-ppss` so it needs to explicitly use `syntax-ppss-table` as well in order to avoid using sometimes one table and sometimes another. (syntax-ppss-table): Move before new use. (syntax-propertize): Use it.
* | * lisp/emacs-lisp/thunk.el (thunk-delay): Fix memory leakStefan Monnier2019-06-041-10/+9
| | | | | | | | | | Get rid of references to the free variables of `body` once the thunk has been forced (bug#30626).
* | Adjust comments/debug to match C bignum codePaul Eggert2019-06-041-4/+4
| | | | | | | | | | | | | | | | | | * doc/lispintro/emacs-lisp-intro.texi (Digression into C): Adjust to match current C code. * lisp/emacs-lisp/ert.el (ert--force-message-log-buffer-truncation): Simplify. * src/.gdbinit (Lisp_Object_Printer.to_string): Return a string that says "make_fixnum", not "make_number".
* | Tune cl-assocPaul Eggert2019-06-011-1/+1
| | | | | | | | * lisp/emacs-lisp/cl-seq.el (cl-assoc): Use assq for fixnums.
* | Fix `cl-member' and `cl-assoc' for bignumsMattias EngdegÄrd2019-06-011-4/+2
| | | | | | | | | | * lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc): Work with bignums. * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-bignum-eql): New.
* | Merge from origin/emacs-26Glenn Morris2019-06-013-5/+11
|\| | | | | | | | | | | 134edc1 Warn about wrong number of args for subrs (Bug#35767) 5f01af6 Use plain symbols for eieio type descriptors (Bug#29220) 4b24b01 Pacify GCC 9 -Wredundant-decls
| * Warn about wrong number of args for subrs (Bug#35767)Noam Postavsky2019-05-301-1/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't assume byte-compile-fdefinition will return non-nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args) (bytecomp-warn-wrong-args-subr): New tests.
| * Use plain symbols for eieio type descriptors (Bug#29220)Noam Postavsky2019-05-302-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Emacs 26, eieio objects use a class record (with circular references) as the type descriptor of the object record. This causes problems when reading back an object from a string, because the class record is not `eq' to the canonical one (which means that read objects don't satisfy the foo-p predicate). * lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set the record's type descriptor to a plain symbol for the type descriptor when eieio-backward-compatibility is non-nil (the default). * lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call eieio--class-object on the type tag when eieio-backward-compatibility is non-nil. (eieio-object-p): Use eieio--object-class instead of eieio--object-class-tag. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-hash-and-vector) (eieio-test-persist-interior-lists): Make into functions. (eieio-persist-hash-and-vector-backward-compatibility) (eieio-persist-hash-and-vector-no-backward-compatibility) (eieio-test-persist-interior-lists-backward-compatibility) (eieio-test-persist-interior-lists-no-backward-compatibility): New tests which call them, eieio-backward-compatibility let-bound.
| * Avoid infloop in read-multiple-choice (Bug#32257)Noam Postavsky2019-05-261-2/+7
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): When `read-char' signals an error "Non-character input-event", call `read-event' to take the non-character event out of the queue. Don't merge to master, we just use `read-event' directly there, rather than this solution which relies a particular error message.