1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

100 Commits

Author SHA1 Message Date
Dmitry Gutov
7f58daf816 Make eldoc timer non-repeatable
* lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer): Make the timer
non-repeatable.  Since it's on post-command hook, that just wasted
CPU cycles.
2015-07-21 16:58:14 +03: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
Michal Nazarewicz
fd020a2931 eldoc: modify eldoc-documentation-function' using add-function'
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Describe how
major modes should use `add-function' to alter value of the variable.

* lisp/hexl.el (hexl-mode): Set `eldoc-documentation-function' using
`add-function' so the default value is always used.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/cfengine.el (cfengine3-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/elisp-mode (emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/octave.el (octave-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/python.el (python-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/simple.el (read--expression): Set `eldoc-documentation-function'
using `add-function' so the default value is always used.
2015-01-20 15:04:15 +01:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Stefan Monnier
964f16e168 * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Change default.
(eldoc-mode, eldoc-schedule-timer): Adjust to new default.
2014-12-10 21:56:33 -05:00
Stefan Monnier
dcdf2bd8d6 * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default.
Remove incorrect handling of eldoc-print-after-edit.
(eldoc-message-commands, eldoc-last-data): Use defvar.
* lisp/loadup.el (emacs-lisp/eldoc): Load it.
* src/lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
2014-10-15 13:32:41 -04:00
Stefan Monnier
cbdc06f3be Rename 24.5 to 25.1
Except where we expect to backport the corresponding change.
2014-09-29 14:14:08 -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
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
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
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
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
Leo Liu
294b2b0928 * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Refactor
out eldoc-documentation-function-default.
(eldoc-documentation-function-default): New function.
(eldoc-documentation-function): Change value.
2014-03-31 09:31:17 +08:00
Leo Liu
6f0f96e756 * emacs-lisp/eldoc.el (eldoc-minibuffer-message): Clear
eldoc-last-message.

Fixes: debbugs:16920
2014-03-10 13:33:31 +08:00
Glenn Morris
314ff31814 * etc/NEWS: ElDoc related edit.
* lisp/emacs-lisp/eldoc.el: Related commentary.
2014-01-29 23:54:28 -08:00
Glenn Morris
ad78f43200 Replace refs to obsolete alias turn-on-eldoc-mode' with eldoc-mode'
* lisp/hexl.el (hexl-mode-hook):
* lisp/ielm.el (ielm-mode-hook):
* lisp/emacs-lisp/lisp-mode.el (emacs-lisp-mode-hook)
(lisp-interaction-mode-hook):
* lisp/progmodes/cfengine.e (cfengine3-documentation-function):
Replace obsolete alias `turn-on-eldoc-mode' with `eldoc-mode'.

* lisp/emacs-lisp/eldoc.el: Same in commentary.
2014-01-29 23:42:57 -08:00
Stefan Monnier
dd9d2e9d1e * lisp/emacs-lisp/eldoc.el: Properly remove message in minibuffer case.
(eldoc--message-command-p): New function.
(eldoc-display-message-p): Use it.
(eldoc-pre-command-refresh-echo-area): In the minibuffer case, the
message is not automatically erased for us.
(eldoc-print-current-symbol-info): Erase previous message, if any.
2014-01-21 08:09:55 -05:00
Leo Liu
3b922c70d6 Some minor fixes
* dired-x.el (dired-mode-map): Fix last change.
* emacs-lisp/eldoc.el (eldoc-mode): Add hook locally.
2014-01-12 18:29:59 +08:00
Leo Liu
9b335362d0 Re-implement the feature of showing eldoc info after editing.
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): Remove.
(eldoc-edit-message-commands): New function.
(eldoc-print-after-edit): New variable.
(eldoc-pre-command-refresh-echo-area): Emit message only by
eldoc-message-commands.
(eldoc-mode): Restrict eldoc-message-commands to editing commands
if eldoc-print-after-edit is set. 

* progmodes/octave.el (octave-mode-menu): Adapt to change in
eldoc.

Fixes: debbugs:16346
2014-01-12 12:00:03 +08:00
Stefan Monnier
6bdd920482 * lisp/abbrev.el (define-abbrev): Beware new meaning of fboundp.
* lisp/emacs-lisp/elint.el (elint-find-builtins):
* lisp/emacs-lisp/eldoc.el (eldoc-symbol-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn)
(byte-compile-file-form-defmumble, byte-compile, byte-compile-form):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/apropos.el (apropos-safe-documentation):
* lisp/subr.el (symbol-file): Remove redundant fboundp.
* lisp/progmodes/idlw-shell.el (idlwave-shell-comint-filter): Use defalias.
2014-01-06 18:34:05 -05:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
8497f93806 Fix eldoc-in-minibuffer's modeline update.
* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message):
Call force-mode-line-update is the proper buffer.

