[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6531: patch for rst.el updated (patch format revised)

From: Martin Blais
Subject: bug#6531: patch for rst.el updated (patch format revised)
Date: Fri, 13 Apr 2012 11:05:47 -0400

On Fri, Apr 13, 2012, at 14:40, Wei-Wei Guo wrote:
> 在 2012-04-12四的 23:13 -0400,Martin Blais写道:
> > On Thu, Apr 12, 2012, at 16:30, Stefan Monnier wrote:
> > > > The update including:
> > >
> > > > - Insert bullet list by 'M-Enter'.
> > > > - Insert number list "#." by 'M-Enter' with any prefix.
> > > > - Insert number list of a specific number of various styles by 
> > > > 'M-Enter" with a number prefix.
> > > > - Insert directive by 'C-c C-d'.
> > > > - Insert directive option by 'C-c C-o'.
> > > > - Remove the dependency on a2r.el. Now all the patched codes are from 
> > > > mine.
> > >
> > > > Hope it's helpful.
> > >
> > > I'd like to hear the opinion of rst.el's maintainers as well.
> >
> > Holy smoke, is this a patch from 2008? Major lag in the reviewers!
> > Where is the link?
> > Is this the one?
> > http://debbugs.gnu.org/cgi-bin/bugreport.cgi?bug=1610
> >
> > I had a very quick look at this patch--it looks fine to me (other than
> > the overuse of mutable locals/setq).
> >
> > About the features: I personally care little about bullet insertion
> > functions, I find inserting them manually is good enough, but it
> > doesn't hurt to have them there, and others might really like them, so
> > I would merge it in. Thanks WeiWei! :-)
> >
> It's a very old patch and Stefan Merten has a new version of rst.el.
> Here is the link of the new rst.el which already merged part of the
> patch.
> http://docutils.sourceforge.net/tools/editors/emacs/rst.el
> Stefan's codes are much better than mine, so it better to merge the new
> rst.el instead of my old patch.
> I sent a email to you with another two extensions of rst.el days ago,
> which are rst-directive.el and rst-links.el. If you think those codes
> are fine, they can be merged into the rst.el too. I recommend the
> rst-directive.el, which I use in my daily work and saves me lots of
> time.
> Hope my terrible coding style isn't taking you too much trouble.

Nothing personal Weiwei, your coding style is fine. The only important
comments there (and most of Stefan Monnier's suggestions) are about
avoiding using (setq) where unnecessary.

In LISP, the use of setq is considered "poor style" because its syntax
allows a functional form which avoids mutability (Stefan's suggestions
provide good examples of this). Emacs LISP is a bit of a crappy
language because makes mutable operations look like regular functions
(poor naming choices, it's old), but other LISP implementations
emphasize the nastiness of mutability by including a '!' in the name
of all functions which modify their objects. Clojure does this too,
but goes one step further by making its native data structures be all
"persistent" (i.e., you cannot modify them, you can only create "new"
modified versions of them). Haskell and ML go even further and make it
a real PIA to modify anything anywhere, so you end up doing gymnastics
all day long to satisfy the compiler. Some people claim that
mutability is the root of all evil... personally I find it a bit
annoying to have to program in a fully non-mutable world, but I think
that in the particular examples cited above Stefan's proposed changes
make the code clearer.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]