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: Removing line and column number settings from some buffers Date: Sat, 5 Dec 2020 23:54:51 +0100 Message-ID: References: <87sg8mbkpt.fsf@web.de> <87czzq9xq5.fsf@web.de> <877dpwvsus.fsf@web.de> 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="16495"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 05 23:55:33 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 1klgSj-0004BJ-FD for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 23:55:33 +0100 Original-Received: from localhost ([::1]:57268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klgSi-0000QB-Fj for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 17:55:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klgSB-0000OO-Ts for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 17:54:59 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:46129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klgS9-0000CM-Sz for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 17:54:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607208891; bh=qm0sKYGQquWkgSyY/gbYrCOcBhDvSs/Sa3t6A7X3ZZA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jrmyheKmWTA4CiKKpFZ4mluxmH0UiRfoZsvVbYwsFfb34ehqCzF+UVrqxNeS1vPYj V8exnVXlgX5B7P/VefOFwyTTpJUAfp9BXIe/v+/0yaXy1NEHffGWA7zD2AglYL3xTK N65S5dleUoKk6lkLiJlYwhCLwyupuFaShD9TvFW0= 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); Sat, 5 Dec 2020 23:54:51 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <877dpwvsus.fsf@web.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:WyW0z5Notz2tkro/fY+Dzju5Ky3y0zvGF/TvQ9wPBq7t+8WGzchcb5d5ENLDxr925nTc4 L66S5P3xz4OF7J66OcHeo1ysQ2c3+z03mG3sWTjT5HSnqz95/z7CwcTb2cl5uqF8ywM24P2SSj8V 5dp+Rj9mFDllwqkwc5vY8S+UFlPYVP7RBjBVqmIPkj6K56ecI6Ag+CzcwjZzAkvGV3n+FGvpoFly S6yHE1hJr54AX7yDWTLq82STrIxR9WhnhwHOHzUtA7/oyv7AyP67ogo0+tcuLwGn/grIc1MFZizV VY= X-UI-Out-Filterresults: notjunk:1;V03:K0:mYuWKdF2MFo=:uso0Yb3n+uPmgTPdrY1JmR LjcJjFZfzMKEXK7GXOc4gBu5SEDgN8IaOdlE9dfCz/ts2sKNMURLUR+j7AGafjw0WwnMYSOt2 fccr22hifEIClK6wY4M2ZbRnwny0+SKy2Z/Y+36f2zrqVZBW0PXUl2NGWB+p/FODrjRc6sQ0N RKJjgWiZdxlSFIu60B+b7AMXbwmUxrbU8/H7+I9UG+wPxQuVAJ6lGaSDV4trREPMCJLHqRSk4 SbvJj94W1HfgqNcT3y1AwU7Wpms2C4kQcxtWig1PG5nhrVBcmrq5PrDW7+OYuW9wheaMBt+D5 yAJx/GtOSgPiIe/1XUakqIcPrNckwEXy0iBQsqTB4GfiYsTfuyUoBXKSn2uhbKeQzuObgXbZi 6ZcVrMCgA/0MwFHDUBJRFJH7I80piqlM26RWCKnxe1p1bv7oOykDvHOGXOX5vYOouK5PmyXMA nVmvmpJizWhfTTsYhuIaslAk289duJ8KN8ikLAefuwFqyIcdZD9Rw8Tb63KiUPcneEgsAL591 Y2kFrW7yHwRCFl7rqrXP5yehmA+XMJABoMn5aEw0QeLSnY2hzFK+VS79UCe/Rt7HZ3VBXf5A1 FFgjc0mlWzSaI= Received-SPF: pass client-ip=212.227.17.22; 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:126058 Archived-At: 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 () "Cycles Auto Fill. Automatically breaks lines that get beyond variable fill-column." (interactive) ;; ----- body of let ----- ;; (unless (get 'auto-fill-cycle 'state) ;; (put 'auto-fill-cycle 'state 1)) (setq-local n (get 'auto-fill-cycle 'state)) ;; (when (=3D n 1) (when (or (not n) (=3D n 1)) (message "Auto Fill Comments Only") (set (make-local-variable 'comment-auto-fill-only-comments) t) (auto-fill-mode 1) (put 'auto-fill-cycle 'state 2)) (when (=3D n 2) (message "Auto Fill Whole Buffer") (set (make-local-variable 'comment-auto-fill-only-comments) nil) (put 'auto-fill-cycle 'state 3)) (when (=3D n 3) (message "Disable Auto Fill") (auto-fill-mode 0) (put 'auto-fill-cycle 'state 1)) ) (global-set-key (kbd "H-a") #'auto-fill-cycle) > Sent: Saturday, December 05, 2020 at 10:35 PM > From: "Michael Heerdegen" > To: daniela-spit@gmx.it > Cc: "Christopher Dimech" , help-gnu-emacs@gnu.org > Subject: Re: Removing line and column number settings from some buffers > > daniela-spit@gmx.it writes: > > > One problem is how to store (get 'time-frmt-cycle 'state) in a > > variable. > > If you save the state already in the state property of `time-frmt-cycle' > you don't need a variable for storing. What specifically is your > question? > > Michael. >