unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Lars Hansen <larsh@math.ku.dk>, emacs-devel@gnu.org
Subject: Re: Moving handlers out of desktop.el
Date: 13 Apr 2004 15:05:48 +0200	[thread overview]
Message-ID: <x51xms3u4z.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87zn9ggpx4.fsf@mail.jurta.org>

Juri Linkov <juri@jurta.org> writes:

> Lars Hansen <larsh@math.ku.dk> writes:
> > How about this change:
> > 1. Move the functions above to their respective modules and give each
> >    an autoload cookie.
> >     Also move the two in `desktop-buffer-misc-functions'.
> 
> I think moving the desktop functions AS IS to respective packages is
> not good, because these packages shouldn't depend on the desktop package.
> Making general functions (with an autoload cookie) from them would be
> good.  Such functions could have general arguments and be useful
> for other purposes as well.  Otherwise, if such generalization is not
> possible, the current desktop implementation is good enough.

Except that it is not maintainable.  This thread started with a
complaint about that.

> > 2. Add in desktop.el a new variable `desktop-buffer-mode-handlers'
> >    with a default value like
> >     (('dired-mode . 'desktop-buffer-dired)
> >      ('rmail-mode . 'desktop-buffer-rmail)
> >      ('mh-folder-mode 'desktop-buffer-mh)
> >      ('Info-mode . 'desktop-buffer-info))
> > 3. Replace in `desktop-buffer-handlers' the four functions above with
> >    a function `desktop-buffer-special-mode' looking in the alist above
> >    for a handler.
> 
> This could be done independently from the first item.

But it does not make sense without putting the handlers where they
belong.  And where the byte compiler will warn if they are using bad
variables and so on.  And where they'll be autoloaded along with the
respective mode only when they are needed.

I find the original proposal much better.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2004-04-13 13:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-06 11:47 Moving handlers out of desktop.el Lars Hansen
2004-04-08  9:43 ` Juri Linkov
2004-04-10 21:31   ` Lars Hansen
2004-04-10 22:32     ` Juri Linkov
2004-04-11  8:04       ` Lars Hansen
2004-04-11  8:16         ` Lars Hansen
2004-04-13 11:48 ` Juri Linkov
2004-04-13 12:51   ` Stefan Monnier
2004-04-13 13:01   ` Lars Hansen
2004-04-13 15:12     ` Juri Linkov
2004-04-13 20:46       ` Juri Linkov
2004-04-21 21:28         ` Lars Hansen
2004-04-13 13:05   ` David Kastrup [this message]
2004-04-13 15:15     ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=x51xms3u4z.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsh@math.ku.dk \
    /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 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).