[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about memory usage
From: |
Eli Zaretskii |
Subject: |
Re: Question about memory usage |
Date: |
Sat, 07 Apr 2018 16:26:54 +0300 |
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> From: Michał Kondraciuk <k.michal@zoho.com>
> Date: Sat, 7 Apr 2018 15:15:08 +0200
>
> Can you take a look at the attached patch?
>
> diff --git a/lisp/simple.el b/lisp/simple.el
> index aad8d3b..23f7c4f 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -3014,6 +3014,13 @@ undo-auto--undoably-changed-buffers
> `undo-auto--boundaries' and can be affected by changes to their
> default values.")
>
> +(defun undo-auto--remove-buffer-from-changed-list ()
> + "Remove current buffer from list of recently changed ones."
> + (setq undo-auto--undoably-changed-buffers
> + (delq (current-buffer) undo-auto--undoably-changed-buffers)))
> +
> +(add-hook 'kill-buffer-hook #'undo-auto--remove-buffer-from-changed-list)
> +
Thanks, but I'd be more comfortable with just doing this from
kill-buffer itself. IMO, hooks are for users and Lisp applications;
using them for internal bookkeeping purposes should be limited to the
cases where there's no better alternative.
- Re: Question about memory usage, (continued)
Re: Question about memory usage, Michał Kondraciuk, 2018/04/03
- Re: Question about memory usage, Eli Zaretskii, 2018/04/03
- Re: Question about memory usage, Michał Kondraciuk, 2018/04/03
- Re: Question about memory usage, Eli Zaretskii, 2018/04/04
- Re: Question about memory usage, Michał Kondraciuk, 2018/04/05
- Re: Question about memory usage, Eli Zaretskii, 2018/04/05
- Re: Question about memory usage, Stefan Monnier, 2018/04/05
- Re: Question about memory usage, Michał Kondraciuk, 2018/04/07
- Re: Question about memory usage,
Eli Zaretskii <=
- Re: Question about memory usage, Stefan Monnier, 2018/04/07
- Re: Question about memory usage, Michał Kondraciuk, 2018/04/07
Re: Question about memory usage, Stefan Monnier, 2018/04/03
Re: Question about memory usage, Eli Zaretskii, 2018/04/04
Re: Question about memory usage, Stefan Monnier, 2018/04/04