[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Return values of (find-file-noselect), etc.
From: |
Stefan Monnier |
Subject: |
Re: Return values of (find-file-noselect), etc. |
Date: |
Tue, 08 Jan 2019 13:07:07 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>> Either way, that's not what I'm seeing. Should this be recorded as a bug?
>> I think it's a bug for a major mode function to change the current
>> buffer, so what you're seeing is likely the result of find-file-noselect
>> not protecting itself against such misbehaving major modes ;-)
> Hmmm. I suppose I could make (cpio-mode) a function instead of a mode,
I think using buffer-swap-text, you should be able to fairly easily make
it so that cpio-mode is a proper major mode (e.g. doesn't change
current-buffer) and yet moves the current buffer's contents to some
auxiliary buffer and puts the dired-style interface in the current buffer.
(and setup a change-major-mode-hook to reverse this if the user decides
to change the major mode to something else like fundamental-mode).
Stefan
- Return values of (find-file-noselect), etc., Douglas Lewan, 2019/01/06
- Re: Return values of (find-file-noselect), etc., Stefan Monnier, 2019/01/06
- Re: Return values of (find-file-noselect), etc., Douglas Lewan, 2019/01/06
- Re: Return values of (find-file-noselect), etc., Stefan Monnier, 2019/01/06
- Re: Return values of (find-file-noselect), etc., Douglas Lewan, 2019/01/07
- Re: Return values of (find-file-noselect), etc.,
Stefan Monnier <=
- Re: Return values of (find-file-noselect), etc., Douglas Lewan, 2019/01/08