unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: highlight-sexp-mode add-hook with (highlight-sexp-mode 0)
Date: Thu, 27 Oct 2022 04:51:27 +0200	[thread overview]
Message-ID: <878rl2rnbk.fsf@dataswamp.org> (raw)
In-Reply-To: AMZBR9sFCv3Eck6aUUQkAmyahvXxf8wVf4XSDC27Ns6LUy3dXNhC117jH0U4XE31Zik6_ubyVniiVQtGxPr1ERmgtSAwX-KSWGC6H4bmgYM=@protonmail.com

Heime wrote:

> (if highlight-sexp-mode (highlight-sexp-mode 0))

Better to use `when' here in terms of Lisp.

Note that not all minor modes have variables, that should have
generated an error if so in this case so I don't think that's
it tho. (Example: `auto-save-mode', only a function.)

And actually there's no real need to check if something is
enabled if you just want to disable it, just disable it.

To disable stuff from Lisp, -1 is more clear than 0.

However ... that's a lot said about such a small thing,
without saying why it doesn't work.

-- 
underground experts united
https://dataswamp.org/~incal




  reply	other threads:[~2022-10-27  2:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 21:55 highlight-sexp-mode add-hook with (highlight-sexp-mode 0) Heime
2022-10-27  2:51 ` Emanuel Berg [this message]
2022-10-27  5:43 ` Eli Zaretskii
2022-10-27  6:19   ` Heime

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=878rl2rnbk.fsf@dataswamp.org \
    --to=incal@dataswamp.org \
    --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).