Commit graph

5423 commits

Author SHA1 Message Date
Glenn Morris
1b075a9e38 ; Fix some tiny doc typos 2018-03-27 17:02:04 -04:00
Michael Heerdegen
441fe201ea De-obsolete if-let' and when-let'
For the following release it is planned to make `if-let*' and
`when-let*' aliases for `if-let' and `when-let'.  For now we revert
declaring `if-let' and `when-let' obsolete and tweak the docstrings.

* lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings
refer to those of `if-let' and `when-let'.
(if-let, when-let): De-obsolete.  Rewrite documentation.
2018-03-27 01:54:22 +02:00
Glenn Morris
86960383cf * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. 2018-03-26 16:12:51 -04:00
Eric Abrahamsen
daa9e853bd Improve warning and error messages
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read,
  (eieio-persistent-validate/fix-slot-value): Indicate exactly what
  went wrong.
2018-03-22 10:46:09 +08:00
Eric Abrahamsen
f0cf4dc629 Let eieio-persistent-read read what object-write has written
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  `object-write' may quote lists inside hash tables and vectors, so
  unquote those lists here.

This patch allows the eieio-persistent write/restore process to
perform a clean round trip. It only handles a very specific and
limited range of object structures, but at least the write and read
procedures match.
2018-03-22 10:46:08 +08:00
Eric Abrahamsen
40ad1ff327 Handle possible classtype values in eieio-persistent-read
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  The function `eieio-persistent-slot-type-is-class-p' could return
  either a single class, or a list of classes.
