all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Michael Heerdegen <michael_heerdegen@web.de>
Subject: Re: master c59e878: Inhibit modification hooks when saving eieio-persistent's
Date: Fri, 01 May 2020 17:01:39 -0400	[thread overview]
Message-ID: <jwvh7wztlse.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200501192116.A55EE20B5B@vcs0.savannah.gnu.org> (Michael Heerdegen's message of "Fri,  1 May 2020 15:21:16 -0400 (EDT)")

>     Inhibit modification hooks when saving eieio-persistent's
>     
>     * lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind
>     inhibit-modification-hooks -> t.

I think this deserves an explanation (as a extensive comment explaining
why it's needed and why we think it's safe to do it here.)

Binding `inhibit-modification-hooks` is not as dangerous as binding
`inhibit-quit` but it's something we should still avoid as much
as possible.


        Stefan


> ---
>  lisp/emacs-lisp/eieio-base.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
> index 2cb1f61..010a2b6 100644
> --- a/lisp/emacs-lisp/eieio-base.el
> +++ b/lisp/emacs-lisp/eieio-base.el
> @@ -473,7 +473,8 @@ instance."
>      (let* ((cfn (or file (oref this file)))
>             (default-directory (file-name-directory cfn)))
>        (cl-letf ((standard-output (current-buffer))
> -                ((oref this file)       ;FIXME: Why change it?
> +                (inhibit-modification-hooks t)
> +                ((oref this file) ;FIXME: Why change it?
>                   (if file
>                       ;; FIXME: Makes a name relative to (oref this file),
>                       ;; whereas I think it should be relative to cfn.




       reply	other threads:[~2020-05-01 21:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200501192115.23847.67499@vcs0.savannah.gnu.org>
     [not found] ` <20200501192116.A55EE20B5B@vcs0.savannah.gnu.org>
2020-05-01 21:01   ` Stefan Monnier [this message]
2020-05-01 21:45     ` master c59e878: Inhibit modification hooks when saving eieio-persistent's Michael Heerdegen
2020-05-01 22:03       ` Stefan Monnier
2020-05-01 22:24         ` Michael Heerdegen
2020-05-01 22:40           ` Stefan Monnier
2020-05-01 23:30             ` Michael Heerdegen
2020-05-02 13:26               ` Stefan Monnier
2020-05-02 21:08                 ` Michael Heerdegen
2020-05-02 22:09                   ` Stefan Monnier
2020-05-03  2:44                     ` Michael Heerdegen
2020-05-03  4:01                       ` Stefan Monnier
2020-05-03  5:13                         ` Michael Heerdegen
2020-05-04 21:09                           ` Eric Abrahamsen
2020-05-04 21:36                             ` Michael Heerdegen
2020-05-04 21:42                               ` Eric Abrahamsen
2020-05-02  4:24             ` Michael Heerdegen
2020-05-02  0:03     ` Eric Abrahamsen
2020-05-02  0:22       ` Michael Heerdegen
2020-05-02 13:32       ` Stefan Monnier
2020-05-02 18:18         ` Eric Abrahamsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvh7wztlse.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.