Fixes: debbugs:16042
2013-12-03 23:42:01 -05:00
Glenn Morris
30213927b6 Use with-demoted-errors now that it can format any error messages
* dframe.el (dframe-timer-fn):
* files.el (dir-locals-read-from-file):
* mpc.el (mpc--status-timer-run, mpc--status-idle-timer-run, mpc-format):
* reveal.el (reveal-post-command):
* saveplace.el (load-save-place-alist-from-file):
* shell.el (shell-resync-dirs):
* w32-common-fns.el (x-get-selection-value):
* emacs-lisp/copyright.el (copyright-find-copyright):
* emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):
* emulation/tpu-edt.el (tpu-copy-keyfile):
* play/bubbles.el (bubbles--mark-neighbourhood):
* progmodes/executable.el (executable-make-buffer-file-executable-if-script-p):
* term/pc-win.el (x-get-selection-value): Use with-demoted-errors.
2013-09-11 22:32:57 -07:00
Stefan Monnier
40f7e0e853 Misc changes to reduce use of `(lambda...); and other cleanups.
* lisp/cus-edit.el: Use lexical-binding.
(customize-push-and-save, customize-apropos)
(custom-buffer-create-internal): Use closures.
* lisp/progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings.
* lisp/progmodes/ada-xref.el: Use setq.
* lisp/net/tramp.el (with-tramp-progress-reporter): Avoid setq.
* lisp/dframe.el: Use lexical-binding.
(dframe-frame-mode): Fix calling convention for hooks.  Use a closure.
* lisp/speedbar.el (speedbar-frame-mode): Adjust call accordingly.
* lisp/descr-text.el: Use lexical-binding.
(describe-text-widget, describe-text-sexp, describe-property-list):
Use closures.
* lisp/comint.el (comint-history-isearch-push-state): Use a closure.
* lisp/calculator.el: Use lexical-binding.
(calculator-number-to-string): Make it work with lexical-binding.
(calculator-funcall): Same and use cl-letf.
2013-08-29 15:55:58 -04:00
Leo Liu
33cef733e0 Make sure eldoc can be turned off properly.
* emacs-lisp/eldoc.el (eldoc-schedule-timer): Conditionalize on
eldoc-mode.
(eldoc-display-message-p): Revert last change.
(eldoc-display-message-no-interference-p)
(eldoc-print-current-symbol-info): Tweak.
2013-03-18 17:16:15 +08:00
Leo Liu
69489f1dd6 * simple.el (eval-expression-minibuffer-setup-hook): New hook.
(eval-expression): Run it.

Extend eldoc to display info in the mode-line. 
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): New minor mode.
(eldoc-mode-line-string): New variable.
(eldoc-minibuffer-message): New function.
(eldoc-message-function): New variable.
(eldoc-message): Use it.
(eldoc-display-message-p)
(eldoc-display-message-no-interference-p): Support
eldoc-post-insert-mode.

Fixes: debbugs:13978
2013-03-17 23:00:37 +08:00
Michael Heerdegen
587feed443 * lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument):
Use font-lock-keyword-face for macros and special forms.

Fixes: debbugs:8345
2013-02-17 20:30:27 -05:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
91af3942e9 Spelling fixes. 2011-11-14 15:59:56 -08:00
Chong Yidong
ac6c8639bd Fix more minor mode docstrings.
* lisp/emulation/cua-base.el (cua-mode):
* lisp/mail/footnote.el (footnote-mode):
* lisp/mail/mailabbrev.el (mail-abbrevs-mode):
* lisp/net/xesam.el (xesam-minor-mode):
* lisp/progmodes/bug-reference.el (bug-reference-mode):
* lisp/progmodes/cap-words.el (capitalized-words-mode):
* lisp/progmodes/compile.el (compilation-minor-mode)
(compilation-shell-minor-mode):
* lisp/progmodes/gud.el (gud-tooltip-mode):
* lisp/progmodes/hideif.el (hide-ifdef-mode):
* lisp/progmodes/idlw-shell.el (idlwave-shell-electric-debug-mode):
* lisp/progmodes/subword.el (subword-mode):
* lisp/progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode):
* lisp/progmodes/which-func.el (which-function-mode):
* lisp/term/tvi970.el (tvi970-set-keypad-mode):
* lisp/term/vt100.el (vt100-wide-mode):
* lisp/textmodes/flyspell.el (flyspell-mode):
* lisp/textmodes/ispell.el (ispell-minor-mode):
* lisp/textmodes/nroff-mode.el (nroff-electric-mode):
* lisp/textmodes/paragraphs.el (use-hard-newlines):
* lisp/textmodes/refill.el (refill-mode):
* lisp/textmodes/reftex.el (reftex-mode):
* lisp/textmodes/rst.el (rst-minor-mode):
* lisp/textmodes/sgml-mode.el (html-autoview-mode)
(sgml-electric-tag-pair-mode):
* lisp/textmodes/tex-mode.el (latex-electric-env-pair-mode):
* lisp/vc/diff-mode.el (diff-auto-refine-mode, diff-minor-mode):
* lisp/emulation/crisp.el (crisp-mode):
* lisp/emacs-lisp/eldoc.el (eldoc-mode):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode): Doc fixes for new
minor mode behavior.

* lisp/erc/erc-fill.el (erc-fill-mode):
* lisp/erc/erc-track.el (erc-track-minor-mode): Doc fix.

* lisp/erc/erc.el (define-erc-module): Fix autogenerated docstring to
reflect Emacs 24 minor mode changes.

* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
calling a minor mode from Lisp with nil arg enables it, so we have to
make the working a bit ambiguous here).
2011-10-19 20:26:14 -04: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
24f574a964 Fix bug#6265: * eldoc.el: Add completions for new commands left-* and right-*. 2010-06-01 15:47:14 +02:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Dan Nicolaescu
aaa448c984 * widget.el (define-widget): Purecopy the docstring.
* international/mule-cmds.el (charset): Do not purecopy the
docstring here, define-widget does it.

* textmodes/texinfo.el (texinfo-open-quote, texinfo-close-quote):
* textmodes/bibtex-style.el (auto-mode-alist):
* progmodes/inf-lisp.el (inferior-lisp-prompt):
* progmodes/compile.el (compile-command):
* language/korea-util.el (default-korean-keyboard):
* international/mule-conf.el (file-coding-system-alist):
* emacs-lisp/eldoc.el (eldoc-minor-mode-string):
* tooltip.el (tooltip-frame-parameters):
* newcomment.el (comment-end, comment-padding):
* dired.el (dired-trivial-filenames):
* comint.el (comint-file-name-prefix): Purecopy initial values.
2009-11-11 19:24:20 +00:00
Stefan Monnier
8d6c1239cb * help-fns.el (help-function-arglist): Don't check advertised-signature-table.
(describe-function-1): Do it here instead so it also applies to subrs.
* emacs-lisp/eldoc.el (eldoc-get-fnsym-args-string):
Obey advertised-signature-table.
2009-10-02 14:36:54 +00:00
Juanma Barranquero
eec6d5b710 * emacs-lisp/eldoc.el (eldoc-function-argstring-format):
Revert 2007-09-26 change; use `string-match-p' to check for &keywords.
  (eldoc-get-fnsym-args-string, eldoc-highlight-function-argument):
  Use `string-match-p'.
2009-01-24 11:34:57 +00:00
Glenn Morris
fdb0e509dd (eldoc-minor-mode-string, eldoc-message-commands)
(eldoc-print-current-symbol-info): Doc fix (consistent case of "ElDoc").
2009-01-17 20:01:17 +00:00
Glenn Morris
133ea5b2b2 Remove leading `*' from defcustoms.
(eldoc-argument-case, eldoc-echo-area-use-multiline-p)
(eldoc-highlight-function-argument): Doc fix - mention effect of
eldoc-documentation-function.
(eldoc-message-commands-table-size, eldoc-message-commands)
(eldoc-current-idle-delay, eldoc-get-fnsym-args-string): Doc fix.
(eldoc-documentation-function): Mention effect on user options.
2009-01-16 03:24:54 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Martin Rudalics
4d1243c826 (eldoc-docstring-first-line): Don't match
any but the first "*" in a doc-string.
2008-11-28 10:23:21 +00:00
Glenn Morris
d6cba7ae45 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 03:21:21 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
8b72699e88 Add 2008 to copyright years. 2008-01-07 01:14:52 +00:00
Juanma Barranquero
a1a57a4244 (eldoc-message-commands-table-size, eldoc-message-commands,
eldoc-current-idle-delay): Fix typos in docstrings.
2007-09-27 21:39:31 +00:00
Juanma Barranquero
c4e36c26f6 (eldoc-function-argstring-format): Deal with the case that special
&keywords are at the beginning or end of the argument list.
Also add some (incomplete) support for non-standard arglists.
2007-09-26 15:59:13 +00:00