unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master e82fd95: ; Comments.
       [not found] ` <E1YmzHk-0007zt-I7@vcs.savannah.gnu.org>
@ 2015-04-28 13:54   ` Stefan Monnier
  2015-04-28 16:51     ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2015-04-28 13:54 UTC (permalink / raw)
  To: emacs-devel; +Cc: Glenn Morris

> +;; We can't straightforwardly make this derive from text-mode, because
> +;; we need to bind (rmail-buffer-swapped) around the text-mode call.  :(
>  (defun rmail-edit-mode ()

Can't we just make a new `rmail-enter-edit-mode' function which does the
rmail-buffer-swapped dance and then calls `rmail-edit-mode' which can
then be a plain old derived mode?


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master e82fd95: ; Comments.
  2015-04-28 13:54   ` [Emacs-diffs] master e82fd95: ; Comments Stefan Monnier
@ 2015-04-28 16:51     ` Glenn Morris
  2015-04-29  3:32       ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2015-04-28 16:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

>> +;; We can't straightforwardly make this derive from text-mode, because
>> +;; we need to bind (rmail-buffer-swapped) around the text-mode call.  :(
>>  (defun rmail-edit-mode ()
>
> Can't we just make a new `rmail-enter-edit-mode' function which does the
> rmail-buffer-swapped dance and then calls `rmail-edit-mode' which can
> then be a plain old derived mode?

So anyone who just called 'rmail-edit-mode' would get unexpected results?
Sounds confusing to me.
But if you can find a way to make it work, please go for it!



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master e82fd95: ; Comments.
  2015-04-28 16:51     ` Glenn Morris
@ 2015-04-29  3:32       ` Stefan Monnier
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-04-29  3:32 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> So anyone who just called 'rmail-edit-mode' would get unexpected results?

I guess so.  Not being an Rmail user at all, it's hard for me to judge
what that means.  Do we expect end-users to call rmail-edit-mode via M-x
or via some external Elisp snippet?
If so, maybe we could just add to rmail-edit-mode some appropriate check
that the buffer-swapping was done as needed: it wouldn't make it work as
before, but it might at least signal an error before it goes on to do
something potentially dangerous?

> But if you can find a way to make it work, please go for it!

I'm 99.9% unfamiliar with Rmail, both as a user and as a programmer, so
I'd prefer if someone else does it (e.g. someone who might actually
know how to test the resulting code, for example).


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-29  3:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150428064624.30702.5768@vcs.savannah.gnu.org>
     [not found] ` <E1YmzHk-0007zt-I7@vcs.savannah.gnu.org>
2015-04-28 13:54   ` [Emacs-diffs] master e82fd95: ; Comments Stefan Monnier
2015-04-28 16:51     ` Glenn Morris
2015-04-29  3:32       ` Stefan Monnier

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).