Stefan Monnier
19e0f0af6d
* lisp/subr.el (track-mouse): New macro.
...
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
Remove track-mouse case.
* lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove.
* src/keyboard.c (track-mouse): Rename to internal--track-mouse.
Make it into a function and change arg to be a function.
2014-09-27 11:52:28 -04:00
Leo Liu
548e169622
* lisp/emacs-lisp/eldoc.el (eldoc-mode): Fix thinko.
...
* lisp/progmodes/elisp-mode.el (elisp--eldoc-last-data): Use defvar.
2014-09-27 18:08:59 +08:00
Stefan Monnier
528872c5f8
* lisp/emacs-lisp/pcase.el (pcase--split-match, pcase--app-subst-match):
...
Handle the case where `match' is :pcase--succeed or :pcase--fail.
Fixes: debbugs:18554
2014-09-27 00:24:06 -04:00
Stefan Monnier
e6cfa098ae
Introduce global-eldoc-mode. Move Elisp-specific code to elisp-mode.el.
...
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): New minor mode.
(eldoc-schedule-timer): Obey it.
(eldoc-documentation-function): Default to nil.
(eldoc-mode): Don't enable if eldoc-documentation-function is not set.
(eldoc-documentation-function-default, eldoc-get-fnsym-args-string)
(eldoc-highlight-function-argument, eldoc-get-var-docstring)
(eldoc-last-data-store, eldoc-docstring-first-line)
(eldoc-docstring-format-sym-doc, eldoc-fnsym-in-current-sexp)
(eldoc-beginning-of-sexp, eldoc-current-symbol)
(eldoc-function-argstring): Move to elisp-mode.el.
(eldoc-symbol-function): Remove, unused.
* lisp/progmodes/elisp-mode.el: New file. Rename all "eldoc-*" to "elisp--*".
(elisp-completion-at-point): Rename from lisp-completion-at-point.
(elisp--preceding-sexp): Rename from preceding-sexp.
* lisp/loadup.el: Load new file progmodes/elisp-mode.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set eldoc-documentation-function.
* lisp/emacs-lisp/lisp.el (lisp--local-variables-1, lisp--local-variables)
(lisp--local-variables-completion-table, lisp--expect-function-p)
(lisp--form-quoted-p, lisp--company-doc-buffer)
(lisp--company-doc-string, lisp--company-location)
(lisp-completion-at-point): Move to elisp-mode.el.
* lisp/emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): New syntax-table,
extracted from emacs-lisp-mode-syntax-table.
(emacs-lisp-mode-abbrev-table, emacs-lisp-mode-syntax-table): Move to
elisp-mode.el.
(lisp-imenu-generic-expression): Add comments to document what comes
from which Lisp dialect.
(emacs-lisp-mode-map, emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load, emacs-lisp-mode-hook)
(emacs-lisp-mode, emacs-list-byte-code-comment-re)
(emacs-lisp-byte-code-comment)
(emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode)
(lisp-interaction-mode-map, lisp-interaction-mode)
(eval-print-last-sexp, last-sexp-setup-props)
(last-sexp-toggle-display, prin1-char, preceding-sexp)
(eval-last-sexp-1, eval-last-sexp-print-value)
(eval-last-sexp-fake-value, eval-sexp-add-defvars, eval-last-sexp)
(eval-defun-1, eval-defun-2, eval-defun): Move to elisp-mode.el.
* src/lisp.mk (lisp): Add elisp-mode.elc.
2014-09-26 23:57:41 -04:00
Leo Liu
d73f2d856c
* emacs-lisp/cl-extra.el (cl-parse-integer): Fix last change.
2014-09-26 10:01:17 +08:00
Leo Liu
89b354a55e
Add cl-parse-integer based on parse-integer
...
* doc/misc/cl.texi (Predicates on Numbers): Document cl-digit-char-p.
(Numerical Functions): Document cl-parse-integer.
* lisp/calendar/parse-time.el (parse-time-digits): Remove.
(digit-char-p, parse-integer) Moved to cl-lib.el.
(parse-time-tokenize, parse-time-rules, parse-time-string): Use
cl-parse-integer.
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer): New function.
* lisp/emacs-lisp/cl-lib.el (cl-digit-char-table): New var.
(cl-digit-char-p): New function.
* test/automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New
tests.
Fixes: debbugs:18557
2014-09-26 08:15:21 +08:00
Stefan Monnier
2b968ea662
* lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
...
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
2014-09-22 14:05:22 -04:00
Stefan Monnier
7fbd780a00
* lisp/emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
...
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
2014-09-22 13:24:46 -04:00
Stefan Monnier
1a6255532e
* lisp/emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
...
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
2014-09-22 12:22:50 -04:00
Stefan Monnier
536cda1f84
* lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
...
(pcase--macroexpand): New function.
(pcase--expand): Use it.
2014-09-22 11:04:12 -04:00
Stefan Monnier
13b1840d23
Add support for quote' and
app'.
...
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.
2014-09-22 10:30:47 -04:00
Stefan Monnier
55fa245f37
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
...
for functions with no arguments.
2014-09-22 09:47:47 -04:00
Dmitry Gutov
a58c2690db
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
...
`lisp--local-variables-completion-table' in the `lisp--form-quoted-p'
case.
2014-09-19 21:33:11 +04:00
Dmitry Gutov
3907574bb8
Fix bug#18265
...
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
(lisp-completion-at-point): Move `end' back if it's after quote.
If in comment or string, only complete when after backquote.
2014-09-19 07:41:42 +04:00
Dmitry Gutov
30c17da5df
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
...
`table-etc' when `end' is non-nil.
2014-09-19 07:28:31 +04:00
Dmitry Gutov
48453e00a3
Make lisp-completion-at-point more discerning
...
* lisp/emacs-lisp/lisp.el (lisp--expect-function-p)
(lisp--form-quoted-p): New functions.
(lisp-completion-at-point): Use them to see if we're completing a
variable reference, a function name, or just any symbol.
http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00229.html
2014-09-19 07:10:29 +04:00
Leo Liu
85b3d352c7
* emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Add
...
pcase-exhaustive.
* emacs-lisp/pcase.el (pcase--dontwarn-upats): New var.
(pcase--expand): Use it.
(pcase-exhaustive): New macro.
Fixes: debbugs:16567
2014-09-14 00:30:21 +08:00
Paul Eggert
0f2ed59206
Spelling fixes.
...
* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from
ses-file-format-extend-paramter-list. All uses changed.
* lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling
of ":delete".
2014-09-11 12:44:25 -07:00
Leo Liu
e872d52c93
Add vector qpattern to pcase
...
* doc/lispref/control.texi (Pattern matching case statement): Document vector
qpattern.
* etc/NEWS: Mention vector qpattern for pcase. (Bug#18327).
* lisp/emacs-lisp/pcase.el (pcase): Doc fix.
(pcase--split-vector): New function.
(pcase--q1): Support vector qpattern. (Bug#18327)
2014-09-06 08:59:00 +08:00
Stefan Monnier
1f69089d35
* lisp/emacs-lisp/eldoc.el (eldoc-function-argstring): Don't strip
...
terminating paren.
(eldoc-last-data-store): Return cached data.
(eldoc-get-var-docstring): Avoid setq.
(eldoc-get-fnsym-args-string): Clarify data flow.
Fixes: debbugs:18352
2014-09-04 11:23:37 -04:00
Thierry Volpiatto
e77bcfa34d
* lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Handle the
...
case where we're currently providing part of the &rest arg after some
&key args, as in define-ibuffer-op.
Fixes: debbugs:18048
2014-09-04 10:49:56 -04:00
Glenn Morris
62fca47221
Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ru
2014-09-02 21:21:40 -07:00
Stefan Monnier
559b827d8a
* lisp/emacs-lisp/package.el (package-generate-description-file):
...
Properly quote the arguments. Change second arg.
(package--alist-to-plist-args): Rename from package--alist-to-plist and
quote the elements.
(package--make-autoloads-and-stuff): Fix the test for pre-existence of
the *-pkg.el file. Adjust to new calling convention of
package-generate-description-file.
Fixes: debbugs:18332
2014-09-02 15:51:25 -04:00
Michael Heerdegen
e6a4c15ff1
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Use mode function
...
name instead of variable name in hook docstring. (Bug#18349)
2014-08-29 22:28:19 +02:00
Michael Albinus
9b6ab1afe4
* emacs-lisp/authors.el (authors-aliases): Addition.
2014-08-27 09:53:58 +02:00
Thierry Volpiatto
2e7d4343e9
* lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Add support
...
for &key args.
* emacs-lisp/eldoc.el (eldoc-argument-case): Obsolete and change default.
(eldoc-function-argstring-format): Remove.
(eldoc-function-argstring): Always return upcase args.
Use help-make-usage. Don't add parens.
(eldoc-get-fnsym-args-string): Don't obey eldoc-argument-case since
it's too late to do it right (bug#18048).
2014-08-18 15:28:40 -04:00
Stefan Monnier
4d6abf2449
* emacs-lisp/smie.el (smie-config--guess-1): Split from smie-config--guess.
...
(smie-config--guess): Use it.
2014-07-20 21:58:43 -04:00
Stefan Monnier
29b6ac245f
* lisp/emacs-lisp/edebug.el: Use nadvice.
...
(edebug-original-read): Remove.
(edebug--read): Rename from edebug-read and add `orig' arg.
(edebug-uninstall-read-eval-functions)
(edebug-install-read-eval-functions): Use nadvice.
(edebug-read-sexp, edebug-read-storing-offsets, edebug-read-symbol)
(edebug-read-and-maybe-wrap-form1, edebug-instrument-callee)
(edebug-read-string, edebug-read-function): Use just `read'.
(edebug-original-debug-on-entry): Remove.
(edebug--debug-on-entry): Rename from edebug-debug-on-entry and add
`orig' arg.
(debug-on-entry): Override with nadvice.
2014-07-20 21:56:54 -04:00
Stefan Monnier
bb16bffbd2
Indentation, punctuation, and other nitpicks.
2014-07-20 21:41:59 -04:00
Glenn Morris
5613a6f6d5
Merge from emacs-24; up to 2014-06-19T14:03:45Z!monnier@iro.umontreal.ca
2014-07-08 19:04:12 -07:00
Stefan Monnier
b16a9348e4
* lisp/emacs-lisp/edebug.el (edebug-eval-defun): Print result using
...
proper Lisp quoting.
Fixes: debbugs:17934
2014-07-05 15:11:59 -04:00
Phil Sainty
2b13ca4d11
* lisp/emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var.
...
(narrow-to-defun): New arg include-comments, defaulting to it.
Fixes: debbugs:16328
2014-07-03 22:00:54 -04:00
Glenn Morris
2d3c9015c7
Merge from emacs-24; up to 2014-06-15T04:52:34Z!eli@barzilay.org
2014-07-02 23:00:53 -07:00
Leo Liu
cc4f9c83bc
* emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp):
...
Support lexical-binding.
2014-07-02 13:05:50 +08:00
Fabián Ezequiel Gallina
911ba4d915
* lisp/emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias
...
for `reverse'.
2014-06-30 17:17:17 -03:00
Glenn Morris
0224bf74b2
Get rid of the AUTOGEN_VCS variable in lisp/Makefile
...
* lisp/emacs-lisp/autoload.el (autoload-ensure-writable): New variable.
(autoload-ensure-default-file): Maybe make existing output writable.
* lisp/Makefile.in (AUTOGEN_VCS): Remove.
(autoloads): Use autoload-ensure-writable rather than AUTOGEN_VCS.
2014-06-30 14:26:34 -04:00
Fabián Ezequiel Gallina
de12301ea1
* lisp/emacs-lisp/subr-x.el (string-reverse): Use `reverse'.
2014-06-30 01:54:46 -03:00
Fabián Ezequiel Gallina
c08f8be29f
New if-let, when-let, thread-first and thread-last macros.
...
* lisp/emacs-lisp/subr-x.el
(internal--listify, internal--check-binding)
(internal--build-binding-value-form, internal--build-binding)
(internal--build-bindings): New functions.
(internal--thread-argument, thread-first, thread-last)
(if-let, when-let): New macros.
* test/automated/subr-x-tests.el
(subr-x-test-if-let-single-binding-expansion)
(subr-x-test-if-let-single-symbol-expansion)
(subr-x-test-if-let-nil-related-expansion)
(subr-x-test-if-let-malformed-binding, subr-x-test-if-let-true)
(subr-x-test-if-let-false, subr-x-test-if-let-bound-references)
(subr-x-test-if-let-and-lazyness-is-preserved)
(subr-x-test-when-let-body-expansion)
(subr-x-test-when-let-single-binding-expansion)
(subr-x-test-when-let-single-symbol-expansion)
(subr-x-test-when-let-nil-related-expansion)
(subr-x-test-when-let-malformed-binding)
(subr-x-test-when-let-true, subr-x-test-when-let-false)
(subr-x-test-when-let-bound-references)
(subr-x-test-when-let-and-lazyness-is-preserved)
(subr-x-test-thread-first-no-forms)
(subr-x-test-thread-first-function-names-are-threaded)
(subr-x-test-thread-first-expansion)
(subr-x-test-thread-last-no-forms)
(subr-x-test-thread-last-function-names-are-threaded)
(subr-x-test-thread-last-expansion): New tests.
2014-06-30 01:11:43 -03:00
Daiki Ueno
2493e35c36
* lisp/emacs-lisp/package.el (package--check-signature): (backport)
...
If package-check-signature is allow-unsigned, don't signal error when
we can't verify signature because of missing public key.
Fixes: debbugs:17625
2014-06-26 09:47:37 -04:00
Daiki Ueno
51a3c85711
package.el: Don't signal "no public key" error if allow-unsigned
...
* emacs-lisp/package.el (package--check-signature): If
package-check-signature is allow-unsigned, don't signal error when
we can't verify signature because of missing public key
(bug#17625).
2014-06-26 16:10:22 +09:00
Glenn Morris
9ac6d28ab8
Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org
2014-06-25 23:55:15 -07:00
Glenn Morris
a0e2175a90
* find-func.el (find-function-C-source-directory): Use file-accessible-directory-p
2014-06-25 23:45:10 -07:00
Glenn Morris
9fc9c8c639
Remove some function declarations, no longer needed or correct
...
* lisp/emacs-lisp/cl-macs.el (help-add-fundoc-usage):
* lisp/gnus/mm-util.el (help-function-arglist):
Remove outdated declarations.
2014-06-25 23:43:39 -07:00
Glenn Morris
515b1c5f79
Move lisp/emacs-lisp/authors.el to admin/
...
It is not useful for anything other than maintaining Emacs.
2014-06-25 23:24:56 -07:00
Glenn Morris
5a8816f3f2
Simplify and parallize test/automated Makefile
...
* Makefile.in (mostlyclean, clean): Maybe clean test/automated.
* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New.
* test/automated/Makefile.in: Simplify and parallelize.
(XARGS_LIMIT, BYTE_COMPILE_EXTRA_FLAGS)
(setwins, compile-targets, compile-main, compile-clean): Remove.
(GREP_OPTIONS): Unexport.
(.el.elc): Replace with pattern rule.
(%.elc, %.log): New pattern rules.
(ELFILES, LOGFILES): New variables.
(check): Depend on LOGFILES. Call ert-summarize-tests-batch-and-exit.
(clean, mostlyclean): New rules.
(bootstrap-clean): Simplify.
(bootstrap-clean, distclean): Depend on clean.
* .bzrignore: Ignore test/automated/*.log.
Fixes: debbugs:15991
2014-06-25 22:47:10 -07:00
Glenn Morris
d2301b5d80
authors.el: Add some renamed/moved files
...
* lisp/emacs-lisp/authors.el (authors-valid-file-names)
(authors-renamed-files-alist): Additions.
2014-06-25 20:36:58 -04:00
Stefan Monnier
0a27804c80
* lisp/emacs-lisp/package.el (package-list-unsigned): New var.
...
(package-desc-status): Obey it.
Fixes: debbugs:17625
2014-06-25 13:20:08 -04:00
Dmitry Antipov
9c3883b47d
* lisp/electric.el (electric-layout-post-self-insert-function):
...
* lisp/emacs-lisp/ert.el (ert--insert-infos):
* lisp/obsolete/vi.el (vi-set-mark):
* lisp/term.el (term-handle-scroll):
* lisp/textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry):
* lisp/gnus/gnus-sum.el (gnus-summary-edit-article-done):
* lisp/org/org-mouse.el (org-mouse-do-remotely):
* lisp/wid-edit.el (widget-editable-list-value-create): Prefer
point-marker to copy-marker of point.
* lisp/ob-core.el (org-babel-insert-result): Prefer point-min-marker
and point-max-marker.
2014-06-22 09:43:58 +04:00
Glenn Morris
c400516ab1
Merge from emacs-24; up to 2014-06-06T02:22:40Z!monnier@iro.umontreal.ca
2014-06-21 12:45:59 -07:00
Stefan Monnier
55d4eba2d0
* lisp/emacs-lisp/smie.el (smie-config--guess): Fix typo.
...
(smie-config-guess): Use smie-config-local so the rules are obeyed.
Fixes: debbugs:17818
2014-06-20 17:10:40 -04:00