From: Alexandros Prekates <aprekates@posteo.net>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Trying to find the status of auto-fill-mode in a buffer
Date: Sat, 23 Nov 2024 09:22:57 +0000 [thread overview]
Message-ID: <20241123112257.3563543d@enoush2o> (raw)
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
To check whether the minor mode is enabled in the current buffer,
^^^^^ ^^^^^^^ ^^^^^^^^^^^^^^^
evaluate (the variable) ‘auto-fill-function’
^^^^^^^^ (+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.
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
C-h v auto-fill-function
auto-fill-function is a variable defined in ‘C source code’.
C-v f auto-fill-function
auto-fill-function is a native-compiled Lisp function in
‘simple.el’.
and do-auto-fill is a native-compiled Lisp function in ‘simple.el’
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
a mode is active or used often).
But i get the feeling (a hunch) that we are in a borderline world
where C land semantics mix with the Lisp land ones.
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.
next reply other threads:[~2024-11-23 9:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 9:22 Alexandros Prekates [this message]
2024-11-23 9:37 ` Trying to find the status of auto-fill-mode in a buffer Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2024-11-19 6:43 Alexandros Prekates
2024-11-19 9:39 ` Arsen Arsenović
2024-11-19 9:49 ` Alexandros Prekates
2024-11-19 10:35 ` Tassilo Horn
2024-11-19 14:16 ` Alexandros Prekates
2024-11-19 11:27 ` Robert Pluim
2024-11-19 14:52 ` Arsen Arsenović
2024-11-19 17:25 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-11-19 17:38 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-11-20 7:56 ` Robert Pluim
2024-11-20 16:05 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-11-20 16:14 ` Robert Pluim
2024-11-20 19:14 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-11-20 19:27 ` Eli Zaretskii
2024-11-20 23:50 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-11-21 6:50 ` Eli Zaretskii
2024-11-20 18:51 ` mbork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241123112257.3563543d@enoush2o \
--to=aprekates@posteo.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).