From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Cycle Auto-Fill Date: Sat, 5 Dec 2020 14:25:06 +0100 Message-ID: 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="11477"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 05 14:27:46 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 1klXbE-0002rw-Q0 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 14:27:44 +0100 Original-Received: from localhost ([::1]:37042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klXbD-0002vq-LB for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 08:27:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klXYo-0002vI-6u for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 08:25:14 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:54631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klXYk-0000ev-CT for help-gnu-emacs@gnu.org; Sat, 05 Dec 2020 08:25:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607174706; bh=hdbb4IARQqnBFg2YV3v0z8DjDiI9qhL/4QHAYk835MM=; h=X-UI-Sender-Class:From:To:Subject:Date; b=e/ABBFN4fqecrhliD5vcgU3SaGOSZ6fi2HbnWHFWAMSx5zuIjF1egC1dAD8GWztcM N1+GErWfmO+KbezL9BvT0uJj3Y+IGiZSdWVAtCQPrWURiryHlBTWTst4bEQ9APsnmu 0XLh6go06otN8lIdWrfz0GIGGdBra5qY/uXenEJI= 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-bs04.server.lan [172.19.170.170]) (via HTTP); Sat, 5 Dec 2020 14:25:06 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:LzZ4OODtax+2hqQwVD5NCIPh2BTqHsv+uAOflaarwNgG0hPMKtDYveD1P3fGmQvqxcOf1 tOfDmzRvViCQR5zzCdXFXWgXbbFq6oeYGrtPEr+CknXuF4K3Jl4VL8q4F+UUVGo6mKUhGJ7kXPg2 nr4TGd/ncQwAWtPgvZZ6ZAq/l6R13sYRjVgs36kdU9lzqA2cijnkmdrf9raWahL3ZOemlCBXnCv+ 1hL2mZOUY2ngQOK2XrMajifHwamxapSKHC8drFzj0ndCf7uKOZ45osjBTsKOr/lGgAD1VNCLroSc RA= X-UI-Out-Filterresults: notjunk:1;V03:K0:GPIFBB2TwGs=:boMRbE8loZzJTcd6oT6sUl ajNEZiTlIJHKBI7FDZ8Jdye/muyBFXnoJmW3rIlNuGitfJnXo7fnvUxukOh6sxnBIZGWt2ZjC l++iHbxJuKBnr9y7uddlFNLaorKAtnXzFm2J8lLifwJRkUejVUz7UaIW6igaqw0hQUz9lK7Bp xuM3LhJ0taTfjLQX/3+J/iUKCYuUjesrwVvU4lD69rf/OjYh/yUvb80/ZPasRpjURlR5vZ4mO Y1BqRFo/0XePY1taF2HN5FtYxXVXW1QGcZBwTe0NjU14MSpyuuFdZXK69AGxMg51atYL1m6ko 7gyfZ4kLBi0k2T1rUoubLx17ScRSAMk1wGUvzUA0YIRo7U0F33gvldgplfJy6EQorLKQkq+1p QbRLcbEXcqit9l2Th3y2wDch836dv3o/A5625RspSTgj6uUBrThqaG6zDx7a7DFWVPoVcSFTY 66ieZPtf9b0Ua7XDXJhDkt5bHS6h/2RDupfgZH87/mOH8JCaUO2HnBOc+3v/3JaGYus8sqNDG XBNtTpwgjDAhJlH82UWBEZwzXY0/R5CXTXTb/UUsCGODBPBggsxO/z+sxi7IFkoerlNINfU3x STaFMPV4l2kBw= Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; 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:126023 Archived-At: Have written the following function to use one key binding to cycle auto-fill (only-comments, whole-buffer, disable) Who would like to criticise this little bugger? (defun gungadin-auto-fill-cycle () "Cycles Auto Fill. Automatically breaks lines that get beyond variable fill-column." (interactive) (unless (get 'gungadin-auto-fill-cycle 'state) (put 'gungadin-auto-fill-cycle 'state 1)) (setq n (get 'gungadin-auto-fill-cycle 'state)) (when (=3D n 1) (message "Auto Fill Comments Only") (set (make-local-variable 'comment-auto-fill-only-comments) t) (auto-fill-mode 1) (put 'gungadin-auto-fill-cycle 'state 2)) (when (=3D n 2) (message "Auto Fill Buffer") (set (make-local-variable 'comment-auto-fill-only-comments) nil) (put 'gungadin-auto-fill-cycle 'state 3)) (when (=3D n 3) (message "Disable Auto Fill") (auto-fill-mode 0) (put 'gungadin-auto-fill-cycle 'state 1)) ) (global-set-key (kbd "H-a") #'gungadin-auto-fill-cycle) =2D-------------------- Christopher Dimech General Administrator - Naiad Informatics - GNU Project (Geocomputation) - Geophysical Simulation - Geological Subsurface Mapping - Disaster Preparedness and Mitigation - Natural Resource Exploration and Production - Free Software Advocacy