From unknown Fri Jun 20 07:23:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49116 <49116@debbugs.gnu.org> To: bug#49116 <49116@debbugs.gnu.org> Subject: Status: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? Reply-To: bug#49116 <49116@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:23:09 +0000 retitle 49116 28.0.50; Why `bound-and-true-p' is not working in lexical bin= ding? reassign 49116 emacs submitter 49116 Jean Louis severity 49116 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 07:42:24 2021 Received: (at submit) by debbugs.gnu.org; 19 Jun 2021 11:42:25 +0000 Received: from localhost ([127.0.0.1]:58648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luZMm-0005j9-Hh for submit@debbugs.gnu.org; Sat, 19 Jun 2021 07:42:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:47930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luZMk-0005j1-JN for submit@debbugs.gnu.org; Sat, 19 Jun 2021 07:42:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luZMj-0007Fs-J4 for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 07:42:22 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:52471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luZMh-0007Zg-Nj for bug-gnu-emacs@gnu.org; Sat, 19 Jun 2021 07:42:21 -0400 Received: from localhost ([::ffff:197.157.0.61]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000D9938.0000000060CDD7F9.00007568; Sat, 19 Jun 2021 04:41:44 -0700 From: Jean Louis To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? Date: Sat, 19 Jun 2021 14:39:54 +0300 Message-ID: <861r8yozg5.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.170.207.13; envelope-from=admin@protected.rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: 32 X-Spam_score: 3.2 X-Spam_bar: +++ X-Spam_report: (3.2 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_SBL_CSS=3.335, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.9 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: When I evaluate following it is not detecting variable `direction' under lexical bindings: (defun verify-direction (timestamp &optional direction) (cond ((bound-and-true-p direction) (message "OK")))) Content analysis details: (3.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [197.157.0.61 listed in zen.spamhaus.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [197.157.0.61 listed in dnsbl.sorbs.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=admin%40protected.rcdrun.com; ip=209.51.188.17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Debbugs-Envelope-To: submit 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.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: When I evaluate following it is not detecting variable `direction' under lexical bindings: (defun verify-direction (timestamp &optional direction) (cond ((bound-and-true-p direction) (message "OK")))) Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [197.157.0.61 listed in zen.spamhaus.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [197.157.0.61 listed in dnsbl.sorbs.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=admin%40protected.rcdrun.com;ip=209.51.188.17;r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager When I evaluate following it is not detecting variable `direction' under lexical bindings: (defun verify-direction (timestamp &optional direction) (cond ((bound-and-true-p direction) (message "OK")))) (verify-direction "10:00" t) =E2=87=92 nil I would like to understand if it is intended to be so?=20 Or is this possible bug? In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, c= airo version 1.17.4) of 2021-06-02 built on protected.rcdrun.com Repository revision: 09081ca119c3debcc72159a46d3bafabfd7519bb Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Parabola GNU/Linux-libre Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=3Dexwm-xim locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 53041 4440) (symbols 48 7128 3) (strings 32 19321 1728) (string-bytes 1 630312) (vectors 16 13239) (vector-slots 8 175206 9539) (floats 8 21 34) (intervals 56 201 0) (buffers 992 11)) --=20 Thanks, Jean Louis Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 08:49:21 2021 Received: (at 49116-done) by debbugs.gnu.org; 19 Jun 2021 12:49:21 +0000 Received: from localhost ([127.0.0.1]:58726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luaPY-0001Ph-Um for submit@debbugs.gnu.org; Sat, 19 Jun 2021 08:49:21 -0400 Received: from smtp-4.orcon.net.nz ([60.234.4.59]:32829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luaPU-0001PX-Tz for 49116-done@debbugs.gnu.org; Sat, 19 Jun 2021 08:49:19 -0400 Received: from [10.253.37.70] (port=48660 helo=webmail.orcon.net.nz) by smtp-4.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1luaPS-0006F3-Vq; Sun, 20 Jun 2021 00:49:15 +1200 Received: from ip-116-251-162-85.kinect.net.nz ([116.251.162.85]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Sun, 20 Jun 2021 00:49:14 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sun, 20 Jun 2021 00:49:14 +1200 From: Phil Sainty To: Jean Louis Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical =?UTF-8?Q?binding=3F?= In-Reply-To: <861r8yozg5.fsf@protected.rcdrun.com> References: <861r8yozg5.fsf@protected.rcdrun.com> Message-ID: <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49116-done Cc: 49116-done@debbugs.gnu.org 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 (-) On 2021-06-19 23:39, Jean Louis wrote: > When I evaluate following it is not detecting variable `direction' > under lexical bindings: > > (defun verify-direction (timestamp &optional direction) > (cond ((bound-and-true-p direction) (message "OK")))) > > (verify-direction "10:00" t) ⇒ nil > > I would like to understand if it is intended to be so? > > Or is this possible bug? This is expected / not a bug (and so I'm closing it). (bound-and-true-p VAR) is syntactic sugar for (and (boundp 'VAR) VAR) which means that it works only for dynamic variables (i.e. variables stored in the value slot of a symbol). Under lexical binding, function arguments are lexical variables, which means they are not stored in the symbol of that name, and hence cannot be detected with `boundp'. In your case there's no need to be checking whether `direction' is "bound" -- whether it's lexical or dynamic, you already *know* that it exists because it's an argument for the function in which you're checking it. All you want is the "true-p" part, which is implicit in every value (either nil or non-nil). Instead of "(bound-and-true-p direction)" just use "direction". -Phil From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 08:55:01 2021 Received: (at 49116) by debbugs.gnu.org; 19 Jun 2021 12:55:02 +0000 Received: from localhost ([127.0.0.1]:58733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luaV3-0001Y2-Jf for submit@debbugs.gnu.org; Sat, 19 Jun 2021 08:55:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luaV1-0001Xo-13 for 49116@debbugs.gnu.org; Sat, 19 Jun 2021 08:55:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35620) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luaUu-0001oI-0u; Sat, 19 Jun 2021 08:54:52 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3585 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luaUt-00087S-KL; Sat, 19 Jun 2021 08:54:51 -0400 Date: Sat, 19 Jun 2021 15:54:59 +0300 Message-Id: <83lf76vwt8.fsf@gnu.org> From: Eli Zaretskii To: Phil Sainty In-Reply-To: <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> (message from Phil Sainty on Sun, 20 Jun 2021 00:49:14 +1200) Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49116 Cc: 49116@debbugs.gnu.org, psainty@orcon.net.nz, bugs@gnu.support 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 (---) > Date: Sun, 20 Jun 2021 00:49:14 +1200 > From: Phil Sainty > Cc: 49116-done@debbugs.gnu.org > > (bound-and-true-p VAR) is syntactic sugar for (and (boundp 'VAR) VAR) > which means that it works only for dynamic variables (i.e. variables > stored in the value slot of a symbol). > > Under lexical binding, function arguments are lexical variables, which > means they are not stored in the symbol of that name, and hence cannot > be detected with `boundp'. Should this be mentioned in the doc string of bound-and-true-p? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 09:02:08 2021 Received: (at 49116) by debbugs.gnu.org; 19 Jun 2021 13:02:08 +0000 Received: from localhost ([127.0.0.1]:58742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luabw-0001ju-Gg for submit@debbugs.gnu.org; Sat, 19 Jun 2021 09:02:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luabu-0001jN-67 for 49116@debbugs.gnu.org; Sat, 19 Jun 2021 09:02:06 -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=OIdkiriYfCp3gsMw7z4MSyGc6L5N9uKI2PTo8+cwgnk=; b=ZFqjWW45p/0oscKcQdf2w7j4nS IVPG6hNruq8ViP40uqVl4J6oKuifgLaNbfWmS2hpdv1bqan4RnRHkqfDc5UeRb6b8WmOnuRdXIuho KzHzEk4YVAEMZxePLVTO6V1LifuN8uDe/IrmzirB4YFHPiaMGN3gVpn80xOsWFia8Yco=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luabl-0002XS-0u; Sat, 19 Jun 2021 15:01:59 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> <83lf76vwt8.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXZNRbnOBakVypc Rx0dFhC3p1n////YFjVIAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UGEwwuKQceRWQAAAG2SURBVDjL dZTBcuMgDIah272bnem9hnBPEb53LOUBilfv/yqVAMe4SXXwAJ+kHwmwsc5Z85LpKoPBJmP1cyHC M3ANkNjHI3B/FHz+SGWeA1fB5RGYmur1AZj4XOOf5wZAwDwoM/gKpvcMeD1A3BDMVFO+m4xDQAYy XHPOhiLfAwJANvylIvPEYuIsExmUACbyrOAvV/Li3BsXLyEmxTK71ytEBVMRgeK9poLE/HUBrKB4 5g3EMilYWIE4Mt+4LFoUCQAGviD64hNvq4eFoYMlSEEEPkHKtyDbDrmBtCWWEej0VlCUMqExCBBA AWWEjB18uAYW8ca4bMLQ+0BknSEBC/yXVLAmPTEQ7VXaRwhh3TS/xCJh3eusQBYwZl1ZpKnqoQEK ZJIEAC2BsALbAdU5pNhqbjesgWqpVkLUjtLsAUScq0I/4gZqE9Jd+ABaUzd7ArFkGoSfgT2gvQBM voPV/QChg+OetjoAam0wvJ4d5FbOfE4ljcrtY8cI7BuSMo/7W0EXlv4OF3toojicI+Bgn2eQ78Da X4A7RfRcmQD1edhDfBdBBfJLkKc/TUMdMtLV3UawDuAb74jGAZ7dpuoAAAAldEVYdGRhdGU6Y3Jl YXRlADIwMjEtMDYtMTlUMTI6NDY6NDErMDA6MDC+HJ4KAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIx LTA2LTE5VDEyOjQ2OjQxKzAwOjAwz0EmtgAAAABJRU5ErkJggg== X-Now-Playing: Oh Sees's _Face Stabber_: "Scutum & Scorpius " Date: Sat, 19 Jun 2021 15:01:56 +0200 In-Reply-To: <83lf76vwt8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Jun 2021 15:54:59 +0300") Message-ID: <87lf760zzv.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: Eli Zaretskii writes: > Should this be mentioned in the doc string of bound-and-true-p? I think so. 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.7 (/) X-Debbugs-Envelope-To: 49116 Cc: Phil Sainty , 49116@debbugs.gnu.org, bugs@gnu.support 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 (-) Eli Zaretskii writes: > Should this be mentioned in the doc string of bound-and-true-p? I think so. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 09:13:26 2021 Received: (at 49116) by debbugs.gnu.org; 19 Jun 2021 13:13:26 +0000 Received: from localhost ([127.0.0.1]:58766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luams-00021w-En for submit@debbugs.gnu.org; Sat, 19 Jun 2021 09:13:26 -0400 Received: from smtp-4.orcon.net.nz ([60.234.4.59]:33815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luamr-00021p-12 for 49116@debbugs.gnu.org; Sat, 19 Jun 2021 09:13:25 -0400 Received: from [10.253.37.70] (port=34397 helo=webmail.orcon.net.nz) by smtp-4.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1luamp-00075B-1A; Sun, 20 Jun 2021 01:13:23 +1200 Received: from ip-116-251-162-85.kinect.net.nz ([116.251.162.85]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Sun, 20 Jun 2021 01:13:22 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 20 Jun 2021 01:13:22 +1200 From: Phil Sainty To: Eli Zaretskii Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical =?UTF-8?Q?binding=3F?= In-Reply-To: <83lf76vwt8.fsf@gnu.org> References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> <83lf76vwt8.fsf@gnu.org> Message-ID: <80a8a99b4e90c7508a88bb3b98f8545a@webmail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49116 Cc: 49116@debbugs.gnu.org, bugs@gnu.support 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 (-) On 2021-06-20 00:54, Eli Zaretskii wrote: > Should this be mentioned in the doc string of bound-and-true-p? It wouldn't hurt, and I see that `boundp' has such a note: "Note that if `lexical-binding' is in effect, this refers to the global value outside of any lexical scope." That same text could be used. If the confusion is over whether function arguments are dynamic or lexical then the doc change might not explain things, but it would probably hint at the source of the confusion. -Phil From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 09:21:59 2021 Received: (at 49116) by debbugs.gnu.org; 19 Jun 2021 13:21:59 +0000 Received: from localhost ([127.0.0.1]:58791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luav9-0004T6-3J for submit@debbugs.gnu.org; Sat, 19 Jun 2021 09:21:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luav7-0004Ss-JB for 49116@debbugs.gnu.org; Sat, 19 Jun 2021 09:21:58 -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=rpgA1swNf2E728ztc7RymWjhe5YN2eK9HVgy0ZOzkDw=; b=oM329QuKvIt2eW2Mp3GJzr7/eH IHMFAmjcw/Xp+ikQbbDh0LmCTIlHeatPg96F/nskUQjRN2tGk+o3BSGW273cctMozB0UAvCpXMlmk ECbKTW86g7uMhYLpyKyt6pniNaPGD+E29jfUroolRlsGZEAFZfcYDxtZmbx5fUJSE37w=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luauy-0002s0-4T; Sat, 19 Jun 2021 15:21:51 +0200 From: Lars Ingebrigtsen To: Phil Sainty Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> <83lf76vwt8.fsf@gnu.org> <80a8a99b4e90c7508a88bb3b98f8545a@webmail.orcon.net.nz> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXZNRbnOBakVypc Rx0dFhC3p1n////YFjVIAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UGEwwuKQceRWQAAAG2SURBVDjL dZTBcuMgDIah272bnem9hnBPEb53LOUBilfv/yqVAMe4SXXwAJ+kHwmwsc5Z85LpKoPBJmP1cyHC M3ANkNjHI3B/FHz+SGWeA1fB5RGYmur1AZj4XOOf5wZAwDwoM/gKpvcMeD1A3BDMVFO+m4xDQAYy XHPOhiLfAwJANvylIvPEYuIsExmUACbyrOAvV/Li3BsXLyEmxTK71ytEBVMRgeK9poLE/HUBrKB4 5g3EMilYWIE4Mt+4LFoUCQAGviD64hNvq4eFoYMlSEEEPkHKtyDbDrmBtCWWEej0VlCUMqExCBBA AWWEjB18uAYW8ca4bMLQ+0BknSEBC/yXVLAmPTEQ7VXaRwhh3TS/xCJh3eusQBYwZl1ZpKnqoQEK ZJIEAC2BsALbAdU5pNhqbjesgWqpVkLUjtLsAUScq0I/4gZqE9Jd+ABaUzd7ArFkGoSfgT2gvQBM voPV/QChg+OetjoAam0wvJ4d5FbOfE4ljcrtY8cI7BuSMo/7W0EXlv4OF3toojicI+Bgn2eQ78Da X4A7RfRcmQD1edhDfBdBBfJLkKc/TUMdMtLV3UawDuAb74jGAZ7dpuoAAAAldEVYdGRhdGU6Y3Jl YXRlADIwMjEtMDYtMTlUMTI6NDY6NDErMDA6MDC+HJ4KAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIx LTA2LTE5VDEyOjQ2OjQxKzAwOjAwz0EmtgAAAABJRU5ErkJggg== X-Now-Playing: Oh Sees's _Face Stabber_: "Psy-Ops Dispatch" Date: Sat, 19 Jun 2021 15:21:47 +0200 In-Reply-To: <80a8a99b4e90c7508a88bb3b98f8545a@webmail.orcon.net.nz> (Phil Sainty's message of "Sun, 20 Jun 2021 01:13:22 +1200") Message-ID: <87tuluyopg.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: Phil Sainty writes: > It wouldn't hurt, and I see that `boundp' has such a note: > > "Note that if `lexical-binding' is in effect, this refers to the > global value outside of any lexical scope." > > That same text could [...] 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.7 (/) X-Debbugs-Envelope-To: 49116 Cc: 49116@debbugs.gnu.org, Eli Zaretskii , bugs@gnu.support 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 (-) Phil Sainty writes: > It wouldn't hurt, and I see that `boundp' has such a note: > > "Note that if `lexical-binding' is in effect, this refers to the > global value outside of any lexical scope." > > That same text could be used. I've now copied over that text to the doc string of bound-and-true-p. > If the confusion is over whether function arguments are dynamic > or lexical then the doc change might not explain things, but it > would probably hint at the source of the confusion. Yup. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 21 13:01:15 2021 Received: (at 49116) by debbugs.gnu.org; 21 Jun 2021 17:01:15 +0000 Received: from localhost ([127.0.0.1]:36872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvNIR-0003x1-Gt for submit@debbugs.gnu.org; Mon, 21 Jun 2021 13:01:15 -0400 Received: from mout.web.de ([217.72.192.78]:47057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvNIO-0003wj-I9 for 49116@debbugs.gnu.org; Mon, 21 Jun 2021 13:01:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1624294827; bh=gLMpkGw6rxcPbdGGhOMHQI3zxU11/ALlvtvfw0xRHWA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=qep/h21dWCg/NUcWvTs4Q82hPoELnNpOuHwF2IAsRFl7VKmPFU9Ga/DTJYfGG/uq/ ePGKUWLV18oz0ki7XhmBHgW0m2oTslDGz3hnpVD8UpPxHXGyLxukN2y1Rwb6tKy3rE acA7mwdD8y2d2hhY0gbY1xZi7TlxVkho3+KQwqh0= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([178.6.28.156]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mdf8F-1lMJRq0ruT-00Zew9; Mon, 21 Jun 2021 19:00:27 +0200 From: Michael Heerdegen To: Lars Ingebrigtsen Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> <83lf76vwt8.fsf@gnu.org> <80a8a99b4e90c7508a88bb3b98f8545a@webmail.orcon.net.nz> <87tuluyopg.fsf@gnus.org> Date: Mon, 21 Jun 2021 19:00:26 +0200 In-Reply-To: <87tuluyopg.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 19 Jun 2021 15:21:47 +0200") Message-ID: <87sg1b2lw5.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:DNvPXj1n16msmDvnbvsziEYfVOKJprnOtoZWhuycKcyk5byj1R1 196E/xeVGs1ToHQLMcBRtz/zRlBtjsIDQUA7t78JIA/0q/9caNiEdRArVp9UcIbHr8QbRGG buJaZiIMpmDeMRIUNgO4zWBLrcGUsYzhFlDZwwA47JYK3wXmhq+PPu0YzUkGQVhkpNQXaJc wGAzVBcUqq2s92maspsAQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:GRkktEC3f0c=:gA/SGVlNbUIkeRZLtGg42H 6jVmste2+eOjhODJIjlCJuGb1BPpjn3RyaXcQ4rFVzh7FVsSDluCjNR/s+pEwxk2aovpxLuUs IA0bbtVu6JU6612Z/VcubrraIaDiXInKzaBQunNmJvMktyWsqcZjl1Ey827S/MgRny7DxU1fl jth/MPGiNc3SbDiCATd1MtiUZjVd4uYo4Zg+iBlN884+wGnDY+YIXa7uSWWDezC50QgEs2d1l X8M32bCfh9jNvjQVh3PS3J+HZTEwLiDlAbPiE5M8FkIbrzir360KSvCGoCJNlm3jVdESaa+7u EWYc1rbFnVhrR1iS83KgLXGvxI+4cjjRXx6/37tpjx5PWsDp3HrVR0QYhf2sssyHQ2afYFEn/ TuOWLFJE7I/SW2blx+sKCIfbpndozqv+6scyvC7snV49jTDT/rCztnIn96UApwdksknDWY0jW SF0J08/1z83jYfCYdM/Bi8euC8CpRIB57xqFTniIY6YqzZt+HY4SiPwx/8ctM1k8hi3ucPnrw IzIJZF4VwbMCJV50eB1Zvih9kahPCmY26r/6lFP4Yvxv5EHp73l/jt+OvIF3y6xDqd22+NyrA rLgXx+EAKOSpktEAJrPUf+fKQs+qDrvSM08sXlyPxCNmwo5fLk2UyRAM4HWkkkLE3wB4xrnW0 ZuG1cjuCpsPr3EREu0TIS6oODBWtqo1WReMr25KIFfGZzT38ptVpa9Gbp3UpaFubHEHPTl0Sx ztCFr2bisKYcWpmYADxZGnTXSr93+yMql25Per6d4o1FiE7UW+xKAJSwXlpFocHi/F+BZDY1k fHjU26MzGcexy1Fkns5UCtZ/15eU1IpQdZUWRuamh2zL2Bpg3c83UzxSbREZSV7KdyGu9Zc6k D5YjjoLXf0vlWLJfr/ZnRWK7HfxQvB4I/RXKC/GOT64QPVdAaBbjnnRC8n6GPenPtxlfmHFdt RXTkQ+P427Na+LNo44+PMpCicRtGJodFTAos1AZhfJZHPHXgP9cuUAIJjO6eIL5RcOdx9bmw1 P2CdZyb+NjxBSYxIL+/YxXsxIemkIwY9Mdcgy79IpNauIZkBisjiv+WAP/HIocEX2Fp8Upfra twZk2jxDiRwwAxFan5eUbyg9XBdZdJCFW36nRdrjaR0jP/rUmJj9nzBTA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49116 Cc: Phil Sainty , 49116@debbugs.gnu.org, Eli Zaretskii , bugs@gnu.support 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 (-) Lars Ingebrigtsen writes: > I've now copied over that text to the doc string of bound-and-true-p. You now changed the text to this: > Return the value of symbol VAR if it is bound, else nil. > Note that if `lexical-binding' is in effect, this function isn't > meaningful if it refers to a lexically bound variable. If you want feedback: I found this new version confusing, although it's totally correct. Because in my mental model, `bound-and-true-p' just receives a variable (i.e. internally quotes), so how _can_ it even "refer" to the lexical variable at all? But it is true: #+begin_src emacs-lisp (let* ((a 1) (get-a (lambda () (list a (bound-and-true-p a))))) (dlet ((a 2)) (funcall get-a))) ;; -> (1 1), not (1 2) as one might expect #+end_src Everything became clear when I looked at the implementation ;-) Maybe we can further improve the text to something like "not meaningful in the scope of a lexical binding of the variable" or something like that? Thanks, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 22 09:00:05 2021 Received: (at 49116) by debbugs.gnu.org; 22 Jun 2021 13:00:06 +0000 Received: from localhost ([127.0.0.1]:38069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvg0b-0007hs-G3 for submit@debbugs.gnu.org; Tue, 22 Jun 2021 09:00:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvg0a-0007dJ-2V for 49116@debbugs.gnu.org; Tue, 22 Jun 2021 09:00:04 -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=TJD6BSU5OvtatBtiah0GR8og9nOg/ZEzMst/HKDy7O4=; b=iEhRmM/DoLhReLSM+Cy+0J98mX 5xgYUQCBJXZUIwhZ0Z0jjCLcCIeJX4p/wC8qsTiW55fC5jQUAzlF1pltHJoXupklq3pzCjZXDIKvR dCQxPHdQPYZUKVDGWgtY501zGZrqRRcM1JjSwhSQhWAlAHj9yLOyWz36dQIIlR0V4A3k=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvg0M-0006Uw-Tv; Tue, 22 Jun 2021 14:59:54 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> <3157c274e97fc9db7ceb345ba020f74b@webmail.orcon.net.nz> <83lf76vwt8.fsf@gnu.org> <80a8a99b4e90c7508a88bb3b98f8545a@webmail.orcon.net.nz> <87tuluyopg.fsf@gnus.org> <87sg1b2lw5.fsf@web.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUPCQ0tFyFeMD+R R0e4nJb///8GzD2mAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UGFgw5GROaAWwAAAGzSURBVDjLrVNR duMwCBRJDyBID2ChPUAjfIC21v3PtAOSHXu3n+UlzzGjgRlEUppBKXFOKe/v+MWRoUyMJ/MOSEEK ecARB4VpPNIEjlLEmaPKyMuLwUw8g8qFM/GCbJnVaMgk1GMtyq9wmeiLHoooO1iGNm8hDmgD6Hk4 gEFk8bGmZlq1HGYAeBFrzarWNnTlkCMVx3G4ebFymM8s6+Y5dqq+hsJcV2eImxA5zYurGRAHdKia 3lnRo2kUilr+lQIX4owy83hCNsKHKFKLW6yuwfnaWMI3OVm9V0RQx/0ILKKErb1v5rprw117mzhk 1nu3J95rteklEJzvqxNczrxeCUFrtzBHtdTBwJHFL1+nN/HmA9jiqJQ88rMUu3Yfhs+QsrcYwMOg DhdcG4fJA7i1UZtEd5M21veI20y3aG7uMrZ0XgLy8SIDeMydhaOxPZDyhbmk26lkAE3zd6L1nzSA J6PK/XnJxWCWnO6Z2hm4fQQKYEn3M/C2jEnJ4/Pa+s+Qleh9S3Rm9GU/saRLPCf97Sv9GNT/m1UM UfqLsP9PsYnYjO8TW/dI2/XvGxuC8Vr6vfgLgDNKnsCRCuQAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjEtMDYtMjJUMTI6NTc6MjUrMDA6MDCrMXdZAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA2LTIy VDEyOjU3OjI1KzAwOjAw2mzP5QAAAABJRU5ErkJggg== X-Now-Playing: Genesis's _And Then There Were Three_: "Down And Out" Date: Tue, 22 Jun 2021 14:59:50 +0200 In-Reply-To: <87sg1b2lw5.fsf@web.de> (Michael Heerdegen's message of "Mon, 21 Jun 2021 19:00:26 +0200") Message-ID: <87o8byqcl5.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: Michael Heerdegen writes: > Maybe we can further improve the text to something like "not meaningful > in the scope of a lexical binding of the variable" or something like > that? 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: -2.3 (--) X-Debbugs-Envelope-To: 49116 Cc: Phil Sainty , 49116@debbugs.gnu.org, Eli Zaretskii , bugs@gnu.support 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 (---) Michael Heerdegen writes: > Maybe we can further improve the text to something like "not meaningful > in the scope of a lexical binding of the variable" or something like > that? But I don't think that's correct, because the function takes a symbol that refers to a variable -- and not a variable. :-) Explaining why something doesn't make sense is often more complicate than explaining how something works. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 22 19:00:57 2021 Received: (at 49116) by debbugs.gnu.org; 22 Jun 2021 23:00:57 +0000 Received: from localhost ([127.0.0.1]:40053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvpO4-0007Qj-Ux for submit@debbugs.gnu.org; Tue, 22 Jun 2021 19:00:57 -0400 Received: from mout.web.de ([212.227.17.12]:56523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvpO3-0007QV-1P for 49116@debbugs.gnu.org; Tue, 22 Jun 2021 19:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1624402817; bh=p4nDmeVoRCPwfvZORAt0+4BJORfzIiYkizocOrOQCUI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=E9tQeU5OaNSx/p1x+lhxgectb+sbWHwxlt0drGyGbDL+Ek+iJSGBfDqfH/KXDfdWT N9/iKbbtfLHa2MnzYD3Oljay7DXuXO2RjcIlEX6gyCxUUxrKRTbHF+mZkjIoHMyH4s HQu6x+yqZWaBgCNTjK08IgJ1FcFQg37XPe3dWBrg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([178.6.28.156]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LtFYd-1lFmHq2JqN-012m4I; Wed, 23 Jun 2021 01:00:17 +0200 From: Michael Heerdegen To: Jean Louis Subject: Re: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding? References: <861r8yozg5.fsf@protected.rcdrun.com> Date: Wed, 23 Jun 2021 01:00:11 +0200 In-Reply-To: <861r8yozg5.fsf@protected.rcdrun.com> (Jean Louis's message of "Sat, 19 Jun 2021 14:39:54 +0300") Message-ID: <87h7hptshw.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:HO92XYeJtPSdR6cMvDZNHVBJxMpvX5FleLYw6lOz32vmZLLeCRp sDQu8+nE2lLKvrcMaeeggApdRVHG4L7YuX7p9CCoPxImq0WKdbrzyuzaw1O4iiRUiJOopiL mXcnl2kAGJ7ET26ILnvTdJQSLj7pKdEgvuytByJmmfoXTB0JWpPg03PCl5fW8gEnQbGpc53 SEmGzKqMB1rR11QwwLDXw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:QBjcP7XHap8=:Dl6BVHeB0QeBx8wPJhRvif G6bgiKbQQ4jqG6Prd5doCQQagFCKdwPNU5XyBKfwM6qIyUZc6w/8eS84PS/cNFVr2/drWNirk Sk3jzOEq74oYTyhjCdFcok67do3EL9NQMxYL5IzXH4a0uY1h5gu27TwAXUoRJ1b4vDuBa+NVa 3o8l3M9Iic0C7Y456r4qvhmHQjBrMkYD8TNL2XAyTeA1SIb5bY87uEZgZpIOaFFrBtmyNRYwF sXe3ux0TkHicJ62TR6w892t3Dx31/RVtNDmyvXRChr7wJLCRh2EUzQemmNQfuuAYPOhMUAUHm cmLSw3lZpHFjhmTFPRSocs05ta6jFOl7NL3gIwlfABpfB0Wo/6o8ol0wZXo62FmqXcBEiRz/2 kFB5V5DmDsReSn8MiNFuEjBRNtLL3LfVeN2wa9CibNS7IhXc1hdaSXoW+Djg3FaS9ts1I1lAV h/RGbIt2QXykHTosv6xDbG7VqQhhU+6BHepLzXQBsdXSDv/8HxuobVTEByej8DzB8T658iLSk 5VKirn7WTut+L1v2tkHtqheLYCH1VoRjhdqHnRo4DAB5z6sn8Bnh+DDgK796+ml25JgxA0hlE 32Uu9y0XRJodZdzs37jp5FUvwy4URwxoWnDbs4UO71vBfM2u5i/am9h6WRGb5H9InnA88E8x1 6f9sRtyjHiFOGYXQq1mGgULkfhHTM2imw7a3D0P3+ePlQOxuUuph/qdh0lMoJe1DsiAuQB2ZE BSkfIsL+TLr3Zt9VGoeYTx+uihTSQ8RnLoTXxxoHaM2aEthWtIGTihUG6nHoWhHcDfgN6wx/K nm92yISJP1ZbjSk+74qRww7yCllE2J+BXR8GMO4QZfdh9cRWHZAS7MP5rfIDfwVFESEQMpelZ Ne8mUnx9/zkrLSZs5xpweJsKV+gsQ5ivITdYXrxxKZp6yWWs1INu8FzvtnE1vHXC6ZIC1jvbJ XnIhuvieFsmX4tK+RIHDsvpBiNJ1bi9FSLG9xCxPbuFD2I+CsCzj2rRZ83mljKhdJzOROuMeU bwMqMTXotLu6yPVqpyI5WktgvwCGCVC/m2Iu/HYk0J2767hrB2g8HOb0iFSJ9BcOVhk3bJO71 SSGhRbj1bBdfq8TwGvfV4Nr4pTdef2NLAUoK1vnA6KTA3uWA+2ENhy45A== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49116 Cc: 49116@debbugs.gnu.org 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 (-) Jean Louis writes: > (defun verify-direction (timestamp &optional direction) > (cond ((bound-and-true-p direction) (message "OK")))) > > (verify-direction "10:00" t) =E2=87=92 nil BTW, if your original intention was to check whether a function argument has been specified in a function call (including nil) -- optional arguments in `cl-defun' support such a feature. Michael. From unknown Fri Jun 20 07:23:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Jul 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator