Commit graph

4673 commits

Author SHA1 Message Date
Stefan Monnier
bceffdb379 (define-modify-macro): Make sure cl--arglist-args is defined
* lisp/emacs-lisp/cl.el (define-modify-macro): Make sure
cl--arglist-args is defined (bug#20517).
2015-05-06 17:43:43 -04:00
Stefan Monnier
1340aefd96 * lisp/emacs-lisp/testcover.el: Don't use edebug--read (bug#20487)
* lisp/emacs-lisp/testcover.el: Use lexical-binding.
(testcover--read): Rename from testcover-read.  Change calling convention.
Use edebug-read-and-maybe-wrap-form now that edebug-read is gone.
(testcover-start): Use add-function.  Move edebug-all-defs binding to
testcover--read.
(testcover-this-defun): Tighten scope of edebug-all-defs binding.
(testcover-mark): Remove unused var `item'.

* src/lread.c (syms_of_lread): Default load-read-function to `read'.
2015-05-06 10:50:48 -04:00
Glenn Morris
ada5e6b7a7 ; Auto-commit of loaddefs files. 2015-05-06 06:19:35 -04:00
Glenn Morris
276f5d9e10 Minor declare-function improvement
* lisp/emacs-lisp/bytecomp.el
(byte-compile-macroexpand-declare-function):
Handle declarations after calls.  (Bug#20509)
2015-05-05 20:13:10 -07:00
Stefan Monnier
a7d630eb48 * lisp/cedet/semantic/grammar.el: Fix compiler warnings (bug#20505)
(semantic-grammar--template-expand): New function.
(semantic-grammar-header, semantic-grammar-footer): Use it.
(semantic-grammar--lex-block-specs): Remove unused var `block-spec'.
(semantic-grammar-file-regexp): Refine regexp.
(semantic-grammar-eldoc-get-macro-docstring):
Use elisp-get-fnsym-args-string when available.
(semantic-idle-summary-current-symbol-info): Use new elisp-* names
instead of the old eldoc-* names.

* lisp/emacs-lisp/eldoc.el (eldoc-docstring-format-sym-doc): Move back
from elisp-mode.el.  Tweak calling convention.

* lisp/progmodes/elisp-mode.el (package-user-dir): Declare.
(elisp-get-fnsym-args-string): Add `prefix' argument.  Rename from
elisp--get-fnsym-args-string.
(elisp--highlight-function-argument): Add `prefix' arg.
(elisp-get-var-docstring): Rename from elisp--get-var-docstring.
(elisp--docstring-format-sym-doc): Move back to eldoc.el.
2015-05-05 22:18:19 -04:00
Nicolas Petton
4ac426a1b9 Merge branch 'seq-let' 2015-05-05 22:10:32 +02:00
Nicolas Petton
6cd7415598 Add support for &rest in `seq-let'
* lisp/emacs-lisp/seq.el (seq--make-bindings): Add support for `&rest'
in the argument list.
* test/automated/seq-tests.el: Add a test for parsing and binding
`&rest' in `seq-let'.
2015-05-05 21:45:36 +02:00
Paul Eggert
0508aa2670 Spelling fixes 2015-05-05 12:25:48 -07:00
(tiny change) Pierre Lorenzon
ad9e659b30 * eieio-custom.el (eieio-object-value-get): Add missing increment
Fixes: debbugs:20467
2015-05-05 14:47:58 -04:00
(tiny change) Pierre Lorenzon
a53545fc4b (eieio-object-value-create): Adjust to new slots representation
Fixes: debbugs:20467

* eieio-custom.el (eieio-object-value-create):
Fix missed adjustment to new representation of slots metadata.
2015-05-05 14:43:48 -04:00
Nicolas Petton
b096be2aa8 * lisp/emacs-lisp/seq.el (seq--make-bindings): Improve the docstring. 2015-05-05 20:39:40 +02:00
Glenn Morris
a6b6ab22d5 * lisp/emacs-lisp/debug.el (help-xref-interned): Update declaration. 2015-05-04 20:22:15 -04:00
Glenn Morris
7ccf25770a * lisp/allout.el (epg-user-id-string, epg-key-user-id-list):
* lisp/emacs-lisp/package.el (epg-signature-status):
Fix declarations.
2015-05-04 20:21:47 -04:00
Glenn Morris
b2f3c8071b * lisp/emacs-lisp/check-declare.el (check-declare-verify):
Handle cl-defgeneric, cl-defmethod.
2015-05-04 20:17:35 -04:00
Artur Malabarba
5d3940a3b9 * lisp/emacs-lisp/package.el: Remove `package--silence' variable
(package-import-keyring, package-refresh-contents)
(package-compute-transaction, package--save-selected-packages)
(package-install-from-archive, package-delete)
(package-menu--perform-transaction): Use `inhibit-message'
instead.
(package--compile): Set `warning-minimum-level' to :error.
2015-05-04 14:14:09 +01:00
Nicolas Petton
0bbc027356 * lisp/emacs-lisp/seq.el (seq-p): New alias to `sequencep'. 2015-05-02 14:26:37 +02:00
Glenn Morris
a73af96549 * lisp/emacs-lisp/pcase.el (get-edebug-spec, edebug-match)
(help-fns--signature): Declare.
2015-05-01 13:40:31 -04:00
Glenn Morris
d6b91bf5d4 * lisp/emacs-lisp/pcase.el (pcase--make-docstring): Require help-fns. 2015-05-01 13:39:23 -04:00
Nicolas Petton
c856843f6b New macro seq-let, providing destructuring support to seq.el
* lisp/emacs-lisp/seq.el (seq-let): New macro.  `seq-let' is similar
to `cl-destructuring-bind' but works on all sequence types supported
by `seq.el'.  Bump version number to 1.6.
* test/automated/seq-tests.el: Add tests for seq-let.
* doc/lispref/sequences.texi: Add documentation for seq-let.
2015-05-01 19:33:40 +02:00
Przemysław Wojnowski
7e7fd3010b ; Add class name to error message
* lisp/emacs-lisp/eieio-core.el (eieio-oref): Add class name to error
  message to ease finding offending code.
2015-05-01 13:10:26 -04:00
Glenn Morris
b0481de73b * lisp/emacs-lisp/ert.el (ert--special-operator-p): Fix previous. 2015-05-01 08:29:18 -07:00
Artur Malabarba
9b909c4265 * lisp/emacs-lisp/bytecomp.el: Revert "Silence noninteractive compilations"
This reverts commit 9a7ddde977.
This reverts commit 3c0ea587da.
With message: "* lisp/emacs-lisp/bytecomp.el: Use `inhibit-message'".
(Bug#20445).
2015-05-01 15:25:02 +01:00
Glenn Morris
55496af138 * lisp/emacs-lisp/ert.el (ert--special-operator-p):
Update for 2015-02-08 change to indirect-function.
2015-04-30 21:18:52 -04:00
Glenn Morris
e22f333ddb Silence some compilation warnings
* lisp/emacs-lisp/check-declare.el (compilation-forget-errors):
* lisp/emulation/cua-base.el (delete-active-region):
* lisp/net/net-utils.el (w32-get-console-output-codepage):
* lisp/term/ns-win.el (ns-own-selection-internal)
(ns-disown-selection-internal, ns-selection-owner-p)
(ns-selection-exists-p, ns-get-selection):
Declare for compiler..
2015-04-30 20:09:02 -04:00
Glenn Morris
ce7ff436ff Function declaration updates prompted by 'make check-declare'
* lisp/emacs-lisp/package.el (lm-homepage):
* lisp/gnus/gnus-util.el (iswitchb-read-buffer):
* lisp/gnus/mm-decode.el (libxml-parse-html-region):
* lisp/gnus/mml.el (libxml-parse-html-region):
* lisp/gnus/nnrss.el (libxml-parse-html-region):
* lisp/net/eww.el (libxml-parse-html-region):
* lisp/net/shr.el (libxml-parse-html-region):
* lisp/vc/vc-bzr.el (vc-annotate-convert-time):
* lisp/vc/vc-cvs.el (vc-annotate-convert-time):
* lisp/vc/vc-git.el (vc-annotate-convert-time):
* lisp/vc/vc-hg.el (vc-annotate-convert-time):
* lisp/vc/vc-mtn.el (vc-annotate-convert-time):
* lisp/vc/vc-rcs.el (vc-annotate-convert-time):
Update declaration.
2015-04-30 20:06:15 -04:00
Artur Malabarba
f4ad42936e * lisp/emacs-lisp/package.el: Some speed optimizations on menu refresh
(package-menu--print-info): Obsolete.
(package-menu--print-info-simple): New function.
(package-menu--refresh): Use it, simplify code, and improve
performance.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
Tiny performance improvement.
2015-04-30 09:35:20 +01:00
Artur Malabarba
5b6c58395d * lisp/emacs-lisp/package.el (package--message): inhibit-message 2015-04-30 09:35:20 +01:00
Artur Malabarba
c1d30c4b13 * lisp/emacs-lisp/package.el: Use pushnew for downloads in progress
(package--download-and-read-archives): Use pushnew instead of
append.  If something terrible happened during a previous
download, simply refreshing should now make things work again.
2015-04-30 00:59:26 +01:00
Nicolas Petton
a5237a0499 Faster implementation of map-empty-p
* lisp/emacs-lisp/map.el (map-empty-p): Faster implementation using
specific tests depending on the type of the map.
2015-04-29 19:05:44 +02:00
Nicolas Petton
12a3ea52c4 * lisp/emacs-lisp/map.el: Better docstrings. 2015-04-29 19:01:40 +02:00
Artur Malabarba
3c0ea587da * lisp/emacs-lisp/bytecomp.el: Use `inhibit-message'
(byte-compile--message): Use `inhibit-message' instead of hiding
the previous message with (message nil).
2015-04-29 09:48:07 +01:00
Artur Malabarba
301514f2bf * lisp/emacs-lisp/package.el: Fix priority-hiding corner case
(package-menu--refresh): Delegate obsolete-hiding to
`package--remove-hidden'.
(package--remove-hidden): Disregard high-priority package if it is
older than the installed one.
2015-04-28 22:29:50 +01:00
Artur Malabarba
fecd155703 * lisp/emacs-lisp/package.el: Skip space and comments in init file
(package--ensure-init-file): Insert snippet at first
non-whitespace non-comments line.  Respects local-vars at the top
of the file.
2015-04-28 11:08:40 +01:00
Nicolas Petton
66fec8bec4 Bump version of seq.el to 1.5
* lisp/emacs-lisp/seq.el (seq-doseq): Remove undocumented return value
  from seq-doseq.  Bump version number of seq.el.
2015-04-27 23:26:33 +02:00
Artur Malabarba
f3b43fca47 * lisp/emacs-lisp/package.el: Small improvements
(package--with-work-buffer-async): More informative error.
(package-install-user-selected-packages): Rename to
`package-install-selected-packages'.
2015-04-27 22:06:32 +01:00
Stefan Monnier
d320ec576d * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Fix last
* lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Fix last change.
(eieio--class-make): Remove leftover `tag'.
2015-04-27 16:01:39 -04:00
Stefan Monnier
d92e0c58e8 * lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Reuse oldc. 2015-04-27 15:33:43 -04:00
Stefan Monnier
0b72388293 lisp/emacs-lisp/package.el: Move variables to silence byte-compiler
Remove redundant ":group 'package".
2015-04-26 17:03:21 -04:00
Artur Malabarba
c576ab54b5 * lisp/emacs-lisp/map.el (map-pairs): Dump redundant lambda 2015-04-25 17:27:13 +01:00
Artur Malabarba
864573cafe * lisp/emacs-lisp/package.el (package-all-keywords): Don't cache
(package--all-keywords): Deleted variable.
2015-04-25 17:04:02 +01:00
Nicolas Petton
5e52b0a076 * lisp/emacs-lisp/map.el (map--elt-list): Better docstring. 2015-04-25 16:56:19 +02:00
Nicolas Petton
40a8a12a26 * lisp/emacs-lisp/map.el (map--elt-list): Minor refactoring. 2015-04-25 16:53:09 +02:00
Nicolas Petton
62879799ea Fix a false negative in `map-elt' with alists and values being nil
* lisp/emacs-lisp/map.el (map-elt): If map is an alist and key is
found but its associated value is nil, do not return the default
value.

* test/automated/map-tests.el: Add a regression test.
2015-04-25 12:07:12 +02:00
Paul Eggert
2f5da6d45a Spelling fixes 2015-04-24 23:19:59 -07:00
Nicolas Petton
7ecda8a221 * lisp/emacs-lisp/seq.el (seq-doseq): Fix the macro. 2015-04-24 23:12:50 +02:00
Stefan Monnier
e224c9465d * lisp/emacs-lisp/seq.el (seq-doseq): Tighten the code
(seq-doseq): Fix out-of-scope binding.
Don't call `seq-length at every iteration.
Reduce `if's from 3 to 2 per iteration.
(emacs-lisp-mode-hook): Don't tweak in Emacs≥25.
2015-04-24 16:11:35 -04:00
Nicolas Petton
eea2e83138 * lisp/emacs-lisp/map.el (map--dispatch): Improve the docstring. 2015-04-24 19:33:18 +02:00
Nicolas Petton
d75151a671 Do not signal an error when trying to delete a key from an array
* lisp/emacs-lisp/map.el (map-delete): When map is an array, check if
the key is present to avoid signaling an error.

* test/automated/map-tests.el: Add a test for deleting non-existing
keys from maps.
2015-04-24 19:29:59 +02:00
Nicolas Petton
79d9757c23 * lisp/emacs-lisp/map.el: Better docstring. 2015-04-24 19:15:23 +02:00
Nicolas Petton
f37e265ea9 Minor improvement in map-elt.
* lisp/emacs-lisp/map.el (map-elt): Do not use `ignore-errors' when
doing a lookup in arrays, but check the boundaries of the array
instead.

* test/automated/map-tests.el: Adds a test for `map-elt' with arrays
and a negative integer as key.
2015-04-24 19:10:45 +02:00