[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tweaking save-some-buffers-action-alist
From: |
Sergey Organov |
Subject: |
Re: Tweaking save-some-buffers-action-alist |
Date: |
Sat, 19 Jun 2021 15:31:44 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Is `nconc` safe here, or should I `copy-seq` the original and modify
>> that instead?
>
> The general rule is: If you don't know, then it's not safe.
> [ and indeed, it's not safe in this particular case. ]
Nice, thanks for confirming!
So I ended-up adding new item at the beginning of the list rather than
at the end:
#+BEGIN_SRC emacs-lisp
(push
'(?R
(lambda (buf)
(with-current-buffer buf
(revert-buffer)))
"revert this buffer")
save-some-buffers-action-alist)
#+END_SRC
And then I had to change the KEY from C-M-g to just R, as on terminal it
seems to be impossible to generate the former key-sequence from
`map-y-or-n-p`, as "ESC C-g" doesn't work as expected (ESC is simply
ignored), – yet another surprising limitation of the mode.
Thanks,
--
Sergey Organov