From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: daniela-spit@gmx.it Newsgroups: gmane.emacs.help Subject: Re: RE: RE: Removing line and column number settings from some buffers Date: Sun, 6 Dec 2020 00:53:20 +0100 Message-ID: References: <87czzq9xq5.fsf@web.de> <877dpwvsus.fsf@web.de> <755b3e84-b28a-4116-acec-81dfbfe68058@default> 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="20358"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 06 00:54:25 2020 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 1klhNh-0005DW-R0 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 00:54:25 +0100 Original-Received: from localhost ([::1]:49864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klhNg-0004cJ-PZ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 18:54:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klhMs-0004bz-Gd for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 18:53:34 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:35181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klhMq-0002GC-Bl for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 18:53:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607212401; bh=a93bFjpUf8PVWeDWDqNRoIS+ahhKQNviQji+JXHm8sk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=enhBvTwTVvqmiEeTYl1oGYjaS1NSNu1CMtJRHAj0OuPcoucrQt4ZI3Y5qMBwlW5cs Z5V8mSy3hEhdl5HH155khEaESfHxx2HU4AOmaP5xldA36OOyZ+eqS3If9OXqAO1GSR SWRewDZeku+NorZJMx3lDWYQLDWQ+w6wTPsHGmEQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs06.server.lan [172.19.170.174]) (via HTTP); Sun, 6 Dec 2020 00:53:20 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <755b3e84-b28a-4116-acec-81dfbfe68058@default> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:gBWgRWnZ0CpYaUlZYxIHtGUkdtLaeFYZLBv/g+BJmxvGOUTPPHMQVdwMVzi8RDn0aeZw2 GroTilhLHY+/HOmDI2l+TdZdO6szzNJdlpQH5r1Hzpuk9R5yM/l4Y8Vhwf+kd1bBPddHIIvYRqHq Hq3Wzs5tB/jQ/Xm4kP1O4n7Ov9EqLXqic+23DJyhfTOed9wwgotFk3l9zcHXWxFt9nHg3TJLILKI YwBIfnytxlx5NyPDWblmKiBhsAVgFQOVCFNB0M+PaS87wKPiV8ODAVoGReysxXfCgoBkYwCFB+A2 04= X-UI-Out-Filterresults: notjunk:1;V03:K0:eOxGGu0eKmU=:ZBEi9la+UcjFve/C3xAAYe 9PAVmyUJZfGKvgee0uQcycExvUQlcXA6xQ8DC+qP3GTD+LhDDRC6n9E35GVo6ewqlikfD28Wk dU5QbNfGl1xsz4f+WalRXho2ruwSDUa4772C5spkAfREOtoDXqqYso+wIxs2OqnGGlCQBjOMg l7nIpM93XgTlkok+6jktQ1BFfARBm28sAZRTZ0kDlzqA6StxVwz8a27pAmtWOWyceCAJQ+EDw aMlbtEuPGpY68yA7ibleDAVkDehAGnFK7g7eqDtt5ndrnHGpYXgKoPuWwDFenfE4GKgChYsEm Z06GJ5AqHvSygESP5ibmlI88JgHxst6vwP7etumdWFM0obvZ8ppmQH9jfnGkBAbL9lvoA50K1 oF8gAhqPb6UbyWLNzKiExHado8ynrGtN3MWNhl8PJHQeY3KTgVmrYuUbe4vIziGXx3e7jwMzQ uRvNUbV8g3UO9H4uiNMXlVLhVFtGbkwxMuiOJYK7iTEEgMLE8WPvm/1VHxxkYEOeVuPKFGVlR eI7cNc776WqXSD9CUoX+NudhOZiJB3vXXjCRvVXR0SNMAtkdT3eyJ6Qguc/TVk0izu9Vqob52 3hIeX7N353MDo= Received-SPF: pass client-ip=212.227.15.15; envelope-from=daniela-spit@gmx.it; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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:126064 Archived-At: > Sent: Sunday, December 06, 2020 at 12:37 AM > From: "Drew Adams" > To: daniela-spit@gmx.it > Cc: "Michael Heerdegen" , help-gnu-emacs@gnu.o= rg > Subject: RE: RE: Removing line and column number settings from some buff= ers > > > > > Look at this code. Correct, you don't need a variable for storing= , > > > > but what is happening with n in the following code. > > > > > > > > The byte compiler complains about the variable n > > > > > > > > (defun auto-fill-cycle () > > > > (interactive) > > > > (setq-local n (get 'auto-fill-cycle 'state))...) > > > > > > `n' is a free variable. Add a `defvar' for it, if you > > > don't want Emacs to tell you about that. > > > > Would that be a valid approach or is it just to stop emacs complaining= ? > > Valid. The variable is free in your function. > > > Was considering to use (let (n) ... > > Where are you going to put your `let'? > > You want the value to persist beyond an invocation of > your function, right? auto-fill would be buffer local and the function property 'state' in being changed. Additionally, it is only used so not to use the longer (get 'auto-fill-cycle 'state) for the when condition. Why would you want 'n' to persist beyond an invocation of auto-fill-cycle? I don't see a rea= son to do that. Can do '(let (n)' and close it after setting the state to 1 w= hen the function gets cycled to state 3. With the use of 'let' would I then use the following? (setq n (get 'gungadin-auto-fill-cycle 'state)) >