Commit graph

152 commits

Author SHA1 Message Date
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
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
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
015936fba1 Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org 2014-05-25 19:28:09 -07:00
Stefan Monnier
7b952d6142 * lisp/emacs-lisp/lisp.el (end-of-defun): Ensure we move.
Fixes: debbugs:17274
2014-05-20 14:55:41 -04:00
Daniel Colascione
3f63a9f7de Make up-list and backward-up-list get out of more spots 2014-04-09 09:58:08 -07:00
Dmitry Gutov
b2388336fe * lisp/emacs-lisp/lisp.el (lisp--local-variables): Catch `end-of-file'
error from `read-from-string'.

Fixes: debbugs:16850
2014-02-26 04:31:27 +02:00
Lars Ingebrigtsen
3bd1d8a8e0 * emacs-lisp/lisp.el (up-list): Doc fix.
Fixes: debbugs:15832
2014-02-09 21:50:16 -08:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Stefan Monnier
29127376a5 * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Symbols don't start
with a space.  Limit the symbols considered to the ones
that are bound or fbound (bug#16646).

Fixes: debbugs:16664
2014-02-06 00:37:23 -05:00
Dmitry Gutov
a333e4d297 Define and use `completion-table-merge'
* lisp/minibuffer.el (completion-table-merge): New function.

* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Use
`completion-table-merge' instead of `completion-table-in-turn'.

Fixes: debbugs:16604
2014-02-06 03:22:38 +02:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
e333fb100b * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Complete var names for
let-bindings.
2013-10-17 00:49:42 -04:00
Stefan Monnier
2da4c3ab6f * lisp/emacs-lisp/lisp.el (lisp--company-doc-buffer)
(lisp--company-doc-string, lisp--company-location): New functions.
(lisp-completion-at-point): Use them to improve Company support.
2013-08-29 15:18:16 -04:00
Glenn Morris
ba947bc42f * emacs-lisp/lisp.el (forward-sexp, backward-sexp): Doc fixes. 2013-06-13 09:44:26 -07:00
Stefan Monnier
bbcc4d9744 * lisp.el: Provide completion of locally bound variables in Elisp.
* lisp/emacs-lisp/lisp.el: Use lexical-binding.
(lisp--local-variables-1, lisp--local-variables): New functions.
(lisp--local-variables-completion-table): New var.
(lisp-completion-at-point): Use it to provide completion of let-bound vars.
2013-06-03 11:40:35 -04:00
Stefan Monnier
df76dacbd1 * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't burp at EOB.
Fixes: debbugs:14446
2013-05-24 23:08:04 -04:00
Stefan Monnier
c902337068 * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
error-completion on the first 2 args of condition-case.

Fixes: debbugs:14446
2013-05-24 23:00:13 -04:00
Stefan Monnier
dd8791e96f * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Provide specialized
completion tables when completing error conditions and
`declare' arguments.
(lisp-complete-symbol, field-complete): Mark as obsolete.
(check-parens): Unmatched parens are user errors.
* lisp/minibuffer.el (minibuffer-completion-contents): Mark as obsolete.
2013-04-17 16:52:02 -04:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Lennart Borgman
050cc68b40 `narrow-to-defun' fixup
* emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes
to previous function when point is on the first character of a
function. Take care of that in `narrow-to-defun'.

Fixes: debbugs:6157
2012-04-11 04:12:20 +02:00
Dmitry Gutov
8e911f6f93 * lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Don't call end-of-defun
when it might call us back infinitely.

Fixes: debbugs:10797
2012-02-23 03:13:48 -05:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Stefan Monnier
2403c841a8 Silence various byte-compiler warnings.
* lisp/emacs-lisp/byte-run.el (make-obsolete-variable): New argument
`access-type' and new obsolescence format.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Adjust to
new format.
(byte-compile-check-variable): New `access-type' argument.
Only warn if the access-type is obsolete.
(byte-compile-dynamic-variable-bind, byte-compile-variable-ref)
(byte-compile-variable-set): Adjust callers.
* lisp/help-fns.el (describe-variable): Adjust to new obsolescence format.
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line): Only mark
setting it as obsolete.
* lisp/simple.el (minibuffer-completing-symbol):
* lisp/font-lock.el (font-lock-beginning-of-syntax-function): Only mark read
access as obsolete.
* lisp/minibuffer.el (minibuffer-completing-file-name): Don't make it
obsolete yet.
* lisp/international/quail.el (quail-mouse-choose-completion): Remove unused
code referring to obsolete var.
(quail-choose-completion-string): Remove.
* lisp/server.el (server-clients-with, server-kill-buffer-query-function)
(server-kill-emacs-query-function): Silence "unused `proc'" warnings.
* lisp/proced.el (proced-send-signal):
* lisp/emacs-lisp/lisp.el (lisp-complete-symbol):
Replace completion-annotate-function with completion-extra-properties.
2011-06-01 16:32:04 -03:00
Stefan Monnier
e44e373d30 * lisp/emacs-lisp/lisp.el (up-list): Fix forward movement.
Fixes: debbugs:8708
2011-05-23 13:40:16 -03:00
Glenn Morris
d2fc7e3d0f Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de. 2011-05-12 00:07:06 -07:00
Stefan Monnier
3f254caa51 * lisp/emacs-lisp/lisp.el (lisp-complete-symbol, lisp-completion-at-point):
Fix typo.
2011-05-09 12:17:05 -03:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Juanma Barranquero
4c14013dbe Merge changes from emacs-23 branch. 2010-10-12 01:57:49 +02:00
Stefan Monnier
4c5281974f * lisp/emacs-lisp/lisp.el (lisp-completion-at-point):
Use emacs-lisp-mode-syntax-table for the whole function.
2010-10-09 17:43:43 +02:00
Stefan Monnier
984edd2215 * lisp/simple.el (blink-matching-open): Use syntax-class.
* lisp/emacs-lisp/lisp.el (up-list): Don't do nothing silently.
2010-09-20 23:45:09 +02:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Stefan Monnier
afa22f7ce7 * lisp/emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set. 2010-08-17 22:18:40 +02:00
Stefan Monnier
0235128c15 Merge from emacs-23 2010-05-08 14:47:07 -04:00
Stefan Monnier
ccaa47655d * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. 2010-04-27 13:57:32 -04:00
Stefan Monnier
62c5b459af (lisp-completion-at-point): Try and handle errors. 2010-04-21 13:53:03 -04:00
Stefan Monnier
6e610c7261 (lisp-completion-at-point): Complete around point.
I.e. include text after point in the completion region.
Also, return nil when we're not after/in a symbol.
2010-04-20 12:37:31 -04:00
Glenn Morris
0ca1259846 * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string. 2010-04-20 00:54:28 -07:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Stefan Monnier
51ef56c47f * minibuffer.el (completion-at-point-functions): New var.
(completion-at-point): New command.
* indent.el (indent-for-tab-command): Handle the new `complete' behavior.
* progmodes/python.el (python-mode-map): Use completion-at-point.
(python-completion-at-point): Rename from python-partial-symbol and
adjust for use in completion-at-point-functions.
(python-mode): Setup completion-at-point for Python completion.
* emacs-lisp/lisp.el (lisp-completion-at-point): New function
extracted from lisp-complete-symbol.
(lisp-complete-symbol): Use it.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use define-derived-mode,
setup completion-at-point for Elisp completion.
(emacs-lisp-mode-map, lisp-interaction-mode-map): Use completion-at-point.
* ielm.el (ielm-map): Use completion-at-point.
(inferior-emacs-lisp-mode): Setup completion-at-point for Elisp completion.
* progmodes/sym-comp.el: Move to...
* obsolete/sym-comp.el: Move from progmodes.
2009-12-07 20:06:26 +00:00
Stefan Monnier
a185548b1c * abbrev.el (abbrev-with-wrapper-hook): (re)move...
* simple.el (with-wrapper-hook): ...to here.  Add argument `args'.
* minibuffer.el (completion-in-region-functions): New hook.
(completion-in-region): New function.
* emacs-lisp/lisp.el (lisp-complete-symbol):
* pcomplete.el (pcomplete-std-complete): Use it.
2009-11-19 03:12:51 +00:00
Stefan Monnier
a1bf889a14 (lisp-complete-symbol): Use minibuffer-complete. 2009-08-30 21:45:36 +00:00
Stefan Monnier
73ebf88f15 (field-complete): Use minibuffer-complete. 2009-08-30 15:13:35 +00:00
Glenn Morris
cb71155600 Remove leading * from defcustom docs. 2009-07-22 02:45:34 +00:00