Commit graph

6134 commits

Author SHA1 Message Date
Stefan Monnier
77ee23d1ed * lisp/emacs-lisp/autoload.el: Make progress info more informative.
(update-directory-autoloads): Include the name of the target file.
2019-07-27 17:53:46 -04:00
Stefan Monnier
1c8405e33e * lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Fix bug#34757
This fix was provided by Pip Cet <pipcet@gmail.com>.  It tightens the
code that tries to recognize a bytecode sequence as being a simple
function call (to then decompile it), which occasionally misfired.

I added some minor changes found while investigating this issue.

(byte-compile): Handle corner case where byte-compile-top-level returns
a non-self-evaluating expression.
(byte-compile-out-toplevel): Remove support for `progn` and `t` values
of output-type which aren't used anywhere.
2019-07-27 17:28:10 -04:00
Lars Ingebrigtsen
1d4355261d Doc fix for package-menu-filter
* lisp/emacs-lisp/package.el (package-menu-filter): Document the
use of arc:ARCHIVE and status:STATUS (bug#24883).
2019-07-27 14:38:40 +02:00
Lars Ingebrigtsen
60511bd89d edebug.el comment fix
* lisp/emacs-lisp/edebug.el: Fix comment referring to non-existent
variable (bug#25188).
2019-07-27 13:34:17 +02:00
Lars Ingebrigtsen
02bb676a05 Rename coverage symbols in edebug to avoid collisions
* lisp/emacs-lisp/edebug.el (edebug-clear-coverage): Use
edebug-unknown and edebug-ok-coverage instead of unknown and
ok-coverage to avoid naming collisions with packages that use
those two symbols (bug#25471).
(edebug--update-coverage, edebug-display-freq-count): Ditto.
2019-07-27 12:21:30 +02:00
Lars Ingebrigtsen
2cc5bb67ff define-derived-mode doc string clarification
* lisp/emacs-lisp/derived.el (define-derived-mode): Doc string
clarification about the keywords (bug#26301).
2019-07-27 12:04:58 +02:00
Paul Eggert
40b067522f Fix ‘make check’ failure
Problem introduced in 2019-07-26T07:08:40!larsi@gnus.org.
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Don’t count "0 unexpected" as unexpected.
2019-07-26 09:41:55 -07:00
Lars Ingebrigtsen
3a373bc235 Minor rewording of a couple of sentences in define-derived-mode doc
* lisp/emacs-lisp/derived.el (define-derived-mode): Reword
documentation to be less whimsical (bug#26301).
2019-07-26 13:05:08 +02:00
Lars Ingebrigtsen
7ada677e3f Add an autoload cookie to package-upload-file
* lisp/emacs-lisp/package-x.el (package-upload-file): Add an
autoload cookie (bug#26724).
2019-07-26 11:18:37 +02:00
Lars Ingebrigtsen
66db7b2c36 Always include the number of unexpected results here too
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Always include the
number of unexpected results here as well.
2019-07-26 09:58:53 +02:00
Lars Ingebrigtsen
71f76a8025 Don't run gpg when loading package.el
* lisp/emacs-lisp/package.el (package-check-signature): Don't run
gpg on startup, but just default to `allow-unsigned'.
(package-check-signature): New function to check whether a OpenPGP
configuration is found when `allow-unsigned'.
(package--check-signature-content, package--check-signature)
(package--download-one-archive, package-refresh-contents)
(package-install-from-archive): Use function instead of variable
throughout.
* doc/emacs/package.texi (Package Installation): Document this.
2019-07-26 08:30:43 +02:00
Stefan Kangas
16a529e215 Remove upload functionality of package-x from the elisp manual
Suggested by Stefan Monnier.
Ref: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19537#8

* doc/lispref/package.texi (Package Archives): Don't document
package-x upload functions in the elisp manual, since they are not
very commonly used.  (Bug#19537)
* lisp/emacs-lisp/package-x.el (package-archive-upload-base)
(package-upload-buffer, package-upload-file): Add to the doc strings
any details removed from the elisp manual that would otherwise be
missing.
2019-07-25 18:23:55 -04:00
Lars Ingebrigtsen
7633391ce0 Make cl-destructuring-bind errors a bit more understandable
* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Make errors
when giving the wrong number of arguments to the bindings form
more informational (bug#29345).
2019-07-25 21:56:17 +02:00
Gemini Lasswell
0c48c0d0b2 Fix inline-quote Edebug spec
* lisp/emacs-lisp/inline.el (inline-quote): Fix the edebug spec
(bug#31051).
2019-07-21 15:40:48 +02:00
Noam Postavsky
6490269bec Merge from emacs-26
150bdfe43a Handle completely undecoded input in term (Bug#29918)
021f32cca1 * doc/misc/forms.texi (Control File Format): Fix a doc error.
76538d09b7 Fix typo in package-alist docstring
b2fde4b5e8 * doc/lispref/text.texi (Mode-Specific Indent): Fix a typo...
7e62778548 ; Another minor change in 'bidi-display-reordering's doc s...
4455ddbe56 Improve doc string of 'bidi-display-reordering'
34ee26dd93 Add warning to bidi-display-reordering doc string

# Conflicts:
#	lisp/term.el
#	test/lisp/term-tests.el
2019-07-20 22:02:36 -04:00
Basil L. Contovounesios
76538d09b7 Fix typo in package-alist docstring
Pointed out by Michael Heerdegen <michael_heerdegen@web.de>.
* lisp/emacs-lisp/package.el (package-alist): Fix docstring
grammar (bug#17403).
2019-07-17 15:07:16 +01:00
Mattias Engdegård
450fd8e570 Set revert-buffer-function in ert-results-mode
* lisp/emacs-lisp/ert.el (ert-results-mode): Set revert-buffer-function
to re-run the same test selection.  It is a good fit and permits use of
the standard "g" key binding.
2019-07-16 15:35:45 +02:00
Lars Ingebrigtsen
3b69921185 Revert "Add edebug specs for inline.el"
This reverts commit ed29d9fe52.

The edebug specs were already in the declare form, and in addition, it didn't fix the problem.
2019-07-15 16:47:52 +02:00
Lars Ingebrigtsen
dbd1d2ebf8 Tweak gv-define-setter debug setting
* lisp/emacs-lisp/gv.el (gv-define-setter): Change edebug spec
from body to def-body (bug#28729).
2019-07-15 11:16:37 +02:00
Lars Ingebrigtsen
dea9970bc0 package-archive-priorities doc addition
* lisp/emacs-lisp/package.el (package-archive-priorities):
Document that negative priorities will lead to packages not being
updated (bug#28897).
2019-07-15 00:22:45 +02:00
Lars Ingebrigtsen
9d84fcbef5 Make elint understand condition-case-unless-debug
* lisp/emacs-lisp/elint.el (elint-special-forms): Teach elint
about `condition-case-unless-debug' (bug#29585).
2019-07-14 20:24:03 +02:00
Noam Postavsky
427ccb9321 Remove incorrect commentary about #$ in autoloads
* lisp/emacs-lisp/autoload.el (autoload-rubric):
`package-quickstart-refresh' does in fact support load-file-name as
well.
2019-07-13 21:25:10 -04:00
Lars Ingebrigtsen
ed29d9fe52 Add edebug specs for inline.el
* lisp/emacs-lisp/inline.el (inline-quote)
(inline-letevals): Add edebug specs (bug#31051).
2019-07-13 18:07:11 +02:00
Lars Ingebrigtsen
196ea8c4b3 Tweak output of doc in advice--make-docstring
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Make the
bit about the function/macro having an advice into a complete
sentence (bug#31063) and make it less dramatic.
2019-07-13 17:48:53 +02:00
Lars Ingebrigtsen
5a90307351 Make check-declare understand cl-defun
* lisp/emacs-lisp/check-declare.el (check-declare-verify): Add
cl-defun to the defun-ish regexp (bug#31396).
2019-07-13 16:49:23 +02:00
Lars Ingebrigtsen
67e2116160 Fix cl-defstruct doc string fix
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Remove sentence from
doc string that was left in by mistake when fixing the arglist
documentation.
2019-07-13 14:27:36 +02:00
Phil Sainty
c87878af7d * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a docstring typo 2019-07-13 23:58:14 +12:00
Michael Albinus
9939e04404 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Adapt docstring. 2019-07-13 13:30:35 +02:00
Lars Ingebrigtsen
1b0d621f02 Document fix for cl-defstruct
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Document that we can
have a doc string (bug#32340).
2019-07-13 05:05:03 +02:00
Lars Ingebrigtsen
1ed034b998 Always include the number of unexpected ert tests
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Always include the number of failed tests, because absence of the
text is not reassuring (bug#36616).
2019-07-13 01:55:25 +02:00
Stefan Monnier
6397716871 Revert "Turn off bytecode jumptables to avoid Bug#36447"
This reverts commit 122198d2f1.
Should not be needed any more thanks to Pip Cet's patch to hash_table_rehash.
2019-07-09 16:16:37 -04:00
Lars Ingebrigtsen
547800dade Checkdoc would bug out on empty files
* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Don't
bug out on malformed Emacs Lisp (bug#34760).
(checkdoc-file-comments-engine): Don't bug out on empty buffers.
2019-07-09 18:45:18 +02:00
Ryan Brown
d34bfbc09c Fix for lisp tagbody indentation
* lisp/emacs-lisp/cl-indent.el (lisp-indent-259): Indent PROG
better (bug#36552).
2019-07-09 15:51:50 +02:00
Lars Ingebrigtsen
733f30b4cb Tweak messaging in re-builder
* lisp/emacs-lisp/re-builder.el (reb-copy): Say what we copied to
the kill ring.
2019-07-09 03:44:13 +02:00
Noam Postavsky
122198d2f1 Turn off bytecode jumptables to avoid Bug#36447
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table): Set
to nil.  We can turn this back on again when Bug#36447 is solved and
we handle dumped hash tables correctly.
2019-07-08 18:06:21 -04:00
Mattias Engdegård
72e21777d0 Shorter `rx' doc string (bug#36496)
* lisp/emacs-lisp/rx.el (rx): Replace long description with a condensed
summary of the rx syntax, with reference to the manual section.
2019-07-07 11:49:22 +02:00
Stefan Monnier
851535f587 * lisp/emacs-lisp/nadvice.el: Make it a package separate from emacs.
* lisp/finder.el (finder-compile-keywords): Grab version from
package--builtin-versions when available.
2019-07-06 18:42:02 -04:00
Noam Postavsky
1f7b602f84 Add commentary about #$ in autoload files
* lisp/emacs-lisp/autoload.el (autoload-rubric): Add commentary about
`#$' trick.
2019-07-06 14:34:47 -04:00
Mattias Engdegård
3fd7491512 Optimise more inputs to `regexp-opt' (bug#36444)
Use a more precise test to determine whether the input to `regexp-opt'
is safe to optimise when KEEP-ORDER is non-nil, permitting more inputs
to be optimised than before.  For example, ("good" "goal" "go") is now
accepted.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
More precise test for whether the list is safe w.r.t. KEEP-ORDER.
(regexp-opt--contains-prefix): Remove.

* test/lisp/emacs-lisp/regexp-opt-tests.el: Use lexical-binding.
(regexp-opt-test--permutation, regexp-opt-test--factorial)
(regexp-opt-test--permutations, regexp-opt-test--match-all)
(regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
(regexp-opt-keep-order): Test KEEP-ORDER.
2019-07-04 17:18:15 +02:00
Mattias Engdegård
22b64f7bac Better error message for C-h P RET
Previously:
  package--incompatible-p: Wrong type argument: package-desc, nil
Now:
  No package specified

* lisp/emacs-lisp/package.el (describe-package): Don't use ## as input.
2019-07-02 10:57:39 +02:00
Mattias Engdegård
f1d414b98f Allow empty argument to `regexp-opt-charset'
* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-charset):
Handle nil argument, and use regexp-quote for singletons.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Expand tests.
2019-06-29 11:12:27 +02:00
Mattias Engdegård
d8aba87a0d Strength-reduce equal', eql', member' and memql'
When comparing against symbols, turn `equal' and `eql' into `eq',
and `member' and `memql' into `memq'.

* lisp/emacs-lisp/byte-opt.el (byte-optimize--constant-symbol-p)
(byte-optimize-equal, byte-optimize-member): New.
(member, memql, equal, eql): Use new byte-optimizers.
2019-06-28 22:47:27 +02:00
Lennart Borgman
c1234ca9c3 Add more fontification to regexp builder mode
* lisp/emacs-lisp/re-builder.el (reb-copy): Work in the presence
of newlines in the regexps.
(reb-change-syntax): Use a dedicated history variable.
(reb-fontify-string-re): Fontify sub-matches.
(reb-regexp-grouping-backslash, reb-regexp-grouping-construct):
New faces.
(reb-string-font-lock-keywords): New variable.
(reb-mark-non-matching-parenthesis): Match parenthesis.
(reb-restart-font-lock): New function.

* lisp/emacs-lisp/re-builder.el (reb-mode-map): Add divider some
dividers (bug#6347).
2019-06-27 19:08:42 +02:00
Stefan Monnier
0b4e003766 Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac.
2019-06-26 10:24:59 -04:00
Stefan Monnier
698ff554ac * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:03:48 -04:00
Noam Postavsky
9233865b70 Fix (rx-to-string (and (literal STR) (regexp STR)) regression
* lisp/emacs-lisp/rx.el (rx-regexp, rx-literal): Check the cadr of the
form for stringness, not the form itself.
* test/lisp/emacs-lisp/rx-tests.el (rx-to-string-lisp-forms): New test.
2019-06-26 08:50:27 -04:00
Mattias Engdegård
260b6c2c93 Merge consecutive constant `concat' args (bug#14769)
Suggested by Shigeru Fukaya <shigeru.fukaya@gmail.com>

* lisp/emacs-lisp/byte-opt.el (byte-optimize-concat): New.
(concat): Add byte-optimizer.
2019-06-26 11:39:12 +02:00
Noam Postavsky
b59ffd2290 Support (rx (and (regexp EXPR) (literal EXPR))) (Bug#36237)
* 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.
2019-06-25 22:00:03 -04:00
Stefan Monnier
5463b7e77a * lisp/emacs-lisp/cl-extra.el (cl-isqrt): Speed up bignum case 2019-06-25 17:08:01 -04:00
Lars Ingebrigtsen
98247645a7 Move widen/narrow in tabulated lists to } and {
* doc/emacs/buffers.texi (Several Buffers): Document it.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map):
Move widen/narrow to `}' and `{'.
2019-06-25 22:34:55 +02:00