From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 02:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 28257@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15038862757184 (code B ref -1); Mon, 28 Aug 2017 02:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Aug 2017 02:11:15 +0000 Received: from localhost ([127.0.0.1]:58466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm9WF-0001rn-18 for submit@debbugs.gnu.org; Sun, 27 Aug 2017 22:11:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm9WC-0001rY-VE for submit@debbugs.gnu.org; Sun, 27 Aug 2017 22:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dm9W6-0008KC-7u for submit@debbugs.gnu.org; Sun, 27 Aug 2017 22:11:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dm9W6-0008K6-5R for submit@debbugs.gnu.org; Sun, 27 Aug 2017 22:11:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm9W4-0005Em-1Y for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2017 22:11:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dm9W0-0008Ht-Q0 for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2017 22:11:03 -0400 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:35423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dm9W0-0008Hg-Hc for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2017 22:11:00 -0400 Received: by mail-qt0-x22e.google.com with SMTP id x36so19474185qtx.2 for ; Sun, 27 Aug 2017 19:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZA/E9DH83sotjzdc02L5CF25MvWi+A5YLY13YIYV8z4=; b=Qp29h68PO9RDFC1k6tcqq3hKPsIvL/dRZU5kfGl8yKBotL8V9qF2xd5lTepJt/YC+O b9tauFygvsmbN7Fi4B9noxOCFY/gluwhq6+J2VyJ+PIeRjZQ0J41I71+A4/eupEOOhYq 8JbP1sBrIcxKnwac8TjyfaPNcs4BtY+opsshQCleZmyzqy4HE7cr4jaezGX2on+tTk2s Mn+OyoIx/iuv1j7LCXR96ITjV5DCuypVtxfTubjqmXc7UuQ54txWbVcVUX2KZZH76TEL tVWBcpzM7M83WMMFZ70d73xXHWXTDYci835NlkgdqWkAEWeRmElDY303dAaw+k9Mc/CS n1VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZA/E9DH83sotjzdc02L5CF25MvWi+A5YLY13YIYV8z4=; b=hxgv75ITOfLZAFv54GOV9RddfZIzXf1DIDenP/+e6opraejzndiBudCy7l7ZGZ8H1m 2rmx2JeSsjrnDIzEponMipjZnKtKi8DxXm5DC25q+MzOhm7hX2jDHgLJlV4iLKzwKm7C umcc0MG+dY/5WikCUReNkoPW+Lli1opEsnC7STH58AdyIKfyrDFXyJDcex6sW7BJoKl0 FiL1h7VwX7e82OcfShVwVZLOBDFQfI2wA+glEX4s15aRo4SmCqkT/iyk6sPm8Dhq6IXb xzeTRpUzKuY/j03IBzMgn1qAfOoV/iq51Bxb+2ioiY6UAco9efNqTxAZERsosb+mUqVw VZFQ== X-Gm-Message-State: AHYfb5jW+Nqwvl7ruqrnpNt+Uq7Mk1RY2O2pqmB8tg7K4ZGkLNCekUKk rcRI2hrbjGAVzaaPT/3Rmw== X-Received: by 10.200.48.71 with SMTP id g7mr732699qte.225.1503886259526; Sun, 27 Aug 2017 19:10:59 -0700 (PDT) Received: from holos.localdomain (pool-173-64-88-95.bltmmd.fios.verizon.net. [173.64.88.95]) by smtp.gmail.com with ESMTPSA id m59sm7908593qte.15.2017.08.27.19.10.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Aug 2017 19:10:58 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id D112A6B4DD; Sun, 27 Aug 2017 22:10:57 -0400 (EDT) From: Mark Oteiza Date: Sun, 27 Aug 2017 22:10:57 -0400 Message-ID: <87ziakwifi.fsf@holos> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Hi, This makes it possible to use the results from multiple eldoc functions at once, through the addition of an abnormal hook. I'm not aware of a good way to access the default value (or other local values) of eldoc-documentation-function when shadowed by a :before-until advice returning non-nil. Perhaps eldoc-documentation-function should remain a defvar, not sure. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 27ac0eb640..ea7f2f3d26 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1279,9 +1279,27 @@ Lisp Doc for a function, it shows the argument list, and for a variable it shows the first line of the variable's documentation string. To toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global -Eldoc mode, which is turned on by default, and affects buffers, such -as @samp{*scratch*}, whose major mode is Emacs Lisp or Lisp -Interaction (@w{@kbd{M-x global-eldoc-mode}} to turn it off globally). +Eldoc mode, which is turned on by default, and affects buffers whose +major mode sets the variables described below. Use @w{@kbd{M-x +global-eldoc-mode}} to turn it off globally. + +@vindex eldoc-documentation-function +@vindex eldoc-documentation-functions + These variables can be used to configure ElDoc mode: + +@table @code +@item eldoc-documentation-function +This variable holds the function which is used to retrieve +documentation for the item at point from the functions in the hook +@code{eldoc-documentation-functions}. By default, +@code{eldoc-documentation-function} returns the first documentation +string produced by the @code{eldoc-documentation-functions} hook. + +@item eldoc-documentation-functions +This abnormal hook holds documentation functions. It acts as a +collection of backends for ElDoc. This is what modes should use to +register their documentation functions with ElDoc. +@end table =20 @node Hideshow @section Hideshow minor mode diff --git a/etc/NEWS b/etc/NEWS index 3f38153048..b2dc06b137 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -791,6 +791,15 @@ breakpoint (e.g. with "f" and "o") by customizing the = new option This allows to enlarge the maximum recursion depth when instrumenting code. =20 +** ElDoc + +*** New hook 'eldoc-documentation-functions' to be used for registering +doc string functions. This makes the results of all doc string +functions accessible to the user through the existing single function hook +'eldoc-documentation-function'. + +*** 'eldoc-documentation-function' is now a custom variable. + ** Eshell =20 *** 'eshell-input-filter's value is now a named function diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index bca40ab87d..7d0ff0f359 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -41,9 +41,9 @@ ;; (add-hook 'ielm-mode-hook 'eldoc-mode) ;; (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode) =20 -;; Major modes for other languages may use ElDoc by defining an -;; appropriate function as the buffer-local value of -;; `eldoc-documentation-function'. +;; Major modes for other languages may use ElDoc by adding an +;; appropriate function to the buffer-local value of +;; `eldoc-documentation-functions'. =20 ;;; Code: =20 @@ -222,7 +222,11 @@ turn-on-eldoc-mode =20 (defun eldoc--supported-p () "Non-nil if an ElDoc function is set for this buffer." - (not (memq eldoc-documentation-function '(nil ignore)))) + (let ((hook 'eldoc-documentation-functions)) + (and eldoc-documentation-function + (or (and (local-variable-p hook) + (buffer-local-value hook (current-buffer))) + (default-value hook))))) =20 (defun eldoc-schedule-timer () @@ -341,7 +345,47 @@ eldoc-display-message-no-interference-p =20 ;;;###autoload -(defvar eldoc-documentation-function #'ignore +(defvar eldoc-documentation-functions nil + "Hook for functions to call to return doc string. +Each function should accept no arguments and return a one-line +string for displaying doc about a function etc. appropriate to +the context around point. It should return nil if there's no doc +appropriate for the context. Typically doc is returned if point +is on a function-like name or in its arg list. + +Major modes should modify this hook locally, for example: + (add-hook \\=3D'eldoc-documentation-functions #\\=3D'foo-mode-eldoc nil = t) +so that the global value (i.e. the default value of the hook) is +taken into account if the major mode specific function does not +return any documentation.") + +(defun eldoc-documentation-default () + "Show doc string for item at point. +Default value for `eldoc-documentation-function'." + (let ((res (run-hook-with-args-until-success 'eldoc-documentation-functi= ons))) + (when res + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +(defun eldoc-documentation-compose () + "Show multiple doc string results at once. +Meant as a value for `eldoc-documentation-function'." + (let (res) + (run-hook-wrapped + 'eldoc-documentation-functions + (lambda (f) + (let ((str (funcall f))) + (when str (push str res)) + nil))) + (when res + (setq res (mapconcat #'identity (nreverse res) ", ")) + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +;;;###autoload +(defcustom eldoc-documentation-function #'eldoc-documentation-default "Function to call to return doc string. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. @@ -352,14 +396,12 @@ eldoc-documentation-function The result is used as is, so the function must explicitly handle the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p', and the face `eldoc-highlight-function-argument', if they are to have any -effect. - -Major modes should modify this variable using `add-function', for example: - (add-function :before-until (local \\=3D'eldoc-documentation-function) - #\\=3D'foo-mode-eldoc-function) -so that the global documentation function (i.e. the default value of the -variable) is taken into account if the major mode specific function does n= ot -return any documentation.") +effect." + :link '(info-link "(emacs) Lisp Doc") + :type '(radio (function-item eldoc-documentation-default) + (function-item eldoc-documentation-compose) + (function :tag "Other function")) + :group 'eldoc) =20 (defun eldoc-print-current-symbol-info () "Print the text produced by `eldoc-documentation-function'." @@ -371,7 +413,8 @@ eldoc-print-current-symbol-info (when eldoc-last-message (eldoc-message nil) nil)) - (eldoc-message (funcall eldoc-documentation-function))))) + (let ((fun eldoc-documentation-function)) + (when fun (eldoc-message (funcall fun))))))) =20 ;; If the entire line cannot fit in the echo area, the symbol name may be ;; truncated or eliminated entirely from the output to make room for the diff --git a/lisp/hexl.el b/lisp/hexl.el index 0a598b22f6..e1c5386c1a 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -395,8 +395,8 @@ hexl-mode (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) =20 ;; Set a callback function for eldoc. - (add-function :before-until (local 'eldoc-documentation-function) - #'hexl-print-current-point-info) + (add-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info nil t) (eldoc-add-command-completions "hexl-") (eldoc-remove-command "hexl-save-buffer" "hexl-current-address") @@ -506,6 +506,8 @@ hexl-mode-exit =20 (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t) (remove-hook 'post-command-hook 'hexl-follow-ascii-find t) + (remove-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info t) (setq hexl-ascii-overlay nil) =20 (let ((mms ())) diff --git a/lisp/ielm.el b/lisp/ielm.el index 42b065fe62..3e8b8198f5 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -541,8 +541,8 @@ inferior-emacs-lisp-mode (set (make-local-variable 'completion-at-point-functions) '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-onl= y) (setq comint-get-old-input 'ielm-get-old-input) diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 5bc7b66063..c775a18220 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1390,12 +1390,15 @@ cfengine3-mode (when buffer-file-name (shell-quote-argument buffer-file-name))))) =20 - ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to - ;; nil. - (or eldoc-documentation-function - (setq-local eldoc-documentation-function #'ignore)) - (add-function :before-until (local 'eldoc-documentation-function) - #'cfengine3-documentation-function) + (if (> emacs-major-version 25) + (add-hook 'eldoc-documentation-functions + #'cfengine3-documentation-function nil t) + ;; For emacs < 25.1 where `eldoc-documentation-function' defaults + ;; to nil. + (or eldoc-documentation-function + (setq-local eldoc-documentation-function #'ignore)) + (add-function :before-until (local 'eldoc-documentation-function) + #'cfengine3-documentation-function)) =20 (add-hook 'completion-at-point-functions #'cfengine3-completion-function nil t) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index b3f452ca5b..07210381f3 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -235,8 +235,8 @@ emacs-lisp-mode (append '((?\` . ?\') (?=E2=80=98 . ?=E2=80=99)) electric-pa= ir-text-pairs)) (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index ac9ba630c4..5843361dbd 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -596,8 +596,7 @@ octave-mode (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) (setq-local beginning-of-defun-function 'octave-beginning-of-defun) (and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment)) - (add-function :before-until (local 'eldoc-documentation-function) - 'octave-eldoc-function) + (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t) =20 (easy-menu-add octave-mode-menu)) =20 diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 6f169123b9..8b4cfaa77a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5198,8 +5198,10 @@ python-mode ;; Emacs<25 (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) - (add-function :before-until (local 'eldoc-documentation-function) - #'python-eldoc-function)) + (if (< emacs-major-version 26) + (add-function :before-until (local 'eldoc-documentation-function) + #'python-eldoc-function) + (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil= t))) =20 (add-to-list 'hs-special-modes-alist diff --git a/lisp/simple.el b/lisp/simple.el index 58f8372192..f56a505523 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1490,8 +1490,8 @@ read--expression (minibuffer-with-setup-hook (lambda () ;; FIXME: call emacs-lisp-mode? - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (eldoc-mode 1) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 02:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.150388845410441 (code B ref 28257); Mon, 28 Aug 2017 02:48:01 +0000 Received: (at 28257) by debbugs.gnu.org; 28 Aug 2017 02:47:34 +0000 Received: from localhost ([127.0.0.1]:58500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmA5O-0002iK-IH for submit@debbugs.gnu.org; Sun, 27 Aug 2017 22:47:34 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:33217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmA5M-0002i8-VZ for 28257@debbugs.gnu.org; Sun, 27 Aug 2017 22:47:33 -0400 Received: by mail-it0-f67.google.com with SMTP id 77so3412618itj.0 for <28257@debbugs.gnu.org>; Sun, 27 Aug 2017 19:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=McwbDTqCLQSI4sKXECRFOov5Mk+uwnvKqck9wIQUZiU=; b=e0kVA0vWM5d6d0YNMZXIVzBHmP2CLzt9DgznnblNzJqfvKL0oyEln+ZTou9r8MibNE crmyUU7MNzH03+VgZlTtv/g/MVYtQDOiPW7/MiMByvUeED8S5jypeU7oiORoa3bUK2Ar BnfXKMBoLjKWBYKezg41oc9JLA9GCMw7LOHq97X6Teau9IdjwiKOPanW3PRqOtJEZtcc KKDTegGg44+Gvceg88RzbibI/GIxTJyeR9KBAaS8ZbcAn13TSIUgM/yLw74DTQ0JEInj Ly+60BoASeLIcY7kDs8K7nT2N2VUYcJ75F2JpzYSiaK85py0pRMX1FfDrdI2iLSZNvB7 ksfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=McwbDTqCLQSI4sKXECRFOov5Mk+uwnvKqck9wIQUZiU=; b=Xy9rVrh9NROqnQP7XAIK5potnOhEFAC68MyVX0H0Gm0S82vywBKCbEeuvtz/Jww6sA SCepyLyy2yjQFmLlWT6YF8nrROqOa3VwsqWX9bP3GT9WcEP4uXwG/TtAtPDtbThGocjG JjRJ8guEAFScR1pO/FZt86N7uEsL9BH2y+4GiVS+O/IzjtrngFivqOu+OTV2z0kGimLh 0/D8htFLMIdreMY29kUGYEe1zX/72tI+06/AovrIyk7RQYVz+NoNmjvFsi2lzsjKbbbI ivrGjkIG6TxQrWBG92zrGmZdZdormzO4jc2jskGbJRjmwSm8MaUYOKGKev1xE3eAgw47 O10A== X-Gm-Message-State: AHYfb5iVcmj+jPMr+MD27jjHbxHAE9AbVZD5+C+QwIfcp94cuevkSzUL rExYnnEFqvEvnTAC X-Received: by 10.36.34.80 with SMTP id o77mr5760547ito.121.1503888447181; Sun, 27 Aug 2017 19:47:27 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id i129sm985735iti.0.2017.08.27.19.47.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Aug 2017 19:47:26 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87ziakwifi.fsf@holos> Date: Sun, 27 Aug 2017 22:49:06 -0400 In-Reply-To: <87ziakwifi.fsf@holos> (Mark Oteiza's message of "Sun, 27 Aug 2017 22:10:57 -0400") Message-ID: <87val88l0d.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Mark Oteiza writes: > This makes it possible to use the results from multiple eldoc functions > at once, through the addition of an abnormal hook. Last time this came up, there were some objections[1]. I'm not sure what exactly what you mean by "use the results from multiple eldoc functions". Is that something not possible currently? [1]: http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00291.html > I'm not aware of a good way to access the default value (or other local > values) of eldoc-documentation-function when shadowed by a :before-until > advice returning non-nil. Doesn't (default-value 'eldoc-documentation-function) work? Note also that (cl-prin1 eldoc-documentation-function) will print out a representation of all the added functions. It uses some "internal" advice--* functions, perhaps they should be "externalized"? From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 03:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.150388987212661 (code B ref 28257); Mon, 28 Aug 2017 03:12:02 +0000 Received: (at 28257) by debbugs.gnu.org; 28 Aug 2017 03:11:12 +0000 Received: from localhost ([127.0.0.1]:58529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmASG-0003I9-HX for submit@debbugs.gnu.org; Sun, 27 Aug 2017 23:11:12 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:37111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmASF-0003Hx-5N for 28257@debbugs.gnu.org; Sun, 27 Aug 2017 23:11:11 -0400 Received: by mail-qk0-f194.google.com with SMTP id o184so4288021qkc.4 for <28257@debbugs.gnu.org>; Sun, 27 Aug 2017 20:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SEfm5XZPcxrU3a86itmhxNE+fBBbVwmrm+PtBfA33r8=; b=KlwTxQ1kTIj4+4/V8Fckq4xIXvgdLDX9Dpq+pbPmb/6AfOEwXdot0FeEvKQAG3tDIi MVIwDZQUxFCgjvtzGMiScwY8TDWMoK+/HJhUi0Kpc6H+Dkz+y7lS5mFintPMgUjt64da 5eER0Vfj+D0heeBikonbpA41jDqdDVkDxQRjd09DwYftvghoanw/mdXtYup7ls07TGyX hRo8k+pvO2NjUWBKQIgTFIcyK332czGzkDLd160qQICFr3d9Pu3pTkx2Zv4dqVXUg5TZ ghRbF72uJXE4u7q7GzC2Nciy82O1boBrJEBEbI9rqb/rEGAA1fDoxTGc0lPbNKINbrCy XIFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SEfm5XZPcxrU3a86itmhxNE+fBBbVwmrm+PtBfA33r8=; b=kg5v5o6h91LZPbTEo8gFrZHOhF5F65T/xnmyZu+mzQb0r9sfG3L0nPgZBw7fi5tUJB ZrF4kI9p0Ze10BblqB2vQTLJNn/cdMbI1FtKfDoPA5H0xJvqs7axH+A677TNGL8qVvBw ZHrrcO12qJOv0SakBTOaMHKFoGEKG+qyvJL8mubeBrzuniJ+GzuMY2ggcSUXxRdimD6m kSPAIybUh4gk1L+9YLTVMGEq12lwjamUo3CR8I3eWEiq+kET5iC1Yh+0P8PsgZXKjodC NoMs1xDk1m2vFRmdmqMR5yfgL+oN3WevB325QiWTljS6njE7TIH1Zrq/rnfIIp6oKcId v6sQ== X-Gm-Message-State: AHYfb5g3dy0plKSSSCcxlhzd6aRsNhYNPeccEiy/yhpWE0eztkwj1TR6 Zp49yTNwhYTPw4AJCTbmRQ== X-Received: by 10.55.92.199 with SMTP id q190mr8245094qkb.127.1503889865487; Sun, 27 Aug 2017 20:11:05 -0700 (PDT) Received: from holos.localdomain (pool-173-64-88-95.bltmmd.fios.verizon.net. [173.64.88.95]) by smtp.gmail.com with ESMTPSA id p42sm8698799qtc.56.2017.08.27.20.11.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Aug 2017 20:11:04 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 16BEC6B4DD; Sun, 27 Aug 2017 23:11:04 -0400 (EDT) Date: Sun, 27 Aug 2017 23:11:04 -0400 From: Mark Oteiza Message-ID: <20170828031104.GA15524@holos.localdomain> References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <87val88l0d.fsf@users.sourceforge.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 27/08/17 at 10:49pm, npostavs@users.sourceforge.net wrote: >Mark Oteiza writes: > >> This makes it possible to use the results from multiple eldoc functions >> at once, through the addition of an abnormal hook. > > I'm not sure >what exactly what you mean by "use the results from multiple eldoc >functions". Is that something not possible currently? If both the buffer mode's documentation function and the function in the default-value return non-nil at a point, execution stops at the :before-until function, analogous to run-hook-with-args-until-success. I want to see both results. See what eldoc-documentation-compose does. >> I'm not aware of a good way to access the default value (or other local >> values) of eldoc-documentation-function when shadowed by a :before-until >> advice returning non-nil. > >Doesn't (default-value 'eldoc-documentation-function) work? FSVO "work". To do what is described above, not only does one have to write some wrapper function to advise eldoc-documentation-function buffer-locally, but also one has to hook into any/every mode that might add its own doc function. From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2017 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.150396861811547 (code B ref 28257); Tue, 29 Aug 2017 01:04:02 +0000 Received: (at 28257) by debbugs.gnu.org; 29 Aug 2017 01:03:38 +0000 Received: from localhost ([127.0.0.1]:59844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmUwM-00030A-Ac for submit@debbugs.gnu.org; Mon, 28 Aug 2017 21:03:38 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:36676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmUwK-0002zy-OG for 28257@debbugs.gnu.org; Mon, 28 Aug 2017 21:03:37 -0400 Received: by mail-io0-f181.google.com with SMTP id g33so6426036ioj.3 for <28257@debbugs.gnu.org>; Mon, 28 Aug 2017 18:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iQVRdOhDK+zWvh6v2NYdJN29YpKU7Icu5b2lkzWkYhU=; b=MY8CXzN4LnYun27UHzurf48/V4R1+AIoloUZ2vOPu1IUJI9Fd+mjT8fOmzxoHovGEs sRAHwVpLLfu+oW1iTnolbdwCyy/hGabdU3Zt7zt/09f0RXpbDlSElEQEjU6Z4Ni6+qSs VekvZXmRJglSsUsyfIMBZFZLnoxt984KjPeXUnsgeJ+uJFarqqg21hIBiTTB0s3uBbUs ko+SHoT0gPfmEQCRgoQu6bwrLGzOMJh0N42q6JLXn5Ti33V9yyIpeA9pkAev+Ak9uBfj QoboBZC0YO1D+k1R+ri+dJKmlbwpwmzwZJvwI+xb/HEWoQUu/BTkzA+7VQ+YcVuXgBki pb+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=iQVRdOhDK+zWvh6v2NYdJN29YpKU7Icu5b2lkzWkYhU=; b=ardtZ9fMUQE0oHPkY+fSDW8lCmLC9pddMHMBCgzQDQNBJBdDKzj1pHGr6n052MmksP cijxRDM4mlOCFb/z9wldEGt2yixMAfFyJJ1rJ8L2rLtdaUaN5CQGdQjv7/WXNs/2xHkx EzTmnHzo68OLEcl8wlzAuLaFZz9fQ3WJ1q/vZgMmPwbXEk7Bx0y753C+Utu+t7ev+rRZ QBfc9xeRI0MvRk427ypCv5vAAeyHJfXyewUGOQ8Tg+xXTQDb80+laPYuWGc91suc8hHf VDuaDtHQkEmoHPPg31SHhHs88rON8Om0Yq4b3QyYpTo1GvgWlQynEtoI9q5oeU5beNj6 FbTA== X-Gm-Message-State: AHYfb5i5Yw4Zw+Pz/nCzGogRu0ZHEwnwMRpoivtKUlgBuim8M/gsoKwk dWbj7Sj/prNHOplK X-Received: by 10.36.117.146 with SMTP id y140mr545232itc.127.1503968610690; Mon, 28 Aug 2017 18:03:30 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id s141sm291346ita.1.2017.08.28.18.03.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 18:03:29 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> Date: Mon, 28 Aug 2017 21:05:10 -0400 In-Reply-To: <20170828031104.GA15524@holos.localdomain> (Mark Oteiza's message of "Sun, 27 Aug 2017 23:11:04 -0400") Message-ID: <87shgb89q1.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Mark Oteiza writes: > If both the buffer mode's documentation function and the function in the > default-value return non-nil at a point, execution stops at the > :before-until function, analogous to run-hook-with-args-until-success. > > I want to see both results. See what eldoc-documentation-compose does. > > To do what is described above, not only does one have to write some > wrapper function to advise eldoc-documentation-function buffer-locally, > but also one has to hook into any/every mode that might add its own doc > function. Ah, I think I understand now. The patch makes it easier to customize the composition of all eldoc-documentation-functions at the cost of making it more difficult for the individual mode to decide how its own doc function will compose. Could be a worthwhile tradeoff (especially since there currently aren't any individual mode eldoc functions using anything apart from :before-until, afaik); I'm on the fence about this. From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Aug 2017 01:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.150405782611152 (code B ref 28257); Wed, 30 Aug 2017 01:51:01 +0000 Received: (at 28257) by debbugs.gnu.org; 30 Aug 2017 01:50:26 +0000 Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dms9B-0002to-Tm for submit@debbugs.gnu.org; Tue, 29 Aug 2017 21:50:26 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:36157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dms9A-0002tc-Kt for 28257@debbugs.gnu.org; Tue, 29 Aug 2017 21:50:25 -0400 Received: by mail-qk0-f193.google.com with SMTP id l65so4304739qkc.3 for <28257@debbugs.gnu.org>; Tue, 29 Aug 2017 18:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kJ7bX9fn/FTDVlV7WwrGlgnbwo7G3Hhcg/2PYvCpFS4=; b=vJL7OrtD5Nuh/qKz6JQV697fRgp4JW3sllvTeqYxPrf3WqpDzh2WTuev/cy5wg79uS Gdtxa2jkrZ55ediXn/fQuXnFNJlH57yPxiX22NMn5U6t81XEh4cRzLmQjfG3RAOHhmSE KU+lA6T74E4WhfMWdUf/q5O8EACQiZvI9aVp2J/vL11V526g4sNCGfM4ReC+OjN472+c YuyiZJ8BitfZ/UkyKTgzm9H13NiLY+Hki91MtqGaV0ztVPYMFKy84Mu0X0JSQpcv/uVO A5hEvlN1E6tDsEQTsA/Ha5gKjPJG0XTSY2CB/tMwGeEV916fKqiUTPZ1esby64NRYEwH bCpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kJ7bX9fn/FTDVlV7WwrGlgnbwo7G3Hhcg/2PYvCpFS4=; b=C3aXyVLG4Ol8FUb1Qrfxx7WaHbyhbmzHj00mZmbCCZnMw+MurANeh9tPgiE32QTRiP 0bKTV6bGBKs8IeXco04W5v7fqBRIukFRzIv/8FaSbCaq509U3wM3z9PGA4D/FK6Jc4/H 6Yzh2lfF/gPtu6kKQVDYu7MviWtSwLZIDG2marPbPkO4iUnlbcnmdSX4b9qzGJ3c/uyC 7H8bOejqgj/g5yvDsgn9nEIGf6GQPXfXGafKQet86boi2krt7CipfqPUwkmJNGLarlIi mPdgKhyxiTNfgB/FpRNKn9oHoMHyehSv0UJ6behLC0BpJD9UdkHdZl31uHBlXFngBI2G VGFw== X-Gm-Message-State: AHYfb5g26Q3yor9d52ERzjXJyLOal6hJvEyP4rD1h/6VvghJ9Nss3TF0 AH4JRJIzK7e7PqijkYywQw== X-Received: by 10.55.96.6 with SMTP id u6mr8044586qkb.106.1504057818832; Tue, 29 Aug 2017 18:50:18 -0700 (PDT) Received: from holos.localdomain (pool-173-64-88-95.bltmmd.fios.verizon.net. [173.64.88.95]) by smtp.gmail.com with ESMTPSA id c13sm2908743qkj.73.2017.08.29.18.50.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Aug 2017 18:50:18 -0700 (PDT) Received: by holos.localdomain (Postfix, from userid 1000) id 8C73F68E72; Tue, 29 Aug 2017 21:50:17 -0400 (EDT) Date: Tue, 29 Aug 2017 21:50:17 -0400 From: Mark Oteiza Message-ID: <20170830015017.GA28668@holos.localdomain> References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <87shgb89q1.fsf@users.sourceforge.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 28/08/17 at 09:05pm, npostavs@users.sourceforge.net wrote: >Mark Oteiza writes: > >> If both the buffer mode's documentation function and the function in the >> default-value return non-nil at a point, execution stops at the >> :before-until function, analogous to run-hook-with-args-until-success. >> >> I want to see both results. See what eldoc-documentation-compose does. >> >> To do what is described above, not only does one have to write some >> wrapper function to advise eldoc-documentation-function buffer-locally, >> but also one has to hook into any/every mode that might add its own doc >> function. > >Ah, I think I understand now. The patch makes it easier to customize >the composition of all eldoc-documentation-functions at the cost of >making it more difficult for the individual mode to decide how its own >doc function will compose. Correct. > Could be a worthwhile tradeoff (especially >since there currently aren't any individual mode eldoc functions using >anything apart from :before-until, afaik); I'm on the fence about this. Not in emacs, at least. In elpa, ggtags uses :after-until. The only 3rd party packages--that I can think of right now--that implement eldoc functions just use setq-local (elpy and geiser). From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: 28257@debbugs.gnu.org, npostavs@users.sourceforge.net Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.156139299021237 (code B ref 28257); Mon, 24 Jun 2019 16:17:02 +0000 Received: (at 28257) by debbugs.gnu.org; 24 Jun 2019 16:16:30 +0000 Received: from localhost ([127.0.0.1]:57747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfRdt-0005WD-Mq for submit@debbugs.gnu.org; Mon, 24 Jun 2019 12:16:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:32900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfRdr-0005TE-2u for 28257@debbugs.gnu.org; Mon, 24 Jun 2019 12:16:27 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfRdn-0005DD-6j; Mon, 24 Jun 2019 18:16:25 +0200 From: Lars Ingebrigtsen References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> Date: Mon, 24 Jun 2019 18:16:23 +0200 In-Reply-To: <20170830015017.GA28668@holos.localdomain> (Mark Oteiza's message of "Tue, 29 Aug 2017 21:50:17 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mark Oteiza writes: >> Could be a worthwhile tradeoff (especially >>since there currently aren't any individual mode eldoc functions using >>anything apart from :before-until, afaik); I'm on the fence about this. > > Not [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mark Oteiza writes: >> Could be a worthwhile tradeoff (especially >>since there currently aren't any individual mode eldoc functions using >>anything apart from :before-until, afaik); I'm on the fence about this. > > Not in emacs, at least. In elpa, ggtags uses :after-until. The only > 3rd party packages--that I can think of right now--that implement eldoc > functions just use setq-local (elpy and geiser). Noam, still on the fence? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: Mark Oteiza , npostavs@users.sourceforge.net, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15614167024006 (code B ref 28257); Mon, 24 Jun 2019 22:52:02 +0000 Received: (at 28257) by debbugs.gnu.org; 24 Jun 2019 22:51:42 +0000 Received: from localhost ([127.0.0.1]:58264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXoL-00012X-RB for submit@debbugs.gnu.org; Mon, 24 Jun 2019 18:51:42 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:42571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXoK-00012G-El for 28257@debbugs.gnu.org; Mon, 24 Jun 2019 18:51:40 -0400 Received: by mail-io1-f68.google.com with SMTP id u19so369507ior.9 for <28257@debbugs.gnu.org>; Mon, 24 Jun 2019 15:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=DTROWRcK5etCrfxs2lPBBfabOk41yReYJk2QAKZKal4=; b=lgtX+qnKqcuqVjqNyrzkcEZyCZgjvYM2Tt226a17nvFsFPNGT00FhhfyptSGWm0qsW 4WJR2b+iO41a/t1UYTt3KFiDkzpreIPI+R4Jh8DEZNGSF+lk8D+5Jr6vSiMqsTW6Ieqs AZlbimLaitkqWPASWbJKaKDgY/v6sPm0igLSpgGijEWASAHHAnn5GSDyB6/F3b1Yo/m5 JhriECFAU8TIXN5kkB4IhzbKl+yr//1P2Fstm7Jdh7RvraRUR+qfgkn2jBHf63DwRS9h uMCrdf17k/rowRyw6NrlOzTkUD/oWk3Y6cvzEjKOh7RA1pW+WFmu12dHdZxKNEfkNFCa 8cHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=DTROWRcK5etCrfxs2lPBBfabOk41yReYJk2QAKZKal4=; b=Sff4NYxJKrG1S3/PIFfdLOZenA9hV+CEhdtl2FdVk/6gb7C7ujXJAx3tqo3AjbxBEX 4F/ki3i4Godp1aVF+w815LIWxB9C2AAg26zhon7hz+ptldONFlowb9iKw25GlI8Xkcd1 KABhVClrqoGFQ3dVKYT7aZV5TfpRAM54xG3NxjyxIb9HAm1C7YxF+j1O0+kKX2lKJRBW YCdmqW7LCTVAz8jlcPbIyw4fDMyOtcqQFztIpsazmjrQtwQZ4ZfnOo2pC1qPRJ1/oo9b f1aGEm7eJfiPO4fBHDVgo8bfuP5mu3GXYYKBMUgmzVPS7/IXZR69U4tiysNHo5NDmt/X 7VlA== X-Gm-Message-State: APjAAAUSEG2V1JvkQZr9T85VqAbu2okcqBYzr24gOWb6jyJ8izUyPMyY LsZzXm6gqNz56MIKa2yCQWo= X-Google-Smtp-Source: APXvYqx9pucAuFu1aXSXjvlW2ehWbf/CZOCsrKTXhv8Cwp9DliVFJwISP/qHcINRZWiv5zl43cImhQ== X-Received: by 2002:a02:3904:: with SMTP id l4mr44099548jaa.81.1561416694932; Mon, 24 Jun 2019 15:51:34 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id n26sm9818440ioc.74.2019.06.24.15.51.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2019 15:51:34 -0700 (PDT) From: Noam Postavsky References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> Date: Mon, 24 Jun 2019 18:51:33 -0400 In-Reply-To: (Lars Ingebrigtsen's message of "Mon, 24 Jun 2019 18:16:23 +0200") Message-ID: <87wohasikq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Mark Oteiza writes: > >>> Could be a worthwhile tradeoff (especially >>>since there currently aren't any individual mode eldoc functions using >>>anything apart from :before-until, afaik); I'm on the fence about this. >> >> Not in emacs, at least. In elpa, ggtags uses :after-until. The only >> 3rd party packages--that I can think of right now--that implement eldoc >> functions just use setq-local (elpy and geiser). > > Noam, still on the fence? I haven't really thought about this much, maybe bring it up on emacs-devel? From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2019 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: Lars Ingebrigtsen , npostavs@users.sourceforge.net, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15615577947619 (code B ref 28257); Wed, 26 Jun 2019 14:04:02 +0000 Received: (at 28257) by debbugs.gnu.org; 26 Jun 2019 14:03:14 +0000 Received: from localhost ([127.0.0.1]:36621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg8W1-0001yp-Ky for submit@debbugs.gnu.org; Wed, 26 Jun 2019 10:03:13 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:39652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg8Vz-0001yY-F0 for 28257@debbugs.gnu.org; Wed, 26 Jun 2019 10:03:12 -0400 Received: by mail-qk1-f195.google.com with SMTP id i125so1709038qkd.6 for <28257@debbugs.gnu.org>; Wed, 26 Jun 2019 07:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=k1FrTIpNzbeHaqeY4KwiUdRdyg08UXUSm9As4yWu4VU=; b=Sl4oDzM05Ev/nmzvLhXop21HBTnemUKYX9FnRpBP2LUZH9evUBqsK5OGFGGs9a5ZjT he/sgM69uWxs4NR4kK4GRXRA8KCSSSzkqsou1flQ5sVroy3KerKU7LacvxpN9w1hrwwl yofpLmEv6mVx86SWeoieNiqi+rUkJ3uoBVJq7sSTouLawhk5guzfKu/I1tuWqiaHrHAy mgvoCcSlu1jkZkdaRtsXGU9g7MHrtRW8tBy8pWE1UbN+oENF+faa8nwhsSUEO7UBLy0e sH29ik5yQKgxTPwKMRQPttKSLgSaXjG2MwCu/HtbExG3oHrDxMxNM3bukM1f7b9L20U1 ucfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=k1FrTIpNzbeHaqeY4KwiUdRdyg08UXUSm9As4yWu4VU=; b=Z61sm853pYuC5R2Ni1ErJ0lFz3OfGb1fHg3izdFtUj4lu0+uiGfC+OI5GwGhVIzvxL 2X5ezM+A5LLVJ02Oi6Nc1PctJtXKl+a1c/3QujIxe8WsNmQJWjfoJ0lrQWYNvW3owrlU OqFlP9i9nuE657ALE9xJc6y+7Ji2QYOSe6lQSN2Uge4rl0GoH0kWd+yFIvYm2s08yMCA u+NoTjbCrXFHpALV9jVKzibNz0aKPfHysXk0tE+W3DNxNC2/v6tiXfCvDyBmKMJqNxuR bTl5GKGFosELJbjvVSg+yW8NnnH6lXn3yjZmw2hkto9U7l+3ywJsU7pZ/HwS+8zb19Gy zCNw== X-Gm-Message-State: APjAAAVxvP/ieD9S1fHejOsnPZR89pSfGDEC/wQGHbiJyMZLFBAerqFN +TmtfLn7Hb4s4LGJ3Jc8YguTyw== X-Google-Smtp-Source: APXvYqyNa4GLmrG+MNlHteVtg5PyfCYQ8HQGW0VSL6+M0L84t7WFbXMOMirY4hBmQIQziFjIfUib8A== X-Received: by 2002:a37:9e85:: with SMTP id h127mr4109257qke.120.1561557785704; Wed, 26 Jun 2019 07:03:05 -0700 (PDT) Received: from logos.localdomain (c-73-39-165-100.hsd1.md.comcast.net. [73.39.165.100]) by smtp.gmail.com with ESMTPSA id z57sm10344779qta.62.2019.06.26.07.03.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 07:03:04 -0700 (PDT) Date: Wed, 26 Jun 2019 10:03:03 -0400 From: Mark Oteiza Message-ID: <20190626140303.quhh4psgvd3aneyr@logos.localdomain> References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wohasikq.fsf@gmail.com> User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24/06/19 at 06:51pm, Noam Postavsky wrote: > Lars Ingebrigtsen writes: > > > Mark Oteiza writes: > > > >>> Could be a worthwhile tradeoff (especially > >>>since there currently aren't any individual mode eldoc functions using > >>>anything apart from :before-until, afaik); I'm on the fence about this. > >> > >> Not in emacs, at least. In elpa, ggtags uses :after-until. The only > >> 3rd party packages--that I can think of right now--that implement eldoc > >> functions just use setq-local (elpy and geiser). > > > > Noam, still on the fence? > > I haven't really thought about this much, maybe bring it up on > emacs-devel? I happily rolled with this patch until some changes to eldoc broke it. Will post a new patch when I get around to it. From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jan 2020 23:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: Lars Ingebrigtsen , npostavs@users.sourceforge.net, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15800824617926 (code B ref 28257); Sun, 26 Jan 2020 23:48:01 +0000 Received: (at 28257) by debbugs.gnu.org; 26 Jan 2020 23:47:41 +0000 Received: from localhost ([127.0.0.1]:57666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivrcy-00023l-UE for submit@debbugs.gnu.org; Sun, 26 Jan 2020 18:47:41 -0500 Received: from mail-qv1-f66.google.com ([209.85.219.66]:46223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivrcx-00023Z-E0 for 28257@debbugs.gnu.org; Sun, 26 Jan 2020 18:47:40 -0500 Received: by mail-qv1-f66.google.com with SMTP id u1so3683625qvk.13 for <28257@debbugs.gnu.org>; Sun, 26 Jan 2020 15:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LnfZ1pJLoraMnrC+BRen6PFtfXfqkt3tRgx+D46+FKQ=; b=HQ7gJZqykDo1iBITbbb2nlVWTlnRffd9CdnLdJmqf3pTTwTTWhsEUy7Rk/WmdFdP+n 0IyOg9TILPaJfmcBB9eK8yFSP/lXAXMMXHh1TldiLza1hj9XfUpKYLtf9pFg9d12MWgP QeN1W7iN2D0bd6VIj5u8CSbrOqok+cJPi+Gi8Mc+fBurnTmlWjpGPpRNBTmSy46X33Jx XXFpkG28kaMnXv6z6EykAnyi4eVvyZe44c12/oHpdgvQUHnLapxYWvi6lsAnUrKppE5w H6v3/w3k83Yz82jSGMJq9PEwmmBX4bRaSIm4ThFER1nKRS8pb0DL9ZIoxo2OmUBo9cgt 2zuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LnfZ1pJLoraMnrC+BRen6PFtfXfqkt3tRgx+D46+FKQ=; b=TH1UBeAhC5iw2mrpZoeSLMGsCbj0ioIjmu8plwV9lorpZKx4L93O3UNLgZ/chdVxva P5Z0zfPwJo2SCEswwwx3PbVqXWf/267vZeO1FRCt3dbI4BqOMNTBOl/Yxag1L28yGy/V yGrp+9y5CNjnjUlNLibNTyl+6g+zNoeBOOjRKKJRRpMxM2uJKXPsiKePC1M8OmKhgOnz cqntditg71r1Mcg77domprIctZ6NKnv0S3TKTbooiTCDcrLdWCfG5BmjdeDJ2U8HFOf8 TzmG33JB2BAaV/3mDt7PnkwHvphRnLt1fVQqmmjg4PYst/Wg4BigfT7SGfF2/LTGmtl9 kdfA== X-Gm-Message-State: APjAAAWW/bQ1+RpqpvC8h21mMLikfzdNZXuDbRDADGShq1WlwRfAY1Hu jDvXt453K205ZNONOtJsET+HJg== X-Google-Smtp-Source: APXvYqxShbB2IGtQlqpXYHVrtMAqLAxOPaWMKPH5ZW7JojhxwdoAiYaoxzWTHWEsVO51g7rFMSNryA== X-Received: by 2002:a0c:f412:: with SMTP id h18mr14618737qvl.124.1580082453495; Sun, 26 Jan 2020 15:47:33 -0800 (PST) Received: from holos.localdomain (c-69-251-143-253.hsd1.md.comcast.net. [69.251.143.253]) by smtp.gmail.com with ESMTPSA id f4sm8381143qka.89.2020.01.26.15.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 15:47:32 -0800 (PST) Date: Sun, 26 Jan 2020 18:47:31 -0500 From: Mark Oteiza Message-ID: <20200126234731.GA12794@holos.localdomain> References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626140303.quhh4psgvd3aneyr@logos.localdomain> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 26/06/19 at 10:03am, Mark Oteiza wrote: > On 24/06/19 at 06:51pm, Noam Postavsky wrote: > > Lars Ingebrigtsen writes: > > > > > Mark Oteiza writes: > > > > > >>> Could be a worthwhile tradeoff (especially > > >>>since there currently aren't any individual mode eldoc functions using > > >>>anything apart from :before-until, afaik); I'm on the fence about this. > > >> > > >> Not in emacs, at least. In elpa, ggtags uses :after-until. The only > > >> 3rd party packages--that I can think of right now--that implement eldoc > > >> functions just use setq-local (elpy and geiser). > > > > > > Noam, still on the fence? > > > > I haven't really thought about this much, maybe bring it up on > > emacs-devel? > > I happily rolled with this patch until some changes to eldoc broke it. > Will post a new patch when I get around to it. New patch below. Lightly tested, at first sight it seems to work (setting eldoc-documentation-function to eldoc-documentation-compose) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 683374c615..8e2a22b2ff 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1269,9 +1269,27 @@ Lisp Doc for a function, it shows the argument list, and for a variable it shows the first line of the variable's documentation string. To toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global -Eldoc mode, which is turned on by default, and affects buffers, such -as @samp{*scratch*}, whose major mode is Emacs Lisp or Lisp -Interaction (@w{@kbd{M-x global-eldoc-mode}} to turn it off globally). +Eldoc mode, which is turned on by default, and affects buffers whose +major mode sets the variables described below. Use @w{@kbd{M-x +global-eldoc-mode}} to turn it off globally. + +@vindex eldoc-documentation-function +@vindex eldoc-documentation-functions + These variables can be used to configure ElDoc mode: + +@table @code +@item eldoc-documentation-function +This variable holds the function which is used to retrieve +documentation for the item at point from the functions in the hook +@code{eldoc-documentation-functions}. By default, +@code{eldoc-documentation-function} returns the first documentation +string produced by the @code{eldoc-documentation-functions} hook. + +@item eldoc-documentation-functions +This abnormal hook holds documentation functions. It acts as a +collection of backends for ElDoc. This is what modes should use to +register their documentation functions with ElDoc. +@end table @node Hideshow @section Hideshow minor mode diff --git a/etc/NEWS b/etc/NEWS index 276b8f46e8..8396afc277 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -103,6 +103,16 @@ To revert to the previous behaviour, unconditionally aborts the current edebug instrumentation with the supplied error message. ++++ +** ElDoc + +*** New hook 'eldoc-documentation-functions' to be used for registering +doc string functions. This makes the results of all doc string +functions accessible to the user through the existing single function hook +'eldoc-documentation-function'. + +*** 'eldoc-documentation-function' is now a custom variable. + ** Tramp +++ diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 7a7b8ec164..0a17e7e2ea 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -40,9 +40,9 @@ ;; (add-hook 'ielm-mode-hook 'eldoc-mode) ;; (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode) -;; Major modes for other languages may use ElDoc by defining an -;; appropriate function as the buffer-local value of -;; `eldoc-documentation-function'. +;; Major modes for other languages may use ElDoc by adding an +;; appropriate function to the buffer-local value of +;; `eldoc-documentation-functions'. ;;; Code: @@ -222,8 +222,8 @@ global-eldoc-mode (defun eldoc--eval-expression-setup () ;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call ;; `emacs-lisp-mode' itself? - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (eldoc-mode +1)) ;;;###autoload @@ -235,7 +235,11 @@ turn-on-eldoc-mode (defun eldoc--supported-p () "Non-nil if an ElDoc function is set for this buffer." - (not (memq eldoc-documentation-function '(nil ignore)))) + (let ((hook 'eldoc-documentation-functions)) + (and eldoc-documentation-function + (or (and (local-variable-p hook) + (buffer-local-value hook (current-buffer))) + (default-value hook))))) (defun eldoc-schedule-timer () @@ -348,7 +352,47 @@ eldoc-display-message-no-interference-p ;;;###autoload -(defvar eldoc-documentation-function #'ignore +(defvar eldoc-documentation-functions nil + "Hook for functions to call to return doc string. +Each function should accept no arguments and return a one-line +string for displaying doc about a function etc. appropriate to +the context around point. It should return nil if there's no doc +appropriate for the context. Typically doc is returned if point +is on a function-like name or in its arg list. + +Major modes should modify this hook locally, for example: + (add-hook \\='eldoc-documentation-functions #\\='foo-mode-eldoc nil t) +so that the global value (i.e. the default value of the hook) is +taken into account if the major mode specific function does not +return any documentation.") + +(defun eldoc-documentation-default () + "Show doc string for item at point. +Default value for `eldoc-documentation-function'." + (let ((res (run-hook-with-args-until-success 'eldoc-documentation-functions))) + (when res + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +(defun eldoc-documentation-compose () + "Show multiple doc string results at once. +Meant as a value for `eldoc-documentation-function'." + (let (res) + (run-hook-wrapped + 'eldoc-documentation-functions + (lambda (f) + (let ((str (funcall f))) + (when str (push str res)) + nil))) + (when res + (setq res (mapconcat #'identity (nreverse res) ", ")) + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +;;;###autoload +(defcustom eldoc-documentation-function #'eldoc-documentation-default "Function to call to return doc string. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. @@ -359,14 +403,12 @@ eldoc-documentation-function The result is used as is, so the function must explicitly handle the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p', and the face `eldoc-highlight-function-argument', if they are to have any -effect. - -Major modes should modify this variable using `add-function', for example: - (add-function :before-until (local \\='eldoc-documentation-function) - #\\='foo-mode-eldoc-function) -so that the global documentation function (i.e. the default value of the -variable) is taken into account if the major mode specific function does not -return any documentation.") +effect." + :link '(info-link "(emacs) Lisp Doc") + :type '(radio (function-item eldoc-documentation-default) + (function-item eldoc-documentation-compose) + (function :tag "Other function")) + :group 'eldoc) (defun eldoc-print-current-symbol-info () "Print the text produced by `eldoc-documentation-function'." @@ -381,7 +423,8 @@ eldoc-print-current-symbol-info ;; Only keep looking for the info as long as the user hasn't ;; requested our attention. This also locally disables inhibit-quit. (while-no-input - (eldoc-message (funcall eldoc-documentation-function))))))) + (let ((fun eldoc-documentation-function)) + (when fun (eldoc-message (funcall fun))))))))) ;; If the entire line cannot fit in the echo area, the symbol name may be ;; truncated or eliminated entirely from the output to make room for the diff --git a/lisp/hexl.el b/lisp/hexl.el index 58518e7416..cf7118f208 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -367,8 +367,8 @@ hexl-mode (add-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer nil t) ;; Set a callback function for eldoc. - (add-function :before-until (local 'eldoc-documentation-function) - #'hexl-print-current-point-info) + (add-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info nil t) (eldoc-add-command-completions "hexl-") (eldoc-remove-command "hexl-save-buffer" "hexl-current-address") @@ -455,6 +455,8 @@ hexl-revert-buffer-function ;; 2. reset change-major-mode-hook in case that `hexl-mode' ;; previously added hexl-maybe-dehexlify-buffer to it. (remove-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer t) + (remove-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info t) (setq major-mode 'fundamental-mode) (hexl-mode))) diff --git a/lisp/ielm.el b/lisp/ielm.el index 41675c011d..fc06ebfa2d 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -541,8 +541,8 @@ inferior-emacs-lisp-mode (set (make-local-variable 'completion-at-point-functions) '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) (setq comint-get-old-input 'ielm-get-old-input) diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 9ddb2ab2bb..af02f5fea8 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1390,12 +1390,15 @@ cfengine3-mode (when buffer-file-name (shell-quote-argument buffer-file-name))))) - ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to - ;; nil. - (or eldoc-documentation-function - (setq-local eldoc-documentation-function #'ignore)) - (add-function :before-until (local 'eldoc-documentation-function) - #'cfengine3-documentation-function) + (if (> emacs-major-version 25) + (add-hook 'eldoc-documentation-functions + #'cfengine3-documentation-function nil t) + ;; For emacs < 25.1 where `eldoc-documentation-function' defaults + ;; to nil. + (or eldoc-documentation-function + (setq-local eldoc-documentation-function #'ignore)) + (add-function :before-until (local 'eldoc-documentation-function) + #'cfengine3-documentation-function)) (add-hook 'completion-at-point-functions #'cfengine3-completion-function nil t) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 2617a6e4cc..813b628bc3 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -250,8 +250,8 @@ emacs-lisp-mode (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs)) (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 9e03956254..352c1810d1 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -619,8 +619,7 @@ octave-mode (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) (setq-local beginning-of-defun-function 'octave-beginning-of-defun) (and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment)) - (add-function :before-until (local 'eldoc-documentation-function) - 'octave-eldoc-function) + (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t) (easy-menu-add octave-mode-menu)) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a2d85d0bef..48401b1e54 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5544,8 +5544,10 @@ python-mode ;; Emacs<25 (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) - (add-function :before-until (local 'eldoc-documentation-function) - #'python-eldoc-function)) + (if (< emacs-major-version 26) + (add-function :before-until (local 'eldoc-documentation-function) + #'python-eldoc-function) + (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t))) (add-to-list 'hs-special-modes-alist From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Jan 2020 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: larsi@gnus.org, npostavs@users.sourceforge.net, npostavs@gmail.com, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15804795395794 (code B ref 28257); Fri, 31 Jan 2020 14:06:01 +0000 Received: (at 28257) by debbugs.gnu.org; 31 Jan 2020 14:05:39 +0000 Received: from localhost ([127.0.0.1]:36727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixWvT-0001VO-0s for submit@debbugs.gnu.org; Fri, 31 Jan 2020 09:05:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixWvR-0001VA-Lz for 28257@debbugs.gnu.org; Fri, 31 Jan 2020 09:05:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ixWvM-0005dT-B5; Fri, 31 Jan 2020 09:05:32 -0500 Received: from [176.228.60.248] (port=4771 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ixWvK-0000Bz-4L; Fri, 31 Jan 2020 09:05:30 -0500 Date: Fri, 31 Jan 2020 16:05:09 +0200 Message-Id: <838slnlo16.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20200126234731.GA12794@holos.localdomain> (message from Mark Oteiza on Sun, 26 Jan 2020 18:47:31 -0500) References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Date: Sun, 26 Jan 2020 18:47:31 -0500 > From: Mark Oteiza > Cc: Lars Ingebrigtsen , 28257@debbugs.gnu.org, > npostavs@users.sourceforge.net > > On 26/06/19 at 10:03am, Mark Oteiza wrote: > > On 24/06/19 at 06:51pm, Noam Postavsky wrote: > > > Lars Ingebrigtsen writes: > > > > > > > Mark Oteiza writes: > > > > > > > >>> Could be a worthwhile tradeoff (especially > > > >>>since there currently aren't any individual mode eldoc functions using > > > >>>anything apart from :before-until, afaik); I'm on the fence about this. > > > >> > > > >> Not in emacs, at least. In elpa, ggtags uses :after-until. The only > > > >> 3rd party packages--that I can think of right now--that implement eldoc > > > >> functions just use setq-local (elpy and geiser). > > > > > > > > Noam, still on the fence? > > > > > > I haven't really thought about this much, maybe bring it up on > > > emacs-devel? > > > > I happily rolled with this patch until some changes to eldoc broke it. > > Will post a new patch when I get around to it. > > New patch below. Lightly tested, at first sight it seems to work > (setting eldoc-documentation-function to eldoc-documentation-compose) Lars, Noam, any comments? From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2020 10:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: larsi@gnus.org, npostavs@users.sourceforge.net Cc: mvoteiza@udel.edu, npostavs@gmail.com, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.158115625116080 (code B ref 28257); Sat, 08 Feb 2020 10:05:02 +0000 Received: (at 28257) by debbugs.gnu.org; 8 Feb 2020 10:04:11 +0000 Received: from localhost ([127.0.0.1]:50649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0MyA-0004BH-Ex for submit@debbugs.gnu.org; Sat, 08 Feb 2020 05:04:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0My8-0004B5-LZ for 28257@debbugs.gnu.org; Sat, 08 Feb 2020 05:04:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0My3-0005A7-5Z; Sat, 08 Feb 2020 05:04:03 -0500 Received: from [176.228.60.248] (port=4984 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j0My2-0003Os-1A; Sat, 08 Feb 2020 05:04:02 -0500 Date: Sat, 08 Feb 2020 12:03:44 +0200 Message-Id: <83a75te6pr.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <838slnlo16.fsf@gnu.org> (message from Eli Zaretskii on Fri, 31 Jan 2020 16:05:09 +0200) References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <838slnlo16.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ping! Can we please review Mark's patch some time soon? TIA. > Date: Fri, 31 Jan 2020 16:05:09 +0200 > From: Eli Zaretskii > Cc: larsi@gnus.org, 28257@debbugs.gnu.org, npostavs@gmail.com, > npostavs@users.sourceforge.net > > > Date: Sun, 26 Jan 2020 18:47:31 -0500 > > From: Mark Oteiza > > Cc: Lars Ingebrigtsen , 28257@debbugs.gnu.org, > > npostavs@users.sourceforge.net > > > > On 26/06/19 at 10:03am, Mark Oteiza wrote: > > > On 24/06/19 at 06:51pm, Noam Postavsky wrote: > > > > Lars Ingebrigtsen writes: > > > > > > > > > Mark Oteiza writes: > > > > > > > > > >>> Could be a worthwhile tradeoff (especially > > > > >>>since there currently aren't any individual mode eldoc functions using > > > > >>>anything apart from :before-until, afaik); I'm on the fence about this. > > > > >> > > > > >> Not in emacs, at least. In elpa, ggtags uses :after-until. The only > > > > >> 3rd party packages--that I can think of right now--that implement eldoc > > > > >> functions just use setq-local (elpy and geiser). > > > > > > > > > > Noam, still on the fence? > > > > > > > > I haven't really thought about this much, maybe bring it up on > > > > emacs-devel? > > > > > > I happily rolled with this patch until some changes to eldoc broke it. > > > Will post a new patch when I get around to it. > > > > New patch below. Lightly tested, at first sight it seems to work > > (setting eldoc-documentation-function to eldoc-documentation-compose) > > Lars, Noam, any comments? > > > > From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Feb 2020 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: mvoteiza@udel.edu, larsi@gnus.org, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15814582335569 (code B ref 28257); Tue, 11 Feb 2020 21:58:02 +0000 Received: (at 28257) by debbugs.gnu.org; 11 Feb 2020 21:57:13 +0000 Received: from localhost ([127.0.0.1]:57669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1dWq-0001Rl-Sa for submit@debbugs.gnu.org; Tue, 11 Feb 2020 16:57:13 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:43780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1dWp-0001RW-Gx for 28257@debbugs.gnu.org; Tue, 11 Feb 2020 16:57:12 -0500 Received: by mail-qt1-f180.google.com with SMTP id d18so32574qtj.10 for <28257@debbugs.gnu.org>; Tue, 11 Feb 2020 13:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=NlQTXq5LuZgDzFZOb3RLUUWrcPrZNh8mm104e681Se4=; b=hQW3+mmEVgfPYyAwtyHivMDtQqMpQMRAeQjRvHejM2pWtY2bbu3sbTznHlRgQ8fcD1 VfM/b6I1t4OLG9stA7nNdVud9iSJLYv++g6Fums3s6qzTizAdhEXue9UXh7DBQwRtkTA sG5+EP5iRmamCsrtxiPQKTDLSEFBgFz0JV8ieL9i8VzirStCTGpTAg0xUNQQv17HtGNj XN/79DJusI78YWIBZIUCneczDNajWSDYtSg4vHxxghILvbunGkN23T+gedEnmkKygZVi cJgEBxbALWkBFYfNWCPmtsGGgFzdidYH/VuRut3dEhbM6Z00s2agcVzE9uYWmVMVgycB J68Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=NlQTXq5LuZgDzFZOb3RLUUWrcPrZNh8mm104e681Se4=; b=hHtKb5cDW+4jp8a4Bv+LQJZ+N+lfrHvv/8jBUFRiQWpXQ/7vWi6zjKUzr+EmrJGWoN MNo40H1xKy304Vj/8pJYNapJM8s+wHG3YyUS23Tf04NJgxm3S0Z3VFV4+zabbJaVil5T WYeCKRQPMtI/NPi7wx6xZ1zbxCWMOY75g3KYJ5UadrdWaLGuW5ph4A+SFSK77fLzbhFL wTHQdnBFiIgJjtrrfQe/ZgQRwL5b5L8/o6JgOWh+8NJorsP+I3f/cYWPKjOKKD58Eylm 12fa9SEFnUWFqsHjv2SfufFGwaWhO2CJEBxFeqUIBQnY7+4yJaw/cQApWSDx/1tWhZRS bf8w== X-Gm-Message-State: APjAAAWhoBubPZA2Qd6CSCPgskKTGsTiI0ZIk1w5YZm+ucOCdFeu9SZJ cJnVsmqPl5Enmo7lKh5OkduFJ0t/Zc0= X-Google-Smtp-Source: APXvYqwF3NcQ5AQL0ah3Dgg3sVgwtBOOMeeFOX7DxszSqeU5d27ccPBOSO/OZuU3abPffTRQyLu2/Q== X-Received: by 2002:ac8:a83:: with SMTP id d3mr4502123qti.228.1581458225547; Tue, 11 Feb 2020 13:57:05 -0800 (PST) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id p126sm2765598qke.108.2020.02.11.13.57.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Feb 2020 13:57:04 -0800 (PST) From: Noam Postavsky References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <838slnlo16.fsf@gnu.org> <83a75te6pr.fsf@gnu.org> Date: Tue, 11 Feb 2020 16:57:04 -0500 In-Reply-To: <83a75te6pr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 Feb 2020 12:03:44 +0200") Message-ID: <85pnekyehb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Ping! > > Can we please review Mark's patch some time soon? TIA. + (if (> emacs-major-version 25) + (add-hook 'eldoc-documentation-functions + #'cfengine3-documentation-function nil t) I think the 25 should be 26? Or 27 if this is going to master (in which case the python.el hunk needs to be adjusted too). Otherwise, the patch itself is fine in terms of coding details, as far as I can tell. I feel somewhat underqualified to decide whether or not the change in the semantics of eldoc-documentation-function is a good idea. From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky , Stefan Monnier Cc: mvoteiza@udel.edu, larsi@gnus.org, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15816743112670 (code B ref 28257); Fri, 14 Feb 2020 09:59:01 +0000 Received: (at 28257) by debbugs.gnu.org; 14 Feb 2020 09:58:31 +0000 Received: from localhost ([127.0.0.1]:60871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Xjz-0000h0-9l for submit@debbugs.gnu.org; Fri, 14 Feb 2020 04:58:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2Xjx-0000gm-At for 28257@debbugs.gnu.org; Fri, 14 Feb 2020 04:58:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j2Xjr-0000HJ-O4; Fri, 14 Feb 2020 04:58:23 -0500 Received: from [176.228.60.248] (port=2074 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j2Xjq-0008AU-BT; Fri, 14 Feb 2020 04:58:23 -0500 Date: Fri, 14 Feb 2020 11:58:27 +0200 Message-Id: <838sl5pk1o.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <85pnekyehb.fsf@gmail.com> (message from Noam Postavsky on Tue, 11 Feb 2020 16:57:04 -0500) References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <838slnlo16.fsf@gnu.org> <83a75te6pr.fsf@gnu.org> <85pnekyehb.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Noam Postavsky > Cc: larsi@gnus.org, mvoteiza@udel.edu, 28257@debbugs.gnu.org > Date: Tue, 11 Feb 2020 16:57:04 -0500 > > > Can we please review Mark's patch some time soon? TIA. > > + (if (> emacs-major-version 25) > + (add-hook 'eldoc-documentation-functions > + #'cfengine3-documentation-function nil t) > > I think the 25 should be 26? Or 27 if this is going to master (in which > case the python.el hunk needs to be adjusted too). Otherwise, the patch > itself is fine in terms of coding details, as far as I can tell. Thanks. > I feel somewhat underqualified to decide whether or not the change in > the semantics of eldoc-documentation-function is a good idea. Thanks. I'm even less qualified here, but the same thoughts crossed my mind as well. Stefan, any comments or ideas? Who else might be relevant to discuss these changes? From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 14:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: Lars Ingebrigtsen , 28257@debbugs.gnu.org, Noam Postavsky , npostavs@users.sourceforge.net Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15816918675347 (code B ref 28257); Fri, 14 Feb 2020 14:52:01 +0000 Received: (at 28257) by debbugs.gnu.org; 14 Feb 2020 14:51:07 +0000 Received: from localhost ([127.0.0.1]:32816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2cJ8-0001OA-QK for submit@debbugs.gnu.org; Fri, 14 Feb 2020 09:51:07 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2cJ6-0001Ng-GM for 28257@debbugs.gnu.org; Fri, 14 Feb 2020 09:51:05 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C9B9544E79F; Fri, 14 Feb 2020 09:50:58 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 851F044E745; Fri, 14 Feb 2020 09:50:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1581691849; bh=c3njxVRgpRL2IxepXbkd+PpjsVzjAOsVzOBsX+65CdM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AnHKzPlEHED4jzbVSSk04QC/BdSXnNXRh4FzNMW8CeEwU9Rc4bJig2/bEUEf8fIWd 6TT9k9eov371E7Z0UqSg0m7yXuzuXq4b+ZOXrjbJqfv2vG0GC2kjizSFAQvPeqdc6V kR6fShmSCPlFT8Uyjtz7BZ88kIiI1zfCGNYT+7NQnSRfUGpngviTZhShTJlyRH/M46 DBWooqBuEnMBgWHKGQ0jmotKcjQSlcvT9uocypxyKsoUBOV//mIGnMl65QzOFLEls5 vVdDcu4qDOsJIJ7WgCNrzAsaEEkqPzZ1V37diYifpNmTDqoI5nUF6f7EE6jgdp6Qey 1elJ+puYtZY2w== Received: from pastel (unknown [157.52.14.222]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4132B120484; Fri, 14 Feb 2020 09:50:49 -0500 (EST) From: Stefan Monnier Message-ID: References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> Date: Fri, 14 Feb 2020 09:50:47 -0500 In-Reply-To: <20200126234731.GA12794@holos.localdomain> (Mark Oteiza's message of "Sun, 26 Jan 2020 18:47:31 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > +*** 'eldoc-documentation-function' is now a custom variable. I think this should be expanded to clarify that packages should stop using this var and use `eldoc-documentation-functions` instead. > (defun eldoc--supported-p () > "Non-nil if an ElDoc function is set for this buffer." > - (not (memq eldoc-documentation-function '(nil ignore)))) > + (let ((hook 'eldoc-documentation-functions)) > + (and eldoc-documentation-function > + (or (and (local-variable-p hook) > + (buffer-local-value hook (current-buffer))) > + (default-value hook))))) The (and eldoc-documentation-function should really be (and (not (memq eldoc-documentation-function '(nil ignore)))) > ;;;###autoload > -(defvar eldoc-documentation-function #'ignore > +(defvar eldoc-documentation-functions nil There's no reason to autoload this new var. [ Of course, it makes no practical difference since eldoc is preloaded anyway, but if it weren't preloaded this var should be autoloaded. ] > +(defun eldoc-documentation-default () > + "Show doc string for item at point. > +Default value for `eldoc-documentation-function'." This doc should clarify that it shows the *first* doc. > +;;;###autoload > +(defcustom eldoc-documentation-function #'eldoc-documentation-default Now that it's a defcustom this shouldn't be autoloaded either (currently packages are expected to use `add-function` on it even if there's no indication that the user will actually use eldoc, which is why it is/was autoloaded. But with its new meaning this need disappears). > + (if (> emacs-major-version 25) > + (add-hook 'eldoc-documentation-functions > + #'cfengine3-documentation-function nil t) The test should be fixed (I guess you could use (boundp 'eldoc-documentation-functions)). > + (if (< emacs-major-version 26) > + (add-function :before-until (local 'eldoc-documentation-function) > + #'python-eldoc-function) > + (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t))) Same here. Stefan From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 14:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: mvoteiza@udel.edu, larsi@gnus.org, Noam Postavsky , 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15816918985399 (code B ref 28257); Fri, 14 Feb 2020 14:52:01 +0000 Received: (at 28257) by debbugs.gnu.org; 14 Feb 2020 14:51:38 +0000 Received: from localhost ([127.0.0.1]:32819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2cJe-0001P1-3r for submit@debbugs.gnu.org; Fri, 14 Feb 2020 09:51:38 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2cJb-0001Oj-Sl for 28257@debbugs.gnu.org; Fri, 14 Feb 2020 09:51:36 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6F867101375; Fri, 14 Feb 2020 09:51:30 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C21E7100EB3; Fri, 14 Feb 2020 09:51:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1581691888; bh=GdFCkUcj7Mcdm6BaaHHGbJlV/sQTw7AGsPDIlJA9AwE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ilzqF+GpZzWBJUjf5eUwDCfoxQIOp/3IDk5XfC3bMS22HLdbBbBsSv9BNp4tr7you SfUZMYqW/+/oNw864yabK+J8Sixnfb5TZgO+3YimDs2RpEos3p6s9mUNxv8t5uQCFP a6udh/eU005NQHItt7lRtBDwQSb9W52r+qNCqb85S1r9bHHIuOYb9Mud9y+DRQ7qZ8 /ULDGWHMgvcbBUr7H7JOWEDPPZd+0ixjmdrj+ktAE/y5ZEDzDVfibg6mHYncmUCFSK rwSrA5BIOKzaxLDKGZwPFAIlSNMwiBK45mddpLZuwRabS/x1XyXSsMSKMsbMpNJ0lq 4SdZLQAA+2GSQ== Received: from pastel (unknown [157.52.14.222]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 88D161202BB; Fri, 14 Feb 2020 09:51:28 -0500 (EST) From: Stefan Monnier Message-ID: References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <838slnlo16.fsf@gnu.org> <83a75te6pr.fsf@gnu.org> <85pnekyehb.fsf@gmail.com> <838sl5pk1o.fsf@gnu.org> Date: Fri, 14 Feb 2020 09:51:26 -0500 In-Reply-To: <838sl5pk1o.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 Feb 2020 11:58:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.024 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Thanks. I'm even less qualified here, but the same thoughts crossed > my mind as well. > > Stefan, any comments or ideas? Who else might be relevant to discuss > these changes? It's fine by me. Stefan From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: Lars Ingebrigtsen , 28257@debbugs.gnu.org, Noam Postavsky , npostavs@users.sourceforge.net Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15817208663461 (code B ref 28257); Fri, 14 Feb 2020 22:55:02 +0000 Received: (at 28257) by debbugs.gnu.org; 14 Feb 2020 22:54:26 +0000 Received: from localhost ([127.0.0.1]:34869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2jqr-0000tl-FX for submit@debbugs.gnu.org; Fri, 14 Feb 2020 17:54:26 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2jqp-0000tX-65 for 28257@debbugs.gnu.org; Fri, 14 Feb 2020 17:54:24 -0500 Received: by mail-qk1-f196.google.com with SMTP id h4so10862856qkm.0 for <28257@debbugs.gnu.org>; Fri, 14 Feb 2020 14:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OJE1/iyFFXa0/LqIBnE6jQcca9B3ZgWwCZ+Z8os/PAs=; b=Zv0KaXPav1uhW0kjKIfsyRSgzUbYjB5wXYmrqDnq00WyzkP17TBr67XyYGFoMDqQ+B lLn1rMZ+XAFEb+Ex2TOUMzmS25NTP3DLGrAs3XscGFGw8e/aBEDjjzjST4uWwl3JHhfS qbxQ75dS9pWGzsGoW7fOExwoMAxVFymLREwohCTx9WCcFVmS0dq0xRodukKi70TPhIPA rQLy96Aa+lsMNv/2j+RODdOuXjMnomla8Ust+BB8HU+ntmZ9yRcKfQJG8qdghMoE+F5W E/ElHN92Hx7tnnCqrCbeDKroqA9d34Gv+RG+ydMzTjRgaujZePgHyAL1mDzeNdc1c1hE o1bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OJE1/iyFFXa0/LqIBnE6jQcca9B3ZgWwCZ+Z8os/PAs=; b=noowkUq/i3EGpnTaEz6wRWvFGFZCo2Dxlz1F1s0Tk65RvZP5T1kP8rGBmUfQEAmpko p+Aou27XYkhpvcuVwjl61NPn9L5fjKmBLXnPXgbqsuXM/mUjsRBkbJnpY+3KK8PzjT9g A2XMMxO+aoaWD0IPXSqs3TprZ387FSXS+xxHOaROjMwj7yQnTrOUUKHPm4sJi+zQeP7D LrCPYSz9aKL/UoIoKWWUZyerMMOnFkzQrE+24yD0MUAqRBeyEtRThN5dKviVndvJVHNS mgOhchNri440tST6cN4RGypkyoyuJZiMrD2lm6QfCOX5dqGeMWNwUuVW3nLQAw2yMm3y wyfA== X-Gm-Message-State: APjAAAX7rS5npnGyoCruKsklYSDXfZcqxVv0GK15ioBuIH6Ei8bOLdnV X5Ts+V7qqDBJPy+SNXLxwwnA9w== X-Google-Smtp-Source: APXvYqygqx2rsOGA4mCyMSEW+z32a0qlYdaJq6c0jiDXuuNwnUj38ABXd2nbpl2D/CIm3u3GQ93wPw== X-Received: by 2002:a05:620a:b06:: with SMTP id t6mr4961747qkg.373.1581720857174; Fri, 14 Feb 2020 14:54:17 -0800 (PST) Received: from holos.localdomain (c-69-251-56-176.hsd1.md.comcast.net. [69.251.56.176]) by smtp.gmail.com with ESMTPSA id g84sm4163799qke.129.2020.02.14.14.54.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 14:54:16 -0800 (PST) Date: Fri, 14 Feb 2020 17:54:15 -0500 From: Mark Oteiza Message-ID: <20200214225415.GA3947@holos.localdomain> References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks Noam and Stefan for the catches. New patch below. On 14/02/20 at 09:50am, Stefan Monnier wrote: > > +*** 'eldoc-documentation-function' is now a custom variable. > > I think this should be expanded to clarify that packages should stop > using this var and use `eldoc-documentation-functions` instead. > > <...snip...> doc/emacs/programs.texi | 24 ++++++++++++-- etc/NEWS | 12 +++++++ lisp/emacs-lisp/eldoc.el | 75 ++++++++++++++++++++++++++++++++++---------- lisp/hexl.el | 6 ++-- lisp/ielm.el | 4 +-- lisp/progmodes/cfengine.el | 15 +++++---- lisp/progmodes/elisp-mode.el | 4 +-- lisp/progmodes/octave.el | 3 +- lisp/progmodes/python.el | 6 ++-- 9 files changed, 113 insertions(+), 36 deletions(-) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 683374c615..8e2a22b2ff 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1269,9 +1269,27 @@ Lisp Doc for a function, it shows the argument list, and for a variable it shows the first line of the variable's documentation string. To toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global -Eldoc mode, which is turned on by default, and affects buffers, such -as @samp{*scratch*}, whose major mode is Emacs Lisp or Lisp -Interaction (@w{@kbd{M-x global-eldoc-mode}} to turn it off globally). +Eldoc mode, which is turned on by default, and affects buffers whose +major mode sets the variables described below. Use @w{@kbd{M-x +global-eldoc-mode}} to turn it off globally. + +@vindex eldoc-documentation-function +@vindex eldoc-documentation-functions + These variables can be used to configure ElDoc mode: + +@table @code +@item eldoc-documentation-function +This variable holds the function which is used to retrieve +documentation for the item at point from the functions in the hook +@code{eldoc-documentation-functions}. By default, +@code{eldoc-documentation-function} returns the first documentation +string produced by the @code{eldoc-documentation-functions} hook. + +@item eldoc-documentation-functions +This abnormal hook holds documentation functions. It acts as a +collection of backends for ElDoc. This is what modes should use to +register their documentation functions with ElDoc. +@end table @node Hideshow @section Hideshow minor mode diff --git a/etc/NEWS b/etc/NEWS index b0e17c7c03..793be515c5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -120,6 +120,18 @@ To revert to the previous behaviour, unconditionally aborts the current edebug instrumentation with the supplied error message. ++++ +** ElDoc + +*** New hook 'eldoc-documentation-functions' to be used for registering +doc string functions. This makes the results of all doc string +functions accessible to the user through the existing single function hook +'eldoc-documentation-function'. + +*** 'eldoc-documentation-function' is now a custom variable. +Modes should use the new hook instead of this variable to register +their backends. + ** Tramp +++ diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 7a7b8ec164..d96e569fca 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -40,9 +40,9 @@ ;; (add-hook 'ielm-mode-hook 'eldoc-mode) ;; (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode) -;; Major modes for other languages may use ElDoc by defining an -;; appropriate function as the buffer-local value of -;; `eldoc-documentation-function'. +;; Major modes for other languages may use ElDoc by adding an +;; appropriate function to the buffer-local value of +;; `eldoc-documentation-functions'. ;;; Code: @@ -222,8 +222,8 @@ global-eldoc-mode (defun eldoc--eval-expression-setup () ;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call ;; `emacs-lisp-mode' itself? - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (eldoc-mode +1)) ;;;###autoload @@ -235,7 +235,11 @@ turn-on-eldoc-mode (defun eldoc--supported-p () "Non-nil if an ElDoc function is set for this buffer." - (not (memq eldoc-documentation-function '(nil ignore)))) + (let ((hook 'eldoc-documentation-functions)) + (and (not (memq eldoc-documentation-function '(nil ignore))) + (or (and (local-variable-p hook) + (buffer-local-value hook (current-buffer))) + (default-value hook))))) (defun eldoc-schedule-timer () @@ -347,8 +351,46 @@ eldoc-display-message-no-interference-p (not (or executing-kbd-macro (bound-and-true-p edebug-active)))) -;;;###autoload -(defvar eldoc-documentation-function #'ignore +(defvar eldoc-documentation-functions nil + "Hook for functions to call to return doc string. +Each function should accept no arguments and return a one-line +string for displaying doc about a function etc. appropriate to +the context around point. It should return nil if there's no doc +appropriate for the context. Typically doc is returned if point +is on a function-like name or in its arg list. + +Major modes should modify this hook locally, for example: + (add-hook \\='eldoc-documentation-functions #\\='foo-mode-eldoc nil t) +so that the global value (i.e. the default value of the hook) is +taken into account if the major mode specific function does not +return any documentation.") + +(defun eldoc-documentation-default () + "Show first doc string for item at point. +Default value for `eldoc-documentation-function'." + (let ((res (run-hook-with-args-until-success 'eldoc-documentation-functions))) + (when res + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +(defun eldoc-documentation-compose () + "Show multiple doc string results at once. +Meant as a value for `eldoc-documentation-function'." + (let (res) + (run-hook-wrapped + 'eldoc-documentation-functions + (lambda (f) + (let ((str (funcall f))) + (when str (push str res)) + nil))) + (when res + (setq res (mapconcat #'identity (nreverse res) ", ")) + (if eldoc-echo-area-use-multiline-p res + (truncate-string-to-width + res (1- (window-width (minibuffer-window)))))))) + +(defcustom eldoc-documentation-function #'eldoc-documentation-default "Function to call to return doc string. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. @@ -359,14 +401,12 @@ eldoc-documentation-function The result is used as is, so the function must explicitly handle the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p', and the face `eldoc-highlight-function-argument', if they are to have any -effect. - -Major modes should modify this variable using `add-function', for example: - (add-function :before-until (local \\='eldoc-documentation-function) - #\\='foo-mode-eldoc-function) -so that the global documentation function (i.e. the default value of the -variable) is taken into account if the major mode specific function does not -return any documentation.") +effect." + :link '(info-link "(emacs) Lisp Doc") + :type '(radio (function-item eldoc-documentation-default) + (function-item eldoc-documentation-compose) + (function :tag "Other function")) + :group 'eldoc) (defun eldoc-print-current-symbol-info () "Print the text produced by `eldoc-documentation-function'." @@ -381,7 +421,8 @@ eldoc-print-current-symbol-info ;; Only keep looking for the info as long as the user hasn't ;; requested our attention. This also locally disables inhibit-quit. (while-no-input - (eldoc-message (funcall eldoc-documentation-function))))))) + (let ((fun eldoc-documentation-function)) + (when fun (eldoc-message (funcall fun))))))))) ;; If the entire line cannot fit in the echo area, the symbol name may be ;; truncated or eliminated entirely from the output to make room for the diff --git a/lisp/hexl.el b/lisp/hexl.el index 58518e7416..cf7118f208 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -367,8 +367,8 @@ hexl-mode (add-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer nil t) ;; Set a callback function for eldoc. - (add-function :before-until (local 'eldoc-documentation-function) - #'hexl-print-current-point-info) + (add-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info nil t) (eldoc-add-command-completions "hexl-") (eldoc-remove-command "hexl-save-buffer" "hexl-current-address") @@ -455,6 +455,8 @@ hexl-revert-buffer-function ;; 2. reset change-major-mode-hook in case that `hexl-mode' ;; previously added hexl-maybe-dehexlify-buffer to it. (remove-hook 'change-major-mode-hook #'hexl-maybe-dehexlify-buffer t) + (remove-hook 'eldoc-documentation-functions + #'hexl-print-current-point-info t) (setq major-mode 'fundamental-mode) (hexl-mode))) diff --git a/lisp/ielm.el b/lisp/ielm.el index 41675c011d..fc06ebfa2d 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -541,8 +541,8 @@ inferior-emacs-lisp-mode (set (make-local-variable 'completion-at-point-functions) '(comint-replace-by-expanded-history ielm-complete-filename elisp-completion-at-point)) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (set (make-local-variable 'ielm-prompt-internal) ielm-prompt) (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only) (setq comint-get-old-input 'ielm-get-old-input) diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 9ddb2ab2bb..a94a6666bb 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el @@ -1390,12 +1390,15 @@ cfengine3-mode (when buffer-file-name (shell-quote-argument buffer-file-name))))) - ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to - ;; nil. - (or eldoc-documentation-function - (setq-local eldoc-documentation-function #'ignore)) - (add-function :before-until (local 'eldoc-documentation-function) - #'cfengine3-documentation-function) + (if (boundp 'eldoc-documentation-functions) + (add-hook 'eldoc-documentation-functions + #'cfengine3-documentation-function nil t) + ;; For emacs < 25.1 where `eldoc-documentation-function' defaults + ;; to nil. + (or eldoc-documentation-function + (setq-local eldoc-documentation-function #'ignore)) + (add-function :before-until (local 'eldoc-documentation-function) + #'cfengine3-documentation-function)) (add-hook 'completion-at-point-functions #'cfengine3-completion-function nil t) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 2617a6e4cc..813b628bc3 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -250,8 +250,8 @@ emacs-lisp-mode (add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs)) (setq-local electric-quote-string t) (setq imenu-case-fold-search nil) - (add-function :before-until (local 'eldoc-documentation-function) - #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-documentation-function nil t) (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) (setq-local project-vc-external-roots-function #'elisp-load-path-roots) (add-hook 'completion-at-point-functions diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 9e03956254..352c1810d1 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -619,8 +619,7 @@ octave-mode (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) (setq-local beginning-of-defun-function 'octave-beginning-of-defun) (and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment)) - (add-function :before-until (local 'eldoc-documentation-function) - 'octave-eldoc-function) + (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t) (easy-menu-add octave-mode-menu)) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a2d85d0bef..67383b3415 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5544,8 +5544,10 @@ python-mode ;; Emacs<25 (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) - (add-function :before-until (local 'eldoc-documentation-function) - #'python-eldoc-function)) + (if (boundp 'eldoc-documentation-functions) + (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) + (add-function :before-until (local 'eldoc-documentation-function) + #'python-eldoc-function))) (add-to-list 'hs-special-modes-alist From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Feb 2020 08:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: larsi@gnus.org, 28257@debbugs.gnu.org, npostavs@gmail.com, monnier@iro.umontreal.ca, npostavs@users.sourceforge.net Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.158227486614374 (code B ref 28257); Fri, 21 Feb 2020 08:48:01 +0000 Received: (at 28257) by debbugs.gnu.org; 21 Feb 2020 08:47:46 +0000 Received: from localhost ([127.0.0.1]:46349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j53yM-0003jl-0p for submit@debbugs.gnu.org; Fri, 21 Feb 2020 03:47:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j53yL-0003jX-51 for 28257@debbugs.gnu.org; Fri, 21 Feb 2020 03:47:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j53yF-0007So-08; Fri, 21 Feb 2020 03:47:39 -0500 Received: from [176.228.60.248] (port=4057 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j53yE-0007zZ-C2; Fri, 21 Feb 2020 03:47:38 -0500 Date: Fri, 21 Feb 2020 10:47:25 +0200 Message-Id: <83lfowjpia.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20200214225415.GA3947@holos.localdomain> (message from Mark Oteiza on Fri, 14 Feb 2020 17:54:15 -0500) References: <87ziakwifi.fsf@holos> <87val88l0d.fsf@users.sourceforge.net> <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <20200214225415.GA3947@holos.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Date: Fri, 14 Feb 2020 17:54:15 -0500 > From: Mark Oteiza > Cc: Lars Ingebrigtsen , npostavs@users.sourceforge.net, > Noam Postavsky , 28257@debbugs.gnu.org > > Thanks Noam and Stefan for the catches. New patch below. Any further comments? I only spotted an occasional single space between sentences in doc strings, but have nothing else? If there are no further comments, I'd like to install this. Thanks. From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Feb 2020 23:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: larsi@gnus.org, 28257@debbugs.gnu.org, npostavs@gmail.com, monnier@iro.umontreal.ca, npostavs@users.sourceforge.net Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.15826727236381 (code B ref 28257); Tue, 25 Feb 2020 23:19:01 +0000 Received: (at 28257) by debbugs.gnu.org; 25 Feb 2020 23:18:43 +0000 Received: from localhost ([127.0.0.1]:56264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j6jTP-0001er-Cs for submit@debbugs.gnu.org; Tue, 25 Feb 2020 18:18:43 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:46685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j6jTN-0001ea-BH for 28257@debbugs.gnu.org; Tue, 25 Feb 2020 18:18:41 -0500 Received: by mail-qt1-f174.google.com with SMTP id i14so893867qtv.13 for <28257@debbugs.gnu.org>; Tue, 25 Feb 2020 15:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nRgcH9H8GhSMKUrDak79bCubrGvXh3VXpGYr7uGgok8=; b=d3sOU79pLI1b44e47oy6+zZjHiwfCdwy97YSZxgVhVXOvZvQsx73rnp7D6AG8fkVW8 gl5iDmaHboaxu3+++2hS1XPEjmksTMFB2p/b3+0bqy79M1dxJK3y8i9GI4oEiuNVLDwU NSa/6Pz3cTF/CUBeRhZ5G7PyC1VoVTX3zB2GJ83mnWcQzVIswJmskqCwpnpCHMaJopaR 7UzYaGlCpaGh3bANznpPgYkqPikQHq4rV4n/vn+yZYOLsX7k77ht/cgMe9Lm0e+WzMtG 9Nq5b/KOFlMmd/Mv0jueoMA9quO9eXx51u7hQVifjd12tqEMh4tFy3wu0+h1mX0vwr7P Vk9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nRgcH9H8GhSMKUrDak79bCubrGvXh3VXpGYr7uGgok8=; b=SWIwKnXxVVkGH56SQuTKx33vWp22IrAznEvCLRv7ON47uDxEeUY2kkzkRd7B8SVDf5 qlfDM6/hi6xhsDr8z95EHj7w9V7MM9CJUoFc4gLin81NI2Lytuv0lYvvCbq9ZUlbgwms AdMHytoXr5SGdaCWEWAVqsLBhriMVMHPIr5Ya/gusL9fpd/3rD70M+/5IXtlc2kFVPu2 vcOEQJ4ch+9HmrRD92syE7BM7QC3GH7wb5bw/WWB4jywZJ87XTStzuk4GFAyX1lRznRg 72TbqIvXAncLSmgz8mz+obov+iRlTd1OqjIZb7neP1GzEnVTRzoiuhlSQZin5E7Hk3c0 hopw== X-Gm-Message-State: APjAAAW7glpONd88bzaMMJO6IY246KaILcic1xb5L44CUTCbfHCLb6UZ dUAC99PwuwwdLokuVZD6PqrMMA== X-Google-Smtp-Source: APXvYqwei+aMTE2+86B5zsI8HrFejHVsUz0J171ZeCoJZ4toh7FVVSAAc+htz+qIUeraJNfHVqoM9w== X-Received: by 2002:ac8:1ae5:: with SMTP id h34mr1425701qtk.323.1582672715669; Tue, 25 Feb 2020 15:18:35 -0800 (PST) Received: from holos.localdomain (c-69-251-56-176.hsd1.md.comcast.net. [69.251.56.176]) by smtp.gmail.com with ESMTPSA id t37sm79322qth.0.2020.02.25.15.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 15:18:34 -0800 (PST) Date: Tue, 25 Feb 2020 18:18:33 -0500 From: Mark Oteiza Message-ID: <20200225231833.GA25695@holos.localdomain> References: <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <20200214225415.GA3947@holos.localdomain> <83lfowjpia.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83lfowjpia.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 21/02/20 at 10:47am, Eli Zaretskii wrote: > > Date: Fri, 14 Feb 2020 17:54:15 -0500 > > From: Mark Oteiza > > Cc: Lars Ingebrigtsen , npostavs@users.sourceforge.net, > > Noam Postavsky , 28257@debbugs.gnu.org > > > > Thanks Noam and Stefan for the catches. New patch below. > > Any further comments? > > I only spotted an occasional single space between sentences in doc > strings, but have nothing else? If there are no further comments, I'd > like to install this. > > Thanks. Pushed as c0fcbd2c119, hopefully adding the missing spaces, and adding :version and a null option to the type of 'eldoc-documentation-function' From unknown Sun Jun 15 01:09:06 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28257: 26.0.50; [PATCH] expose eldoc functions in a hook Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 14:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mark Oteiza Cc: Eli Zaretskii , npostavs@users.sourceforge.net, npostavs@gmail.com, monnier@iro.umontreal.ca, 28257@debbugs.gnu.org Received: via spool by 28257-submit@debbugs.gnu.org id=B28257.159707055525294 (code B ref 28257); Mon, 10 Aug 2020 14:43:01 +0000 Received: (at 28257) by debbugs.gnu.org; 10 Aug 2020 14:42:35 +0000 Received: from localhost ([127.0.0.1]:37096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k590V-0006Zu-1M for submit@debbugs.gnu.org; Mon, 10 Aug 2020 10:42:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k590T-0006Zb-6o for 28257@debbugs.gnu.org; Mon, 10 Aug 2020 10:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=j/udwtrchc9IDie3oR8vxSXefGtSaOv2lBl4BEno6yA=; b=SNFyNNvEyKEFW6b57QVRaNJ8Ab aSxcYajTD9GVe5aNKU2KX+8g6rGhDQnLRhNGnRoan+7G8+OPE5AkNT9WPo8HYUb/4M8aoNxj6ahwk XzHVG8Q7w9m8aBiP/ojXJ131pYBK830B8Pic3cal+EHQLI7B73TEg6OtYkWMH9x02ug0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k590C-0005yk-LC; Mon, 10 Aug 2020 16:42:22 +0200 From: Lars Ingebrigtsen References: <20170828031104.GA15524@holos.localdomain> <87shgb89q1.fsf@users.sourceforge.net> <20170830015017.GA28668@holos.localdomain> <87wohasikq.fsf@gmail.com> <20190626140303.quhh4psgvd3aneyr@logos.localdomain> <20200126234731.GA12794@holos.localdomain> <20200214225415.GA3947@holos.localdomain> <83lfowjpia.fsf@gnu.org> <20200225231833.GA25695@holos.localdomain> Date: Mon, 10 Aug 2020 16:42:15 +0200 In-Reply-To: <20200225231833.GA25695@holos.localdomain> (Mark Oteiza's message of "Tue, 25 Feb 2020 18:18:33 -0500") Message-ID: <87blji1s1k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mark Oteiza writes: > Pushed as c0fcbd2c119, hopefully adding the missing spaces, and adding > :version and a null option to the type of 'eldoc-documentation-function' If I'm skimming this thread correctly, this commit fixes everything discussed in this bug report, so I'm closing it. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mark Oteiza writes: > Pushed as c0fcbd2c119, hopefully adding the missing spaces, and adding > :version and a null option to the type of 'eldoc-documentation-function' If I'm skimming this thread correctly, this commit fixes everything discussed in this bug report, so I'm closing it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 10 10:42:37 2020 Received: (at control) by debbugs.gnu.org; 10 Aug 2020 14:42:37 +0000 Received: from localhost ([127.0.0.1]:37098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k590X-0006a4-7K for submit@debbugs.gnu.org; Mon, 10 Aug 2020 10:42:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k590U-0006Zd-9O for control@debbugs.gnu.org; Mon, 10 Aug 2020 10:42:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+F1zRRh5lk8funRjwjNhGR2cKbiBv5DkeEETlS0fc9M=; b=GQMA104o5nWtT7XVPSZ/9o2/Qj brpdCr/3fWRDPW2yOYauPp0JjCzCR393AU7Ho/LXlN5fYxwjBgPr0fF4YWoUxPkioiwWgUYeEOkLY DgLru0T/DtUZclUKk37QkLOIktS+Crl7WgqJyagm1qNZ8AH3MlVxl729El1ohqvOBDNA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k590M-0005yv-FC for control@debbugs.gnu.org; Mon, 10 Aug 2020 16:42:28 +0200 Date: Mon, 10 Aug 2020 16:42:25 +0200 Message-Id: <87a6z21s1a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28257 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 28257 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 28257 quit