From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Paul W. Rankin" <pwr@bydasein.com>
Cc: 49593@debbugs.gnu.org
Subject: bug#49593: Emacs overrides normal-erase-is-backspace
Date: Fri, 16 Jul 2021 12:04:42 +0200 [thread overview]
Message-ID: <878s26d16t.fsf@gnus.org> (raw)
In-Reply-To: <f5ff7310c4880b6a9e07b771e1c8ae5e@purelymail.com> (Paul W. Rankin's message of "Fri, 16 Jul 2021 16:57:49 +1000")
"Paul W. Rankin" <pwr@bydasein.com> writes:
> normal-erase-is-backspace is maybe; marked as "CHANGED outside of
> Customize"
The doc string does say:
Setting this variable with setq doesn't take effect. Programmatically,
call `normal-erase-is-backspace-mode' (which see) instead.
But setting it with `custom-set-variables' should work, I'd have
thought? Hm...
(custom-set-variables '(normal-erase-is-backspace t))
sets it to `maybe', so it's not a startup problem (there's been some
with Customize)...
Hm, looking at the code to `normal-erase-is-backspace-mode', I don't see
how that's supposed to work at all. The value is only used in
`normal-erase-is-backspace-setup-frame', and calling
`normal-erase-is-backspace-mode' doesn't actually change the value of
the variable, which explains why `custom-set-variables' does nothing.
The following change seems to fix the issue:
diff --git a/lisp/simple.el b/lisp/simple.el
index 322693f631..01851e0a0a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9505,9 +9505,9 @@ normal-erase-is-backspace
:set (lambda (symbol value)
;; The fboundp is because of a problem with :set when
;; dumping Emacs. It doesn't really matter.
- (if (fboundp 'normal-erase-is-backspace-mode)
- (normal-erase-is-backspace-mode (or value 0))
- (set-default symbol value))))
+ (when (fboundp 'normal-erase-is-backspace-mode)
+ (normal-erase-is-backspace-mode (or value 0)))
+ (set-default symbol value)))
(defun normal-erase-is-backspace-setup-frame (&optional frame)
"Set up `normal-erase-is-backspace-mode' on FRAME, if necessary."
But is that the correct fix?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-07-16 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 6:57 bug#49593: Emacs overrides normal-erase-is-backspace Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-16 10:04 ` Lars Ingebrigtsen [this message]
2021-07-18 5:01 ` Paul W. Rankin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-18 12:08 ` Lars Ingebrigtsen
2021-07-24 16:23 ` Lars Ingebrigtsen
2021-08-22 16:03 ` Lars Ingebrigtsen
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=878s26d16t.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=49593@debbugs.gnu.org \
--cc=pwr@bydasein.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).