summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* | * lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508)Stefan Monnier2019-05-291-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to control the relative ordering of functions on hooks by specifying `depth` in the same was as was possible with `add-function`. * lisp/electric.el (electric--sort-post-self-insertion-hook): Delete function. (electric-indent-mode, electric-layout-mode, electric-quote-mode): * lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of electric--sort-post-self-insertion-hook. * lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss): Use new `depth` arg to make sure noone accidentally gets added after syntax-ppss-flush-cache. * doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg. * test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.
* | Correctly eliminate duplicate cases in switch compilationMattias Engdegård2019-05-271-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix code mistakes that prevented the correct elimination of duplicated cases when compiling a `cond' form to a switch bytecode, as in (cond ((eq x 'a) 1) ((eq x 'b) 2) ((eq x 'a) 3) ; should be elided ((eq x 'c) 4)) Sometimes, this caused the bytecode to use the wrong branch (bug#35770). * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Return obj2 eval'ed. (byte-compile-cond-jump-table-info): Discard redundant condition. Use `obj2' as evaluated. Discard duplicated cases instead of failing the table generation. * test/lisp/emacs-lisp/bytecomp-tests.el (toplevel): Require subr-x. (byte-opt-testsuite-arith-data, bytecomp-test--switch-duplicates): Test.
* | Avoid infloop in read-multiple-choice (Bug#32257)Noam Postavsky2019-05-261-1/+1
| | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): Use `read-event' which won't get stuck (return the same event over and over again) for non-character events, unlike `read-char'.
* | Update author/maintainer infoPaul Eggert2019-05-264-4/+4
| | | | | | | | | | Update email addresses and fix spellings of some author and maintainer names.
* | Remove Maintainer: when it duplicates Author:Paul Eggert2019-05-267-7/+0
| | | | | | | | | | | | | | The convention is that a file with Author: but not Maintainer: means the author is a maintainer, which makes it confusing when a file lists the same person as author and maintainer. Avoid the confusion by removing the duplicate Maintainer: line.
* | Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-2533-0/+37
| | | | | | | | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* | * lisp/emacs-lisp/package.el (package-install-from-archive): Fix last changeStefan Monnier2019-05-241-3/+6
| | | | | | | | | | Don't place the unibyte content of of the downloaded file into a multibyte buffer.
* | * lisp/emacs-lisp/cl-macs.el (cl-callf): Tweak in docstringMichael Heerdegen2019-05-241-2/+3
| | | | | | | | Say that lambdas are also allowed as FUNC argument.
* | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-5/+9
| | | | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el: Require cl-extra. (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | Revert "Allow zero-argument rx `or' and `seq' forms"Mattias Engdegård2019-05-201-8/+5
| | | | | | | | | | This reverts commit b552fc05c231ca6800330a318d3a74ddd0f5a13c. It caused a bootstrapping failure which I have yet to resolve - sorry.
* | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-5/+8
| | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-1937-43/+6
| | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* | cus-edit.el: Remove XEmacs compat codeLars Ingebrigtsen2019-05-191-1/+1
| | | | | | | | | | | | | | | | | | * lisp/cus-edit.el (custom-browse-insert-prefix): Remove XEmacs compat code and make obsolete. (custom-group-value-create): Use `insert' directly. * lisp/emacs-lisp/elint.el (elint-check-conditional-form): Don't refer to function that doesn't have an if any more.
* | * lisp/emacs-lisp/package.el: Fix decoding of downloaded filesStefan Monnier2019-05-181-42/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a different fix for bug#34909, which should also fix bug#35739. Our downloading code used to automatically decode the result according to the usual heuristics for files. This caused problems when we later needed to save the data in a file that needed to be byte-for-byte equal to the original in order to pass the signature verification, especially because we didn't keep track of which coding-system was used to decode the data. (package--unless-error): New macro extracted from package--with-response-buffer-1, so that we can specify edebug and indent specs. (package--with-response-buffer-1): Use it. More importantly, change code so it runs `body` in a unibyte buffer with undecoded data. (package--download-one-archive): Don't encode with utf-8 since the data is not decoded yet. (describe-package-1): Explicitly decode the readem.txt files here. * lisp/url/url-handlers.el (url-insert-file-contents): Use it. (url-insert): Don't decode if buffer is unibyte. * lisp/url/url-http.el (url-http--insert-file-helper): New function, extracted from url-insert-file-contents.
* | * lisp/emacs-lisp/package.el: Reduce macrology in ...with-response-bufferStefan Monnier2019-05-181-39/+42
| | | | | | | | | | | | (package--with-response-buffer-1): New function, extracted from package--with-response-buffer. (package--with-response-buffer): Use it.
* | * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix docstring of accessors.Stefan Monnier2019-05-161-1/+1
| |
* | Make `package' not "uninhibit" messages (Bug#34037)Paul Pogonyshev2019-05-161-2/+2
| | | | | | | | | | * lisp/emacs-lisp/package.el: Don't let-bind inhibit-message to a different value if it was non-nil.
* | * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand) <setq>: RewriteStefan Monnier2019-05-161-9/+19
| | | | | | | | | | | | | | | | The previous code had 2 problems: - It converted `setq` to `setf` in unrelated cases such as (cl-symbol-macrolet ((x 1)) (setq (car foo) bar)) - It macroexpanded places before `setf` had a chance to see if they have a gv-expander.
* | Add standard unmatchable regexpMattias Engdegård2019-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `regexp-unmatchable' as a standard unmatchable regexp, defined as "\\`a\\`". Use it where such a regexp is needed, replacing slower expressions in several places. From a suggestion by Philippe Schnoebelen. * lisp/subr.el (regexp-unmatchable): New defconst. * etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'. * doc/lispref/searching.texi (Regexp Functions): Document it. * lisp/emacs-lisp/regexp-opt.el (regexp-opt) * lisp/progmodes/cc-defs.el (cc-conditional-require-after-load) (c-make-keywords-re) * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1) (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1) (c-looking-at-decl-block) * lisp/progmodes/cc-fonts.el (c-doc-line-join-re) (c-doc-bright-comment-start-re) * lisp/progmodes/cc-langs.el (c-populate-syntax-table) (c-assignment-op-regexp) (c-block-comment-ender-regexp, c-font-lock-comment-end-skip) (c-block-comment-start-regexp, c-line-comment-start-regexp) (c-doc-comment-start-regexp, c-decl-start-colon-kwd-re) (c-type-decl-prefix-key, c-type-decl-operator-prefix-key) (c-pre-id-bracelist-key, c-enum-clause-introduction-re) (c-nonlabel-token-2-key) * lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end) * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re) (c-noise-macro-name-re, c-make-noise-macro-regexps) * lisp/progmodes/octave.el (octave-help-mode) * lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table) * lisp/vc/vc-git.el (vc-git-log-view-mode) * lisp/vc/vc-hg.el (vc-hg-log-view-mode) * lisp/vc/vc-mtn.el (vc-mtn-log-view-mode): Use `regexp-unmatchable'. * lisp/textmodes/ispell.el (ispell-non-empty-string): Use `regexp-unmatchable', fixing a broken never-match regexp.
* | * lisp/emacs-lisp/packages.el: Add `all` to package-check-signatureStefan Monnier2019-05-121-5/+13
| | | | | | | | | | (package-check-signature): Add `all` option. (package--check-signature-content): Adjust accordingly.
* | Fix alist-get gv setter not returning VALMichael Heerdegen2019-05-091-12/+14
| | | | | | | | | | | | | | This fixes Bug#35546. * lisp/emacs-lisp/gv.el (alist-get): Make setter return the set value to preserve 'setf' semantics.
* | * lisp/emacs-lisp/syntax.el (syntax-propertize): `ignore` is like nilStefan Monnier2019-05-081-2/+3
| | | | | | | | | | | | (syntax-ppss-after-change-function): Mark it as obsolete. * lisp/font-lock.el (font-lock-apply-syntactic-highlight): Use syntax-ppss-flush-cache instead.
* | Merge from origin/emacs-26Glenn Morris2019-05-081-11/+21
|\| | | | | | | | | | | | | | | | | | | 1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh... 37436fe Fix cloning of eieio-named objects (Bug#22840) fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572) f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment. 3b86e0b Clarify handling of long options (Bug#24949) 04340a8 Improve documentation of the daemon and emacsclient 3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
| * Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)Vitalie Spinu2019-05-081-2/+10
| | | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of eieio-instance-inheritor objects as documented in the docs string and implemented in the original eieio implementation.
| * Fix cloning of eieio-named objects (Bug#22840)Vitalie Spinu2019-05-071-9/+11
| | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (clone): Correctly set the name of the cloned objects from eieio-named instances.
* | * lisp/emacs-lisp/lisp.el (insert-pair-alist): Turn defvar into defcustom.Juri Linkov2019-05-061-9/+12
| | | | | | | | Revert to old default value. (Bug#35480)
* | * lisp/emacs-lisp/lisp.el (insert-pair-alist): Precompute default value.Juri Linkov2019-05-051-1/+7
| | | | | | | | | | Use unicode-property-table-internal with 'paired-bracket to append pairs of open/close characters to the default value (bug#35480).
* | * lisp/emacs-lisp/edebug.el: Better handle instrumentation of `end-of-defun`Stefan Monnier2019-05-011-51/+34
| | | | | | | | | | | | Remove redundant :group args. (edebug-read-top-level-form): Let-bind edebug-active. (edebug-active): Move before this new first use.
* | Merge from origin/emacs-26Glenn Morris2019-04-291-8/+14
|\| | | | | | | | | | | | | 0e8d452 ; * doc/lispref/nonascii.texi (Coding System Basics): Fix gra... 25a2ff7 ; Add missing space in custom.texi 9ec18fb * admin/admin.el (set-version): Check for increase in version... 93912ba Be more careful about indent-sexp going over eol (Bug#35286)
| * Be more careful about indent-sexp going over eol (Bug#35286)Noam Postavsky2019-04-221-8/+14
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple sexps if the end of line is within a sexp. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop-before-eol-comment) (indent-sexp-stop-before-eol-non-lisp): New tests.