2018-03-22 10:46:08 +08:00
Noam Postavsky
e244fed5e0 Clarify that nil doesn't match itself as a cl-case clause (Bug#30749)
* lisp/emacs-lisp/cl-macs.el (cl-case): Mention that the ATOM
=> (ATOM) short form is only for non-nil ATOMs.
2018-03-10 17:56:04 -05:00
Michael Heerdegen
f6bd7e0686 Revert last commit
This reverts commit af4697faa1.  It's
too late for this to be in the release.
2018-03-06 18:32:04 +01:00
Michael Heerdegen
af4697faa1 Define if-let* and derivatives as aliases for if-let etc
This commit reverts declaring `if-let' and `when-let' obsolete in
favor of the new `if-let*' and `when-let*' versions because of the
compiler warning mess (Bug#30039).  Instead we make foo-let* aliases
for foo-let.  The old single-tuple variable spec case is still
supported for backward compatibility.
* lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare
obsolete.  Tweak edebug specs.
(and-let): Renamed from `and-let*' for compatibility with the names
`if-let' and `when-let'.
(if-let*, when-let*, and-let*): Define as aliases for `if-let',
`when-let' and `and-let'.
* test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test)
(when-let-single-tuple-case-test): New tests for the single-binding
tuple case.
In the whole file, prefer the names without "*".
2018-03-06 15:47:05 +01:00
Eli Zaretskii
adfe2f580f Remove outdated comment in syntax.el
* lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Remove
outdated comment.  (Bug#30617)
2018-03-03 14:41:16 +02:00
Paul Eggert
f74ab96483 ; Spelling and grammar fixes. 2018-02-17 09:17:28 -08:00
Eli Zaretskii
d8917eba1c Improve documentation of Profiling features
* doc/lispref/debugging.texi (Profiling): Improve the description
of elp.el.  Improve wording of the rest of the section.  (Bug#30491)

* lisp/emacs-lisp/elp.el (elp-instrument-list): Make the
interactive invocation work.  Doc fix.
2018-02-17 11:59:36 +02:00
Glenn Morris
69107f347b ; Fix doc typos related to indefinite articles 2018-02-16 17:33:57 -05:00
Glenn Morris
66a4e651f3 ; Fix doc typos related to indefinite articles 2018-02-16 15:16:15 -05:00
Robert Cochran
edc06adf96 Make 'byte-compile-error-on-warn' a safe file variable
* lisp/emacs-lisp/bytecomp.el (byte-compile-error-on-warn): Mark
as a safe local variable for boolean values.
2018-02-16 17:51:06 +02:00
Noam Postavsky
607cc4e24a Define cl-type-definition button type as needed (Bug#28899)
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Require
`cl-extra' before using the `cl-type-definition' button type.
2018-01-30 22:14:02 -05:00
Philipp Stephani
956807bd1f * lisp/emacs-lisp/rx.el (rx): Fix the definition of 'blank'. 2018-01-30 00:05:58 +01:00
Eli Zaretskii
b603affa1f Revert "Fix tempfile creation when byte compiling"
This reverts commit 4fd446e9f6:
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Put tempfile next to the target file, as was the original intent.
2018-01-20 09:48:22 +02:00
Paul Eggert
4fd446e9f6 Fix tempfile creation when byte compiling
This improves on the recent fix for master failing to build
on FreeBSD.  Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Put tempfile next to the target file, as was the original intent.
2018-01-19 14:40:56 -08:00
Stefan Monnier
728ded05f6 * lisp/emacs-lisp/bytecomp.el: Tweak last change
(byte-compile-file): Move comment closer to the code it describes.
2018-01-19 11:29:13 -05:00
Eli Zaretskii
c6c05e2aa9 Unbreak building Emacs on FreeBSD
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create
the temporary file under temporary-file-directory if the file
being compiled is specified by an absolute file name.  This avoids
problems with ACL copying from temporary-file-directory on
FreeBSD.  For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.
2018-01-19 17:31:54 +02:00
Noam Postavsky
76040d1eae Handle case-insensitive filenames for load-path shadows (Bug#5845)
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Check for
shadowing with case-insensitive matching for files of case-insensitive
directories (as determined by `file-name-case-insensitive-p').
* test/lisp/emacs-lisp/shadow-tests.el: New test.
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: New test files.
2018-01-18 16:26:52 -05:00
Stefan Monnier
1f7f03742d * lisp/emacs-lisp/generator.el (iter-defun): Add 'doc-string' prop. 2018-01-11 11:24:38 -05:00
Stefan Monnier
dbb4aac212 * lisp/emacs-lisp/syntax.el (syntax-propertize): Fix bug#29767 2018-01-11 10:11:39 -05:00
Alan Mackenzie
b8d74c4578 Fix mark-defun when there's no spaces between successive defuns.
The problem was a parse-partial-sexp call which tried to use the STOPBEFORE
argument to detect non-syntactic WS.  This fails on a "}", which does not
begin a sexp.

* lisp/emacs-lisp/lisp.h (beginning-of-defun--in-emptyish-line-p): Enhance to
handle BOL being in a string.
(beginning-of-defun-comments): Call the above function in place of the call
to parse-partial-sexp.
2018-01-06 11:48:32 +00:00
Paul Eggert
63b04c11d5 Fix copyright years by hand
These are dates that admin/update-copyright did not update, or
updated incorrectly.
2018-01-01 01:02:09 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Eli Zaretskii
34fcfc5c04 * lisp/emacs-lisp/inline.el (define-inline): Add a doc string. 2017-12-22 12:37:19 +02:00
Glenn Morris
471b6c163f ; Replace non-ascii quote characters in doc strings etc 2017-12-20 16:23:11 -05:00
Stefan Monnier
07b7fb98e6 * lisp/subr.el (delayed-after-hook-functions): Rename from ...-forms
(run-mode-hooks): `funcall` the functions instead of `eval`ing the forms.
* lisp/emacs-lisp/derived.el (define-derived-mode): Push functions
rather than forms (bug#29679).
2017-12-18 11:39:17 -05:00
Noam Postavsky
777fe94661 Partially revert "Mention new strictness for &optional, &rest..."
The changes to cl argument parsing are not backwards compatible, and
cause inconvenience when writing macros (e.g., instead of doing '&aux
,@auxargs', some more complicated conditionals would be required).
The `cl-defstruct' macro makes use of this convenience when defining
empty structs (Bug#29728).
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
(cl--do-&aux, cl--do-arglist): Undo strict checking of &rest, &key,
and &aux.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): Remove
test.
2017-12-15 23:41:20 -05:00
Noam Postavsky
e7b1111155 Mention new strictness for &optional, &rest in arglists (Bug#29165)
* etc/NEWS: Explain that '&optional' not followed by a variable is now
an error.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda, cl--do-&aux)
(cl--do-arglist): Also reject '&optional', '&rest', or '&aux' not
followed by a variable for consistency.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): New
test.
2017-12-13 17:31:27 -05:00
Glenn Morris
52d2a690f6 Add missing :version tags revealed by cusver-check
* lisp/comint.el (comint-move-point-for-matching-input):
* lisp/epa.el (epa-replace-original-text):
* lisp/image-dired.el (image-dired-cmd-optipng-program)
(image-dired-cmd-optipng-options):
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table):
* lisp/gnus/gnus-cloud.el (gnus-cloud-storage-method)
(gnus-cloud-interactive):
* lisp/net/mailcap.el (mailcap-user-mime-data):
* lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag)
(c-noise-macro-names, c-noise-macro-with-parens-names):
* lisp/progmodes/flymake.el (flymake-start-on-flymake-mode)
(flymake-wrap-around):
* lisp/progmodes/grep.el (grep-use-null-filename-separator):
* lisp/progmodes/js.el (js-indent-align-list-continuation):
* lisp/progmodes/perl-mode.el (perl-flymake-command):
* lisp/progmodes/python.el (python-flymake-command)
(python-flymake-command-output-pattern, python-flymake-msg-alist):
* lisp/progmodes/ruby-mode.el (ruby-flymake-use-rubocop-if-available)
(ruby-rubocop-config):
* lisp/textmodes/less-css-mode.el (less-css):
* lisp/textmodes/tex-mode.el (tex-chktex-program)
(tex-chktex-extra-flags): Add missing :version tags.
2017-12-12 23:21:24 -08:00
Eric Abrahamsen
e1cc2037a9 Handle hash tables and vectors when reading/writing EIEIO objects
* lisp/emacs-lisp/eieio.el (eieio-override-prin1): EIEIO objects
  printed with `prin1' can no longer be read with `read'. Make sure
  they are printed with object-write instead, even when they're inside
  hash tables and vectors.
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  Check for written representations of objects inside hash tables and
  vectors, and reconstruct them.
2017-12-09 08:55:58 -08:00
Noam Postavsky
8227087194 Let autoload-compute-prefix be set file-locally (Bug#29471)
* lisp/emacs-lisp/autoload.el (autoload-compute-prefixes): Mark
boolean values as safe.
2017-12-02 09:35:44 -05:00
Eli Zaretskii
bf9b972843 Fix byte compilation of files with leading directories
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename
of target-file to make-temp-file, in case target-file includes a
leading directory that might not exist under TMPDIR.  See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
for the details.
2017-12-02 13:29:39 +02:00
Glenn Morris
408862f02a ; * lisp/emacs-lisp/bytecomp.el: Tweak message formatting in previous. 2017-11-29 15:27:06 -05:00
Glenn Morris
9964db4c34 Restore obsolete method of changing byte-compile-dest-file
* lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
Restore seven-year obsolete feature that was removed for six months,
since automake uses it.
2017-11-29 15:11:01 -05:00
Glenn Morris
99d07e8d5e Remove some bogus definition-prefixes from loaddefs
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Don't register a definition prefix from define-erc-module,
which adds an erc- prefix to its argument.
2017-11-28 19:59:08 -05:00
Glenn Morris
f2e6961a1b ; * lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
Fix typo in previous.
2017-11-27 14:25:35 -05:00
Glenn Morris
1c8bd8a119 A few small doc fixes for bytecomp.el
* lisp/emacs-lisp/bytecomp.el (emacs-lisp-file-regexp)
(byte-compile-dest-file-function, byte-compile-dest-file): Doc fixes.
2017-11-27 14:10:34 -05:00
Gemini Lasswell
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
* test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug
spec to cause Edebug to instrument tests the results of which are
not bound to symbols (the (VALUEFORM) case).
(and-let*): Change Edebug spec to allow empty body.

*test/lisp/emacs-lisp/subr-x-tests.el:
(subr-x-and-let*-test-group-1): Add missing quote to erroneous
form so Edebug will work on this test.
2017-11-26 17:36:14 -08:00
Gemini Lasswell
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use
cl-macro-list1 instead of cl-macro-list in Edebug spec.

* lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete
unused variable.
(edebug-dotted-spec): Add docstring.
(edebug-match-specs): Allow &optional and &rest specs to
match nothing at the tail of a dotted form. Handle matches of
dotted form tails which return non-lists.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms):
New test.

* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
(edebug-test-code-use-destructuring-bind): New function.
2017-11-26 13:44:15 -08:00
Paul Eggert
a89f0b6f33 maint: shorten https://lists.gnu.org/archive/html/... links 2017-11-25 22:48:12 -08:00
Eli Zaretskii
d7fc719ff1 Improve the doc string of 'list-packages'
* lisp/emacs-lisp/package.el (list-packages): Describe in the doc
string the columns shown by the command.  (Bug#29420)
2017-11-24 16:49:10 +02:00
Glenn Morris
2fdc01c036 * lisp/emacs-lisp/byte-run.el (defsubst): Doc fix. 2017-11-21 13:28:00 -05:00
Glenn Morris
8d450453fa * lisp/emacs-lisp/byte-run.el (inline): Give it a doc. 2017-11-21 08:53:31 -08:00
Eli Zaretskii
069f978484 ; * lisp/emacs-lisp/byte-run.el: Fix a typo in a comment. 2017-11-19 17:51:08 +02:00
Eric Abrahamsen
73d670751a Fix to 2fddfb7ce7
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Fix bogus paren wrapping.
2017-11-08 14:46:03 -08:00
Eric Abrahamsen
a215be9994 Handle object string name in eieio-persistent-convert-list-object
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
  Starting to phase out the printing of object names in
  `object-write', handle either case.
2017-11-08 09:28:07 -08:00