From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Smartparens documentation question. Date: Sun, 11 Apr 2021 06:54:07 +0200 Message-ID: <87zgy51kwg.fsf@web.de> References: <87o8eoivl7.fsf@rclayton.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39607"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: "R. Clayton" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 11 06:55:11 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVS7r-000AD5-8y for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 06:55:11 +0200 Original-Received: from localhost ([::1]:50180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVS7q-0003Pa-9o for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 00:55:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVS6y-0003PK-9c for help-gnu-emacs@gnu.org; Sun, 11 Apr 2021 00:54:16 -0400 Original-Received: from mout.web.de ([212.227.15.14]:45211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVS6w-00018j-CD for help-gnu-emacs@gnu.org; Sun, 11 Apr 2021 00:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1618116849; bh=Os4eL0ZqZoSuHLkR3HnoqfcjUFis2UxA5mrHlgo4hII=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=SBUDD8deOP8UfSVkyRexSPwIYXzs82QDwgvu1mJabrfsSdKiu8l7mw/arywk7K8at vz4QRY5la+893HZ17Pt0eVuKHC22F50Ty0Msj61NmbsID7xxS97Ry0kTkuJOB2dRLY XIw+tloYhuwD+vwbPM4c+w8Fm+dIdz+og7Syx8Kc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([88.67.96.191]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MQt6E-1l7vCw3JTq-00UGkU; Sun, 11 Apr 2021 06:54:08 +0200 In-Reply-To: <87o8eoivl7.fsf@rclayton.org> (R. Clayton's message of "Thu, 08 Apr 2021 12:34:28 -0400") X-Provags-ID: V03:K1:L7nWxc+ic2BP2LpYajX7iNhuOo3A3+vCfI+Y4kHH/QTncyyS5zr UONKFzARuXwNJgbNjTTRLKs+wdJFYZruGAawiTpje+JvfmeT3Nb29g7gepsyKv3BkPRYVBK vvbfgW8VES+4a7mCcBSFTdG4ZZ/iZ4m+/3N/B039+t69EFvSYpGZEyRwP56j/MWvaETe1jc zpwBT0O8l+wAapvp6MIFQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:HJyCOGMC5uc=:V1GSM4KgMAD1lnVY/2T3mk /m9wW+qHSW24gG1ERrSq88jDTmLYU2aJPtxRTZwzDERFmjcCnhCa3Dxx09YCa/+Xg4G4b2Gy1 1vwuXb7R12XJtl3NGg7bbzcZSxOboLowdosFwKQKefyp2C7bo4TOy/MQFn7WVWaAA0g/QDz5C +HCITq5DwHAou9XbDP4QFnVqoUS4yNxow17xg3PuTi42ajl/q58zobL49GVC2b5Jlr77iaT6T nZUbFIy0T8p6a73ugwG0G/j7Junf85ugoSpuKzEmw4lTWdvKV9KuImecSlLDlikv/4uUz41mP 3HAz9YuwUfZFU6Z0wT/h7dge7KZsA4M92Fx8Bgg0hf4tunfUNJbRDMzdWnIyLa41wRJlOiHUt d8uqFK0+m/w9SYC/TEGURS07aVENf8E3JnLxOgnOZY0ugJMT6JxUDJfeaTW8jPI17nzxAe3cm 0yenXtjC9HTALP593LnjCZssdiWEMeAvZefn+6vycmYHclh4o6K4suWldQx3EhaZ4aHUxWEeR 7MpIAhPl4e0/X4pnUXEw++ytvXDaZF6GTrIXBm/BHyFQ/S44Ds6zcj0jnfdrmBro4D8iwMmkk e7bfAsh9H1ptNRakAH85/4d6nxV8KV5hsIWcnNb2W7t4mTSQST/LpOfuGjCPHQY/eVE0cJmOu qNKWk+hVXWKR9cv5y2OhO6E3gPIJx8Bs0C8uYrMyeEX1QC6ke79X/zWscivdK//6cDzAWE4lB NwF39mXr6G9oCAJIiUzbkCj8nbAhsdk4/TuD7rajToms7vcrDJi+zlZ1SrqtqMyqINEqqQTA Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128940 Archived-At: "R. Clayton" writes: > In smartparens I read in the documentation for the function > show-smartparens-mode that > > If called from Lisp, also enable the mode if ARG is omitted or nil, and > toggle it if ARG is =E2=80=98toggle=E2=80=99; disable the mode otherwis= e. > > This strikes me as backwards, because I thought the idiom is nil args turn > things off and non-nil args turn things on, but ok, sure, maybe it's a > minor-mode thing. The (currently) correct idiom is (`define-minor-mode'): When called from Lisp, the mode command toggles the mode if the argument is `toggle', disables the mode if the argument is a non-positive integer, and enables the mode otherwise (including if the argument is omitted or nil or a positive integer). > However, poking around in smartparens.el shows > > ;;;###autoload > (defun turn-on-show-smartparens-mode () > "Turn on `show-smartparens-mode'." > (interactive) > (unless (or (member major-mode sp-ignore-modes-list) > (and (not (derived-mode-p 'comint-mode)) > (eq (get major-mode 'mode-class) 'special))) > (show-smartparens-mode t))) That would be correct code if the docstring of `show-smartparens-mode' is wrong. AFAIR these details (which arguments exactly turn the mode on and off) were subject to change in the recent past. You might want to contact the author of smartparens so he or she can correct the docstring or whatever is wrong. Thanks, Michael.