summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Sort out ElDoc backward compatibility of eldoc-documentation-functionJoão Távora2020-07-121-5/+22
| | | | | | | | | | | | | | | | As explained previously, we can't simply make eldoc-documentation-function an variable alias for eldoc-documentation-strategy, because ElDoc is pre-loaded in Emacs < 28, where it holds at least one buffer-local binding. So if eldoc.el is loaded in those versions, we do the variable alias binding in reverse. We do this using a macro eldoc--documentation-strategy-defcustom to at load time in which direction to make the variable alias. * lisp/emacs-lisp/eldoc.el (eldoc--documentation-strategy-defcustom): Helper macro. (eldoc-documentation-strategy, eldoc-documentation-function): Use it. (Version): Bump to 1.5.0
* Fix placement of Eldoc docs during eval-expression (bug#42309)João Távora2020-07-101-36/+40
| | | | * lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): Rework.
* Revert "Fix Eldoc problem when loading on Emacs 26.3"João Távora2020-07-101-4/+1
| | | | | | This reverts commit 9ade7ea7b77ec40c16deb4dff139ce7127a703e2. * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.4.0
* Fix byte compilation warning in EldocJoão Távora2020-07-101-1/+1
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Pass nil as second argument.
* Fix Eldoc problem when loading on Emacs 26.3João Távora2020-07-101-1/+4
| | | | | | | | | | | | | | | | | When defining the obsolete variable alias for old eldoc-documentation-function (which now points to the newer eldoc-documentation-strategy), one gets the error "don't know how to make a localized vareiable an alias". I'm not sure, but I suspect this is because Eldoc is preloaded in Emacs 26.3 and the eldoc-documentation-function variable is already set locally by some Elisp buffer. Uninterning the symbol shortly before defining the alias seems to fix it. * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Unintern on load. (Version): Bump to 1.3.0
* Unbreak M-x eldocJoão Távora2020-07-091-13/+16
| | | | | | | | | The command should always invoke Eldoc when called interactively, instead of going through the usual checks, which are performed to avoid interference with other commands. * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Rework. (Version): Bump to 1.2.0
* Prevent infloop in Eldoc message truncation algorithmJoão Távora2020-07-091-1/+1
| | | | | | | | | The truncation algorithm still has a long way to go for very narrow frame sizes. It should become a generic mechanism that would allows one to truncate a string so that fits in N possibly truncated screen lines of a full-width window. * lisp/emacs-lisp/eldoc.el (eldoc-handle-docs): Tweak
* Improve Eldoc docstringsJoão Távora2020-07-081-31/+87
| | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-strategy): Improve docstring. (eldoc--make-callback): Improve docstring. (eldoc--invoke-strategy): New helper function. (eldoc-print-current-symbol-info): Call eldoc--invoke-strategy. (eldoc-documentation-functions): Improve docstring.
* Change version scheme of two Eldoc obsolete specsJoão Távora2020-07-081-2/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function) (eldoc-message): Obsolete spec uses eldoc-1.1.0.
* Adjust Eldoc documentation after Eli's reviewJoão Távora2020-07-081-95/+106
| | | | | | | | | | | | | | * etc/NEWS (Eldoc): Adjust paragraphs. * lisp/emacs-lisp/eldoc.el (eldoc-prefer-doc-buffer): Adjust docstring. (eldoc--enthusiasm-curbing-timer, eldoc-documentation-strategy) (eldoc-documentation-functions): Adjust docstring. (eldoc--handle-docs): Adjust comments. (eldoc--documentation-compose-1): New helper. (eldoc-documentation-compose) (eldoc-documentation-compose-eagerly): Use it. (eldoc-print-current-symbol-info): Adjust comments.
* Make more parts of Emacs use new Eldoc capabilitiesJoão Távora2020-07-081-34/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Elisp-mode was doing a lot of work that can now be delegated to Eldoc. Flymake uses the new Eldoc functionality, too, installing a global documentation function that may report on diagnostics under point. CEDET's grammar.el was left as the only user of an Eldoc-internal function. That function was moved to grammar.el. That file is still, somewhat reprehensibly, using an internal function of elisp-mode.el, but this was left unchanged. In other situations, eldoc-documentation-functions is used or recommended. The only other places where the obsolete eldoc-documentation-function is still used is in libraries which are presumably meant to remain compatible with previous Emacs versions. * lisp/progmodes/elisp-mode.el (elisp-eldoc-funcall) (elisp-eldoc-var-docstring): New functions. (emacs-lisp-mode): Put two elements in eldoc-documentation-functions. * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Setup new Elisp eldoc-documentation-functions. * lisp/progmodes/flymake.el (flymake-mode): Use flymake-eldoc-function. (flymake-eldoc-function): New function. (Package-Requires): Require eldoc 1.1.0 * lisp/descr-text.el (describe-char-eldoc): Recommend eldoc-documentation-functions. * lisp/progmodes/cfengine.el (cfengine3-documentation-function): Recommend eldoc-documentation-functions * lisp/progmodes/octave.el (inferior-octave-mode): Use eldoc-documentation-functions. * lisp/cedet/semantic/grammar.el (semantic--docstring-format-sym-doc): New function. (semantic-grammar-eldoc-get-macro-docstring): Adjust.
* * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.1.0João Távora2020-07-081-1/+1
|
* New M-x eldoc for on-demand and interactive documentation requestsJoão Távora2020-07-081-0/+3
| | | | | | | | | The function eldoc is just an alias for eldoc-print-current-symbol-info, which is made interactive. * lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Now an interactive function. (eldoc): Alias to eldoc-print-current-symbol-info.
* Better handle asynchronous Eldoc sourcesJoão Távora2020-07-081-86/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backward compatible redesign of significant parts of the eldoc.el library. Previously, Eldoc clients (major/minor modes setting its documentation gathering variables) needed to directly call eldoc-message, an internal function, to display the docstring to the user. When more asynchronous sources are involved, this is hard to do or even breaks down. Now, an Eldoc backend may return any non-nil, non-string value and call a callback afterwards. This restores power to Eldoc over how (and crucially also when) to display the docstrings to the user. Among other things, this fixes so called "doc blinking", or the very short-lived display of a lower priority Eldoc message. This would happen if a particular producer of documentation finishes shortly before a higher priority one, like in the LSP engine Eglot as reported by Andrii Kolomoiets <andreyk.mad@gmail.com> and Dmitry Gutov <dgutov@yandex.ru>. Gathering docstrings is now delegated to the variable eldoc-documentation-strategy, which is the new name for the now-obsolete eldoc-documentation-function, and still accepts the so-called "old protocol". Examples of the new strategies enabled are codified in functions such as eldoc-documentation-enthusiast, eldoc-documentation-compose-eagerly, along with the existing eldoc-documentation-compose and eldoc-documentation-default. The work of displaying and formatting docstrings is shifted almost fully to Eldoc itself and is delegated to the internal function eldoc--handle-docs. Among other improvements, it handles most of eldoc-echo-area-use-multiline-p and outputs documentation to a temporary *eldoc* buffer. The manual and NEWS are updated to mention the new Eldoc features. * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Overhaul docstring. (eldoc-documentation-compose, eldoc-documentation-default): Handle non-nil, non-string values of elements of eldoc-documentation-functions. Use eldoc--handle-multiline. (eldoc-print-current-symbol-info): Honour non-nil, non-string values returned by eldoc-documentation-callback. (eldoc--make-callback): Now also a function. (eldoc-documentation-default, eldoc-documentation-compose): Tweak docstring. (eldoc-documentation-enthusiast, eldoc-documentation-compose-eagerly): New functions. (eldoc-echo-area-use-multiline-p): Add new semantics. (eldoc--handle-docs): Handle some of eldoc-echo-area-use-multiline-p. (eldoc-doc-buffer): New command. (eldoc-prefer-doc-buffer): New defcustom. (eldoc--enthusiasm-curbing-timer): New variable. (eldoc-documentation-strategy): Rename from eldoc-documentation-function. (eldoc--supported-p): Use eldoc-documentation-strategy (eldoc-highlight-function-argument) (eldoc-argument-case, global-eldoc-mode) (turn-on-eldoc-mode): Mention eldoc-documentation-strategy. (eldoc-message-function): Mention eldoc--message. (eldoc-message): Made obsolete. (eldoc--message): New helper. * lisp/hexl.el (hexl-print-current-point-info): Adjust to new eldoc-documentation-functions protocol. * lisp/progmodes/cfengine.el (cfengine3-documentation-function): Adjust to new eldoc-documentation-functions protocol. * lisp/progmodes/elisp-mode.el (elisp-eldoc-documentation-function): Adjust to new eldoc-documentation-functions protocol. * lisp/progmodes/octave.el (octave-eldoc-function): Adjust to new eldoc-documentation-functions protocol. * lisp/progmodes/python.el (python-eldoc-function): Adjust to new eldoc-documentation-functions protocol. (eldoc-print-current-symbol-info): Rework with cl-labels. * doc/emacs/programs.texi (Lisp Doc): Mention eldoc-documentation-strategy. * doc/lispref/modes.texi (Major Mode Conventions): Mention eldoc-documentation-functions. * etc/NEWS: Mention eldoc-documentation-strategy.
* Turn Eldoc, Xref and Project into GNU ELPA :core packagesJoão Távora2020-05-131-0/+5
| | | | | | | | | | | | | | | | The new packages state they require Emacs 26.3 to function, but a small part of project.el breaks this "soft" rule: the two functions requiring fileloop.el are incompatible with Emacs 26.3. * lisp/jsonrpc.el: Tweak comment near Package-Requires. * lisp/emacs-lisp/eldoc.el: Add Version and Package-Requires. * lisp/progmodes/flymake.el: Add comment near Package-Requires. * lisp/progmodes/project.el: Add Version and Package-Requires. * lisp/progmodes/xref.el: Add Version and Package-Requires.
* * lisp/emacs-lisp/eldoc.el: Remove redundant `:group` argumentsStefan Monnier2020-03-121-35/+23
|
* * lisp/emacs-lisp/eldoc.el (eldoc--supported-p): Understand the "old" APIStefan Monnier2020-03-121-1/+10
|
* * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): No nil valueStefan Monnier2020-02-261-12/+7
| | | | | | (eldoc--supported-p): Move after the vars it uses. Simplify. (eldoc-print-current-symbol-info): Revert to previous code which assumed a non-nil value of eldoc-documentation-function.
* Expose ElDoc functions in a hook (Bug#28257)Mark Oteiza2020-02-251-17/+60
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el: Update commentary. (eldoc--eval-expression-setup): Use new hook. (eldoc--supported-p): Accomodate new hook. (eldoc-documentation-functions): New hook. (eldoc-documentation-default, eldoc-documentation-compose): New functions. (eldoc-documentation-function): Use 'eldoc-documentation-default' as new default value. Update documentation and custom attributes. (eldoc-print-current-symbol-info): Accomodate possible null value for 'eldoc-documentation-function'. * etc/NEWS: Mention them. * doc/emacs/programs.texi (Emacs Lisp Documentation Lookup): Mention new hook and changes to 'eldoc-documentation-function'. * lisp/hexl.el (hexl-mode, hexl-revert-buffer-function): * lisp/ielm.el (inferior-emacs-lisp-mode): * lisp/progmodes/cfengine.el (cfengine3-mode): * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): * lisp/progmodes/octave.el (octave-mode): * lisp/progmodes/python.el (python-mode): Use new hook.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Respect global-eldoc-mode in minibuffers (Bug#36886)Noam Postavsky2019-08-201-1/+18
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Accept a BODY parameter. * doc/lispref/modes.texi (Defining Minor Modes): Document new parameter. * etc/NEWS: Announce it. * lisp/simple.el (read--expression): Move eldoc-mode setup to... * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): ... here, new function. (global-eldoc-mode): Add or remove it to eval-expression-minibuffer-setup-hook when enabling or disabling global-eldoc-mode. This enables eldoc in the minibuffer (solving Bug#27202), only when global-eldoc-mode is enabled.
* Remove Maintainer: when it duplicates Author:Paul Eggert2019-05-261-1/+0
| | | | | | | The convention is that a file with Author: but not Maintainer: means the author is a maintainer, which makes it confusing when a file lists the same person as author and maintainer. Avoid the confusion by removing the duplicate Maintainer: line.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-1/+1
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | * lisp/emacs-lisp/eldoc.el: Let the user interrupt the searchStefan Monnier2018-12-041-6/+9
| | | | | | | | (eldoc-print-current-symbol-info): Use while-no-input and non-essential.
* | Optionally add argument description in minor mode DOC (bug#10754)John Shahid2018-07-011-3/+0
|/ | | | | | | | | | | Add a paragraph to minor mode's docstring documenting the mode's ARG usage if the supplied docstring doesn't already contain the word "ARG". * easy-mmode.el (easy-mmode--arg-docstring): New const. (easy-mmode--arg-docstring): New function. (define-minor-mode): Use them. Remove argument documentation from all minor modes.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prevent eldoc from changing the mode lineNick Helm2017-10-211-1/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Don't change the mode line if it is not displayed. (Bug#28697)
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-2/+2
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Simplify eldoc-messageDmitry Gutov2017-08-211-11/+4
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc-message): Simplify. Don't use ARGS because no callers pass them. Discussed in bug#27230.
* ElDoc: add docstrings and minor refactoringCharles A. Roelli2017-07-221-11/+38
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-edit-message-commands): Add docstring. (turn-on-eldoc-mode): Fix capitalization. (eldoc--supported-p): Add docstring. (eldoc-schedule-timer): Add docstring and use 'eldoc--supported-p'. (eldoc-message): Add docstring and make calling convention clearer. (eldoc--message-command-p): (eldoc-pre-command-refresh-echo-area): (eldoc-display-message-p): (eldoc-display-message-no-interference-p): (eldoc-print-current-symbol-info): (eldoc-docstring-format-sym-doc): (eldoc-add-command, eldoc-add-command-completions): (eldoc-remove-command, eldoc-remove-command-completions): Add docstring. (Bug#27230)
* Enable ElDoc messages after the newline commandDmitry Gutov2017-06-061-1/+1
| | | | | * lisp/emacs-lisp/eldoc.el: Add "newline" to the eldoc-add-command-completions call (bug#27228).
* Extract eldoc--supported-pDmitry Gutov2017-05-311-2/+5
| | | | | | * lisp/emacs-lisp/eldoc.el (eldoc--supported-p): New function. (turn-on-eldoc-mode, eldoc-mode): Use it. (http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00865.html)
* Turn global-eldoc-mode into a globalized minor modeDmitry Gutov2017-05-301-20/+9
| | | | | | | * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Turn into globalized mode (bug#19853). (turn-on-eldoc-mode): Make it into a wrapper instead of alias. (eldoc-mode): Only show the message when called interactively.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
| * global-eldoc-mode doc fixLars Ingebrigtsen2016-05-011-2/+10
| | | | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Be more specific about what "applicable" means (bug#23071). (cherry picked from commit 25e95b5dd8cd92e03788e589bf99a4b399f03114)
* | global-eldoc-mode doc fixLars Ingebrigtsen2016-05-011-2/+10
| | | | | | | | | | * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Be more specific about what "applicable" means (bug#23071).
* | Cancel the eldoc timer when switching off eldoc modeLars Ingebrigtsen2016-04-291-1/+4
|/ | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-mode): Cancel the eldoc timer when switching off eldoc mode. It will be restarted again if needed (bug#17582).
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command listMark Oteiza2015-10-171-0/+1
|
* Escape ` and ' in docPaul Eggert2015-09-011-2/+2
| | | | | | | | | Escape apostrophes and grave accents in docstrings if they are are supposed to stand for themselves and are not quotes. Remove apostrophes from docstring examples like ‘'(calendar-nth-named-day -1 0 10 year)’ that confuse source code with data. Do some other minor docstring fixups as well, e.g., insert a missing close quote.
* More-conservative ‘format’ quote restylingPaul Eggert2015-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of restyling curved quotes for every call to ‘format’, create a new function ‘format-message’ that does the restyling, and using the new function instead of ‘format’ only in contexts where this seems appropriate. Problem reported by Dmitry Gutov and Andreas Schwab in: http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00826.html http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00827.html * doc/lispref/commands.texi (Using Interactive): * doc/lispref/control.texi (Signaling Errors, Signaling Errors): * doc/lispref/display.texi (Displaying Messages, Progress): * doc/lispref/elisp.texi: * doc/lispref/help.texi (Keys in Documentation): * doc/lispref/minibuf.texi (Minibuffer Misc): * doc/lispref/strings.texi (Formatting Strings): * etc/NEWS: Document the changes. * lisp/abbrev.el (expand-region-abbrevs): * lisp/apropos.el (apropos-library): * lisp/calc/calc-ext.el (calc-record-message) (calc-user-function-list): * lisp/calc/calc-help.el (calc-describe-key, calc-full-help): * lisp/calc/calc-lang.el (math-read-big-balance): * lisp/calc/calc-store.el (calc-edit-variable): * lisp/calc/calc-units.el (math-build-units-table-buffer): * lisp/calc/calc-yank.el (calc-edit-mode): * lisp/calendar/icalendar.el (icalendar-export-region) (icalendar--add-diary-entry): * lisp/cedet/mode-local.el (mode-local-print-binding) (mode-local-describe-bindings-2): * lisp/cedet/semantic/complete.el (semantic-completion-message): * lisp/cedet/semantic/edit.el (semantic-parse-changes-failed): * lisp/cedet/semantic/wisent/comp.el (wisent-log): * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report): * lisp/descr-text.el (describe-text-properties-1, describe-char): * lisp/dframe.el (dframe-message): * lisp/dired-aux.el (dired-query): * lisp/emacs-lisp/byte-opt.el (byte-compile-log-lap-1): * lisp/emacs-lisp/bytecomp.el (byte-compile-log) (byte-compile-log-file, byte-compile-warn, byte-compile-form): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use) (cconv-analyze-form): * lisp/emacs-lisp/check-declare.el (check-declare-warn): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): * lisp/emacs-lisp/edebug.el (edebug-format): * lisp/emacs-lisp/eieio-core.el (eieio-oref): * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message) (eldoc-message): * lisp/emacs-lisp/elint.el (elint-file, elint-log): * lisp/emacs-lisp/find-func.el (find-function-library): * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/nadvice.el (advice--make-docstring): * lisp/emacs-lisp/package.el (package-compute-transaction) (package-install-button-action, package-delete-button-action) (package-menu--list-to-prompt): * lisp/emacs-lisp/timer.el (timer-event-handler): * lisp/emacs-lisp/warnings.el (lwarn, warn): * lisp/emulation/viper-cmd.el: (viper-toggle-parse-sexp-ignore-comments) (viper-kill-buffer, viper-brac-function): * lisp/emulation/viper-macs.el (viper-record-kbd-macro): * lisp/facemenu.el (facemenu-add-new-face): * lisp/faces.el (face-documentation, read-face-name) (face-read-string, read-face-font, describe-face): * lisp/files.el (find-alternate-file, hack-local-variables) (hack-one-local-variable--obsolete, write-file) (basic-save-buffer, delete-directory): * lisp/format.el (format-write-file, format-find-file) (format-insert-file): * lisp/help-fns.el (help-fns--key-bindings) (help-fns--compiler-macro, help-fns--obsolete) (help-fns--interactive-only, describe-function-1) (describe-variable): * lisp/help.el (describe-mode): * lisp/info-xref.el (info-xref-output): * lisp/info.el (Info-virtual-index-find-node) (Info-virtual-index, info-apropos): * lisp/international/kkc.el (kkc-error): * lisp/international/mule-cmds.el: (select-safe-coding-system-interactively) (select-safe-coding-system, describe-input-method): * lisp/international/mule-conf.el (code-offset): * lisp/international/mule-diag.el (describe-character-set) (list-input-methods-1): * lisp/international/quail.el (quail-error): * lisp/minibuffer.el (minibuffer-message): * lisp/mpc.el (mpc--debug): * lisp/msb.el (msb--choose-menu): * lisp/net/ange-ftp.el (ange-ftp-message): * lisp/net/gnutls.el (gnutls-message-maybe): * lisp/net/newst-backend.el (newsticker--sentinel-work): * lisp/net/newst-treeview.el (newsticker--treeview-load): * lisp/net/nsm.el (nsm-query-user): * lisp/net/rlogin.el (rlogin): * lisp/net/soap-client.el (soap-warning): * lisp/net/tramp.el (tramp-debug-message): * lisp/nxml/nxml-outln.el (nxml-report-outline-error): * lisp/nxml/nxml-parse.el (nxml-parse-error): * lisp/nxml/rng-cmpct.el (rng-c-error): * lisp/nxml/rng-match.el (rng-compile-error): * lisp/nxml/rng-uri.el (rng-uri-error): * lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer): * lisp/org/org-ctags.el: (org-ctags-ask-rebuild-tags-file-then-find-tag): * lisp/proced.el (proced-log): * lisp/progmodes/ebnf2ps.el (ebnf-log): * lisp/progmodes/flymake.el (flymake-log): * lisp/progmodes/vhdl-mode.el (vhdl-warning-when-idle): * lisp/replace.el (occur-1): * lisp/simple.el (execute-extended-command) (undo-outer-limit-truncate, define-alternatives): * lisp/startup.el (command-line): * lisp/subr.el (error, user-error, add-to-list): * lisp/tutorial.el (tutorial--describe-nonstandard-key) (tutorial--find-changed-keys): * src/callint.c (Fcall_interactively): * src/editfns.c (Fmessage, Fmessage_box): Restyle the quotes of format strings intended for use as a diagnostic, when restyling seems appropriate. * lisp/subr.el (format-message): New function. * src/doc.c (Finternal__text_restyle): New function. (syms_of_doc): Define it.
* Make eldoc timer non-repeatableDmitry Gutov2015-07-211-1/+1
| | | | | | * 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.
* * lisp/cedet/semantic/grammar.el: Fix compiler warnings (bug#20505)Stefan Monnier2015-05-051-1/+26
| | | | | | | | | | | | | | | | | | | | | (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.
* eldoc: modify `eldoc-documentation-function' using `add-function'Michal Nazarewicz2015-01-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Change default.Stefan Monnier2014-12-101-7/+9
| | | | (eldoc-mode, eldoc-schedule-timer): Adjust to new default.
* * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Enable by default.Stefan Monnier2014-10-151-9/+8
| | | | | | | 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.