Commit graph

4528 commits

Author SHA1 Message Date
Glenn Morris
f42ceab546 Further lisp-complete-symbol related cleanup.
* lisp/emacs-lisp/lisp.el (lisp-complete-symbol):
Unadvertise non-functional argument.  Replace obsolete alias.
2015-05-18 20:51:47 -04:00
Oleh Krehel
d3d50a9c99 Allow checkdoc to be called in batch
* lisp/emacs-lisp/checkdoc.el (checkdoc-error): When `noninteractive'
  is non-nil, echo the error with `warn'.

How it can be used in -batch:

(with-current-buffer (find-file "checkdoc.el")
  (checkdoc-current-buffer t))
2015-05-18 10:07:03 +02:00
Nicolas Petton
daaa4a38e8 Removes the predicate from lisp-complete-symbol (Bug#20456)
* lisp/emacs-lisp/lisp.el (lisp-complete-symbol): Do not use predicate
and remove it from the docstring.
2015-05-16 15:58:24 +02:00
Artur Malabarba
a96731d7f0 * lisp/emacs-lisp/tabulated-list.el: Don't error on nil header-string
(tabulated-list-init-header): Document new behavior.
(tabulated-list-print-fake-header): No nothing if
`tabulated-list--header-string' is nil.
(tabulated-list--header-string): Add a docstring.

* doc/lispref/modes.texi (Tabulated List Mode): Document it.
* etc/NEWS: Document it.
2015-05-16 09:52:53 +01:00
Leo Liu
e85053f8fe Revert "Fix cps--gensym"
* lisp/emacs-lisp/generator.el (cps--gensym): Revert commit
  fbda511ab8 on 2015-05-14.
2015-05-16 09:06:34 +08:00
Artur Malabarba
2abfe21de9 * lisp/emacs-lisp/package.el: Don't ensure-init during startup
(package--init-file-ensured): New variable.
(package-initialize, package--ensure-init-file): Use it.
2015-05-15 11:18:53 +01:00
Artur Malabarba
b1c23fb940 * lisp/emacs-lisp/package.el: Be more careful with the init file
(package--ensure-init-file): Check that user-init-file is set,
exists, is readable, and is writable.  (Bug#20584)
Also expand the docstring.
2015-05-15 10:17:48 +01:00
Leo Liu
fbda511ab8 Fix cps--gensym
* lisp/emacs-lisp/generator.el (cps--gensym): Fix.
2015-05-14 11:19:14 +08:00
Glenn Morris
912d4a4935 Fix bootstrap (void function cl-member).
* lisp/emacs-lisp/cl-lib.el: Load cl-seq if no cl-loaddefs file.
* lisp/emacs-lisp/cl-seq.el: Provide a feature.
2015-05-13 19:02:31 -04:00
Stefan Monnier
37ab2245f2 * lisp/loadup.el ("emacs-lisp/cl-generic"): Preload
* src/lisp.mk (lisp): Add emacs-lisp/cl-generic.elc.
* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
Avoid defalias for closures which are not immutable.
(cl--generic-prefill-dispatchers): New macro.  Use it to prefill the
dispatchers table with various entries.

* lisp/emacs-lisp/ert.el (emacs-lisp-mode-hook):
* lisp/emacs-lisp/seq.el (emacs-lisp-mode-hook): Use add-hook.
2015-05-13 18:39:49 -04:00
Nicolas Petton
f9ba8dc074 Improve the seq pcase pattern and the `seq-let' macro
* lisp/emacs-lisp/seq.el: The pcase pattern now matches only if the
object is a sequence, and binds each element of ARGS to the
corresponding element of the sequence.
2015-05-12 22:15:45 +02:00
Glenn Morris
f2941a78d2 * lisp/emacs-lisp/chart.el (chart-axis-draw): Replace obsolete alias. 2015-05-11 23:50:08 -07:00
Stefan Monnier
d1b74200da * lisp/emacs-lisp/cl-generic.el: Add dispatch on &context arguments
(cl--generic-mandatory-args): Remove.
(cl--generic-split-args): New function.
(cl-generic-define, cl--generic-lambda): Use it.
(cl-generic-define-method): Use it as well, and add support for
context args.
(cl--generic-get-dispatcher): Handle &context dispatch.
(cl--generic-cache-miss): `dispatch-arg' can now be a context expression.
(cl--generic-dispatchers): Pre-fill.

* test/automated/cl-generic-tests.el (sm-generic-test-12-context): New test.
2015-05-12 00:10:38 -04:00
Nicolas Petton
387e1e1943 New version of `seq-let' based on a pcase pattern
* lisp/emacs-lisp/seq.el (seq-let): Define the macro in terms of a
pcase pattern if `pcase-defmacro' is defined (Emacs>=25.1).
2015-05-10 20:19:38 +02:00
Glenn Morris
5b0af214c8 Quieten compilation, eg in --without-x builds.
* lisp/dired-aux.el (lpr-printer-switch):
* lisp/frame.el (tool-bar-height):
* lisp/linum.el (font-info):
* lisp/window.el (font-info, overflow-newline-into-fringe)
(tool-bar-height):
* lisp/emacs-lisp/package-x.el (tar-data-buffer):
* lisp/gnus/gnus-util.el (iswitchb-mode):
* lisp/mail/rmailmm.el (libxml-parse-html-region):
* lisp/net/nsm.el (gnutls-peer-status)
(gnutls-peer-status-warning-describe):
* lisp/net/shr.el (libxml-parse-xml-region):
* lisp/url/url-http.el (gnutls-peer-status): Declare.
2015-05-08 20:13:47 -04:00
Glenn Morris
5ed5a04963 ; Auto-commit of loaddefs files. 2015-05-08 06:22:25 -04:00
Glenn Morris
19f4aca23b * lisp/emacs-lisp/eieio-opt.el (help-fns-short-filename): Declare. 2015-05-07 22:42:12 -07:00
Artur Malabarba
3a33ac8911 * lisp/emacs-lisp/subr-x.el (if-let): Fix debug spec
Support the case when BINDINGS is a single tuple.  (Bug#20525)
2015-05-07 21:13:29 +01:00
Artur Malabarba
14bb519f10 * lisp/emacs-lisp/package.el: New "external" package status
An external package is any installed package that's not built-in
and not from `package-user-dir', which usually means it's from an
entry in `package-directory-list'.  They are treated much like
built-in packages, in that they cannot be through the Package Menu
deleted and are not considered for upgrades.

(package-desc-status): Identify if a package is installed outside
`package-user-dir'.
(package-menu--print-info-simple)
(package-menu--status-predicate): Add support for it.

* etc/NEWS: Document it.
2015-05-07 16:13:45 +01:00
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
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