X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/20aa42e8204f8f0139ba3880cb32ddf88acc9bf4..85b3eca57a5ae5335c11b157bb481cf8f7a35684:/lisp/emacs-lisp/eldoc.el diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index bbc8e153f7..6c2f869f26 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -1,6 +1,6 @@ ;;; eldoc.el --- Show function arglist or variable docstring in echo area -*- lexical-binding:t; -*- -;; Copyright (C) 1996-2015 Free Software Foundation, Inc. +;; Copyright (C) 1996-2016 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: friedman@splode.com @@ -197,12 +197,23 @@ expression point is on." (t (kill-local-variable 'eldoc-message-commands) (remove-hook 'post-command-hook 'eldoc-schedule-timer t) - (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)))) + (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t) + (when eldoc-timer + (cancel-timer eldoc-timer) + (setq eldoc-timer nil))))) ;;;###autoload (define-minor-mode global-eldoc-mode - "Enable `eldoc-mode' in all buffers where it's applicable." - :group 'eldoc :global t + "Toggle Global Eldoc mode on or off. +With a prefix argument ARG, enable Global Eldoc mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’. + +If Global Eldoc mode is on, `eldoc-mode' will be enabled in all +buffers where it's applicable. These are buffers that have modes +that have enabled eldoc support. See `eldoc-documentation-function'." + :group 'eldoc + :global t :initialize 'custom-initialize-delay :init-value t (setq eldoc-last-message nil)