From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexandros Prekates Newsgroups: gmane.emacs.help Subject: Re: Trying to find the status of auto-fill-mode in a buffer Date: Sat, 23 Nov 2024 09:22:57 +0000 Message-ID: <20241123112257.3563543d@enoush2o> 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="12115"; 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 Nov 23 10:23:52 2024 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 1tEmMq-00030W-Eb for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 23 Nov 2024 10:23:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEmMA-0003o0-EP; Sat, 23 Nov 2024 04:23:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEmM9-0003nn-3k for help-gnu-emacs@gnu.org; Sat, 23 Nov 2024 04:23:09 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEmM7-0002La-Ar for help-gnu-emacs@gnu.org; Sat, 23 Nov 2024 04:23:08 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0F1AF240101 for ; Sat, 23 Nov 2024 10:23:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1732353783; bh=5lPdf0O+eCp+yju316lDOiVxerZOyuugBSw6tplS6jI=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=fSzS8UAsCpYeDa6GEiUHlsP9BW9ZC4QNAKnXvMwnobfte5ueUKO+1bM3GnnBKR1Wv jZyjgTNYacS/2rOQJSXw3/TDDzFL8yGP1ajxZ1Vhytcq2I5qyknWmU57E7PPUe3Sx3 4FtNwWlN45X2jADTuilWHSPr7NFNNRFyPK0mlFLmzyNahmBxSHfynFTxij+K9je58M zONYDRgrfme9yPKoe/QoOi/tUcvzkYJCWkykBX2Cv3YLPWEV10sfu/UXadPreMMZjS 3/U4yLlzvOGvdpyHBQygtaz5RKfnMu4z2ydfxi4fS4fiASr2ZEW2CL9rY0e2Vg9Biq GJqqAD4zuhLGQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XwRMp06Hvz6tvJ for ; Sat, 23 Nov 2024 10:23:01 +0100 (CET) Received-SPF: pass client-ip=185.67.36.66; envelope-from=aprekates@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148367 Archived-At: Regarding the discussion about the naming, i dont have the experience in lisp and elisp but i think i can try to convey what perhaps is the difficulty here for me as a newbie. the C-h f auto-fill-mode says=20 To check whether the minor mode is enabled in the current buffer, ^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^ evaluate (the variable) =E2=80=98auto-fill-function=E2=80=99 ^^^^^^^^ (+master) ^^^^^^^^ So on one hand i think it would be reasonable my mind to think of a state-like variable (not a function) . In that state i think a boolean variable auto-fill-mode-activation-state would make more sense to me.=20 But then i think i step into a possible semanticaly foggy area. Emacs tells me that to find the state of a minor mode lets: 'evaluate' sth called 'auto-fill-function' Reading the current discussion and reading more carefully : C-h f auto-fill-mode=20 C-h v auto-fill-function auto-fill-function is a variable defined in =E2=80=98C source code= =E2=80=99. C-v f auto-fill-function=20 auto-fill-function is a native-compiled Lisp function in =E2=80=98simple.el=E2=80=99.=20 and do-auto-fill is a native-compiled Lisp function in =E2=80=98simple.el= =E2=80=99 What i understand vaguely is that emacs uses the value of a variable that holds or points to the function that does the actual auto-fill and if it has nil value that means that the mode is not active in the current buffer.(i wonder if that is an idiosyncratic way to tell if=20 a mode is active or used often).=20 But i get the feeling (a hunch) that we are in a borderline world where C land semantics mix with the Lisp land ones.=20 For example i dont see the word 'symbol'. ---------- Thanks to Marcin for bringing to my attention the coding convention regarding 'auto-fill-function'. Thanks to Arsen for bringing to my attention C-j. As for M-: that Michael suggested i have currently a keyboard conflict that wont allow me to enter that key. =20