From unknown Sun Aug 17 01:01:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25069: [PATCH] Improve the doc of eshell-cmpl-* custom variables Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2016 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 25069@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148046147117722 (code B ref -1); Tue, 29 Nov 2016 23:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2016 23:17:51 +0000 Received: from localhost ([127.0.0.1]:46618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBrep-0004bm-D8 for submit@debbugs.gnu.org; Tue, 29 Nov 2016 18:17:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBren-0004bX-Pf for submit@debbugs.gnu.org; Tue, 29 Nov 2016 18:17:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBreh-0000CW-9J for submit@debbugs.gnu.org; Tue, 29 Nov 2016 18:17:44 -0500 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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBreh-0000CS-5c for submit@debbugs.gnu.org; Tue, 29 Nov 2016 18:17:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBref-0001Jf-Nf for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 18:17:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBrec-0000BK-IU for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 18:17:41 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:21379) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cBrec-00009n-8q for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2016 18:17:38 -0500 Received: from localhost (cpe-104-32-170-214.socal.res.rr.com [104.32.170.214]) by mx.zohomail.com with SMTPS id 1480461452325716.2808861741111; Tue, 29 Nov 2016 15:17:32 -0800 (PST) From: Hong Xu Date: Tue, 29 Nov 2016 15:17:27 -0800 Message-Id: <1480461447-15639-1-git-send-email-hong@topbug.net> X-Mailer: git-send-email 2.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] 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.4 (----) 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.4 (----) * lisp/eshell/em-cmpl.el (eshell-cmpl--custom-variable-docstring): Add a new function to generate the docstring for custom variables derived from pcomplete-* variables. --- The current eshell-cmpl-* documentation sometimes made me confused -- they actually show the documentation of pcomplete-*. For example, eshell-cmpl-cycle-completions even has pcomplete-cycle-completions in its doc without explaining the relationship between them. This patch makes the relationship clearer. lisp/eshell/em-cmpl.el | 55 ++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 47467678a68a..e01948cad454 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -136,75 +136,71 @@ eshell-command-completions-alist :type '(repeat (cons string regexp)) :group 'eshell-cmpl) +(defun eshell-cmpl--custom-variable-docstring (pcomplete-var) + "Generate the docstring of a variable derived from a pcomplete-* variable." + (format "%s\n\nIts value is assigned to `%s' locally +after eshell starts." + (documentation-property pcomplete-var + 'variable-documentation) + (symbol-name pcomplete-var))) + (defcustom eshell-cmpl-file-ignore "~\\'" - (documentation-property 'pcomplete-file-ignore - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-file-ignore) :type (get 'pcomplete-file-ignore 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'" - (documentation-property 'pcomplete-dir-ignore - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-dir-ignore) :type (get 'pcomplete-dir-ignore 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-ignore-case (eshell-under-windows-p) - (documentation-property 'pcomplete-ignore-case - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-ignore-case) :type (get 'pcomplete-ignore-case 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-autolist nil - (documentation-property 'pcomplete-autolist - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-autolist) :type (get 'pcomplete-autolist 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-suffix-list (list ?/ ?:) - (documentation-property 'pcomplete-suffix-list - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-suffix-list) :type (get 'pcomplete-suffix-list 'custom-type) :group 'pcomplete) (defcustom eshell-cmpl-recexact nil - (documentation-property 'pcomplete-recexact - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-recexact) :type (get 'pcomplete-recexact 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-man-function 'man - (documentation-property 'pcomplete-man-function - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-man-function) :type (get 'pcomplete-man-function 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-compare-entry-function 'file-newer-than-file-p - (documentation-property 'pcomplete-compare-entry-function - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-compare-entry-function) :type (get 'pcomplete-compare-entry-function 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-expand-before-complete nil - (documentation-property 'pcomplete-expand-before-complete - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-expand-before-complete) :type (get 'pcomplete-expand-before-complete 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-cycle-completions t - (documentation-property 'pcomplete-cycle-completions - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-cycle-completions) :type (get 'pcomplete-cycle-completions 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-cycle-cutoff-length 5 - (documentation-property 'pcomplete-cycle-cutoff-length - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-cycle-cutoff-length) :type (get 'pcomplete-cycle-cutoff-length 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-restore-window-delay 1 - (documentation-property 'pcomplete-restore-window-delay - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-restore-window-delay) :type (get 'pcomplete-restore-window-delay 'custom-type) :group 'eshell-cmpl) @@ -212,15 +208,13 @@ eshell-command-completion-function (function (lambda () (pcomplete-here (eshell-complete-commands-list)))) - (documentation-property 'pcomplete-command-completion-function - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-command-completion-function) :type (get 'pcomplete-command-completion-function 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-command-name-function 'eshell-completion-command-name - (documentation-property 'pcomplete-command-name-function - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-command-name-function) :type (get 'pcomplete-command-name-function 'custom-type) :group 'eshell-cmpl) @@ -231,13 +225,12 @@ eshell-default-completion-function (pcomplete-dirs-or-entries (cdr (assoc (funcall eshell-cmpl-command-name-function) eshell-command-completions-alist))))))) - (documentation-property 'pcomplete-default-completion-function - 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-default-completion-function) :type (get 'pcomplete-default-completion-function 'custom-type) :group 'eshell-cmpl) (defcustom eshell-cmpl-use-paring t - (documentation-property 'pcomplete-use-paring 'variable-documentation) + (eshell-cmpl--custom-variable-docstring 'pcomplete-use-paring) :type (get 'pcomplete-use-paring 'custom-type) :group 'eshell-cmpl) -- 2.1.4 From unknown Sun Aug 17 01:01:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25069: [PATCH] Improve the doc of eshell-cmpl-* custom variables Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2017 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Hong Xu Cc: 25069@debbugs.gnu.org Received: via spool by 25069-submit@debbugs.gnu.org id=B25069.1497096565756 (code B ref 25069); Sat, 10 Jun 2017 12:10:02 +0000 Received: (at 25069) by debbugs.gnu.org; 10 Jun 2017 12:09:25 +0000 Received: from localhost ([127.0.0.1]:37863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJfCm-0000C8-Uc for submit@debbugs.gnu.org; Sat, 10 Jun 2017 08:09:25 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:36650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJfCk-0000Bu-Ux for 25069@debbugs.gnu.org; Sat, 10 Jun 2017 08:09:23 -0400 Received: by mail-it0-f68.google.com with SMTP id 185so5390282itv.3 for <25069@debbugs.gnu.org>; Sat, 10 Jun 2017 05:09:22 -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=Tc7j8UGTJIrYoZDfgcmP9ejrnIj5nwTkoyApDQdx2D8=; b=HDm2bKoYRDODi8AEGhq11UYZQEgjx4H0xAJTCp5CEE1HsVTGYcYvEb0Jpgz8jeeLW9 sKFRSoeLQ/WLnzO0SAYVRM79Ki+F/jFJOftrbMOpwlxjCDDBYPwnZiOXcgNLFu9KStYq TV84oRXlFgGmFNVOn/XTJn2fW2Az2i5537qtD7DauknenbUsCB/6qJAbMwSiulMQh3eJ d+8zVKNlxjYlDDpuX7PULEeB+BFj+nm3z0G4gj53MfDNwB7KnedZD63LJQG44BFKL+eG 04xWho3oDvRsILYJFs88DucOpYwxSX0NZ+pl63YO4Qt2934yXKe0O5gD569ZfrLqMta6 NzUw== 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=Tc7j8UGTJIrYoZDfgcmP9ejrnIj5nwTkoyApDQdx2D8=; b=C7Oqc/o4ar2SsYMU9serwc5Q3DWxHDQOytjWn57njsvG0KdMjMlxPJgD1Pr4qlYpx8 aX3otktkkN68l3JH+yJpXeb/gMztHXbMlI8ezQZ9yNuT4yXCGS+UNf88/GD/UetKlUvY 6pxPl1PaoyfcMzZ+lfwxvE+J2ZL+jsrX3JS//DhDV7u48NRD4HwuKhSYPzeWyER5fsJR s2uJsfWASIJ9v1PA4I5XwOc6SMfF3/WEUvoxWDmnv0m88D76EhfgsBPopBuWQ+L5jiaR vhpLu29B5+tAZrwsY2mJttBDMqfmFOFxWoz9biyg99XabgV75KUQme/tJQyCIAF/gRO1 UAlw== X-Gm-Message-State: AODbwcC6nbhjYJxDH3JERj8XsCz1CT5eSqOGxhBSy4aVsss6ihFnVvSe 9KHkLG7iw46GQJQK X-Received: by 10.36.77.9 with SMTP id l9mr4087476itb.95.1497096557321; Sat, 10 Jun 2017 05:09:17 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e12sm2959197itd.0.2017.06.10.05.09.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2017 05:09:16 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1480461447-15639-1-git-send-email-hong@topbug.net> Date: Sat, 10 Jun 2017 08:10:55 -0400 In-Reply-To: <1480461447-15639-1-git-send-email-hong@topbug.net> (Hong Xu's message of "Tue, 29 Nov 2016 15:17:27 -0800") Message-ID: <87efusvy9c.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.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: -0.0 (/) Hong Xu writes: > + (documentation-property pcomplete-var > + 'variable-documentation) We should pass non-nil for the RAW argument to stop references like \[pcomplete-cycle] from being substituted too soon. From unknown Sun Aug 17 01:01:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25069: [PATCH] Improve the doc of eshell-cmpl-* custom variables Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2017 00:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Hong Xu Cc: 25069@debbugs.gnu.org Received: via spool by 25069-submit@debbugs.gnu.org id=B25069.15096703341532 (code B ref 25069); Fri, 03 Nov 2017 00:53:01 +0000 Received: (at 25069) by debbugs.gnu.org; 3 Nov 2017 00:52:14 +0000 Received: from localhost ([127.0.0.1]:48475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAQDW-0000OZ-KC for submit@debbugs.gnu.org; Thu, 02 Nov 2017 20:52:14 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:47143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAQDV-0000OE-9E; Thu, 02 Nov 2017 20:52:13 -0400 Received: by mail-io0-f179.google.com with SMTP id h70so2930921ioi.4; Thu, 02 Nov 2017 17:52:13 -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=ndtl/bbe6pmG52uW3DFHLyHTMUxU+RiVL+VEr5LvZVw=; b=NilJGWCaGNvmpc5pm5KrAQhB+hkt69N1JNCTU62ZydS/NHEoJBC3CfjEs8CuQ09kUA 8OQeC3LpxJw/ucwg8P7JVXTylKZdTBM8WFy0ueWgV9kVw5z90e+g5irMwIwMIfZj2Tnd 6GndKJ9IfLiurEuIk+ZCrPVABfeEJ67nJqMimdKLkIOWXWeajOB5SNpCbWRW+/4O96Pb a01p8q+B/nzygO9KeSmAsJ6I16Geh+Eu5ZOi8dVX0wJr0sUPFt0lDndKLGLrpxdmp5mA YunzufSJ1kA1th2rTHY8/PX6OyHV+pdIA+/e2E/q4o7ba7N9o/t18IZhtAbndPKjDnJF ijmA== 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=ndtl/bbe6pmG52uW3DFHLyHTMUxU+RiVL+VEr5LvZVw=; b=UjT50ogj4W/bW1/OWgvyfBs1fCCBH2xYuno/MG9zATyOq4PpBCUZybwRy/yOG3w/XH UxCU81/VqyM+o71vXschlye8tTd5t4xiNvietWnR8L4WiT2iLKLAybwvy4eKuiBeglkJ vQDxegOz49mWq/IddkYeq97LiSY9pAl+FR83ezbLefumvhWsDZqINu3j60MdJ/h0T+bN Tzn6mGpiBQw35CxiLLUv7iwhJj7OeXC5xuIK935mnKadoLv+BtFUQ8DUQjtIk8cp4aW5 KWf2VElQrmOAjB2AePnD1ghJ8FkkKhKC1P1Mo5PYbXKkA7pVJaWH03ACPKFnOLkC8eml OQgA== X-Gm-Message-State: AMCzsaUZgdrF7pl/I4VgiuuAOKXAq2aWa5JGeMQmcgds55LPNFMu8sYC SSrabNunjiMkVMm3e6OYbZvcOw== X-Google-Smtp-Source: ABhQp+RMy7JCvZSfJR/IzM3TZOFnYa6kV438PM+nBRN0j5Z4qDadukL2AofLvP54PmCaGO2PUvPRbg== X-Received: by 10.36.91.76 with SMTP id g73mr5116070itb.3.1509670327088; Thu, 02 Nov 2017 17:52:07 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id m145sm1298255itg.4.2017.11.02.17.52.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Nov 2017 17:52:05 -0700 (PDT) From: Noam Postavsky References: <1480461447-15639-1-git-send-email-hong@topbug.net> <87efusvy9c.fsf@users.sourceforge.net> Date: Thu, 02 Nov 2017 20:51:55 -0400 In-Reply-To: <87efusvy9c.fsf@users.sourceforge.net> (npostavs's message of "Sat, 10 Jun 2017 08:10:55 -0400") Message-ID: <87mv4489qs.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (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 (--) tags 25069 fixed close 25069 26.1 quit npostavs@users.sourceforge.net writes: > Hong Xu writes: > >> + (documentation-property pcomplete-var >> + 'variable-documentation) > > We should pass non-nil for the RAW argument to stop references like > \[pcomplete-cycle] from being substituted too soon. Added RAW arg, pushed to emacs-26. [1: ac0bb9a192]: 2017-11-02 20:38:09 -0400 Improve the doc of eshell-cmpl-* custom variables (Bug#25069) https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=ac0bb9a192f1e5de4ddc938b71e5a49d36e48a2d