all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: "Martin Blais" <blais@furius.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Fwd: Revamp of rst.el for inclusion in GNU Emacs distribution.
Date: Mon, 17 Dec 2007 20:23:23 -0500	[thread overview]
Message-ID: <y4lk7s4wz8.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <1196825586.534.1224867515@webmail.messagingengine.com> (Martin Blais's message of "Tue, 04 Dec 2007 19:33:06 -0800")

"Martin Blais" wrote:

> http://svn.berlios.de/svnroot/repos/docutils/trunk/docutils/tools/editors/emacs/rst.el
[...]
> Any comments?

I know nothing about ReStructuredText, but the code looks basically ok.

Don't define functions with generic names like `filter' and
`line-number-at-pos'. Instead, define `rst-filter' etc that do what
you want.

Since jit-lock has been around since Emacs 21, the messing with
font-lock-support in rst-mode is unnecessary.

`rst-mode-lazy' seems like a poor name for what the variable does
(toggle extra highlighting), and again given that jit lock has been
around since Emacs 21 it could probably just be dumped.

I'd put the defcustoms and defgroup all together at the start of the
file, so people can easily see what can be customized.

The :types of defcustoms should just be 'hook, etc, not '(hook), AFAIK.

You need

(eval-when-compile
  (require 'cl))

for flet to work, but couldn't you just define an actual function
rst-addnum?

You need to get rid of `position' in rst-straighten-decorations, since
it's a CL function which should not be called at runtime.

Byte compiling reveals some free variables, all (?) caused by things
being defined after they are used: rst-toc-insert-max-level,
rst-toc-buffer-name, rst-toc-return-buffer, rst-level-face-max,
rst-level-face-format-light, rst-level-face-base-color,
rst-level-face-step-light, rst-level-face-base-light

In rst-replace-lines, p and l should be let-bound.

Why isn't rst-portable-mark-active-p just checking `mark-active' in
the Emacs case? Like all functions, the definition should be moved
before its first use.

> What's the next step?

For all the copyright holders to be willing to sign assignments.

  parent reply	other threads:[~2007-12-18  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1196713877.17873.1224586299@webmail.messagingengine.com>
     [not found] ` <E1Izb3W-000499-GT@fencepost.gnu.org>
2007-12-05  3:33   ` Fwd: Revamp of rst.el for inclusion in GNU Emacs distribution Martin Blais
2007-12-05 13:31     ` Vinicius Jose Latorre
2007-12-18  1:23     ` Glenn Morris [this message]
2008-02-08  5:21       ` Glenn Morris
2008-02-08  9:29     ` Leo

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

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

  git send-email \
    --in-reply-to=y4lk7s4wz8.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=blais@furius.ca \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.