From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Revamp of rst.el for inclusion in GNU Emacs distribution. Date: Mon, 17 Dec 2007 20:23:23 -0500 Message-ID: References: <1196713877.17873.1224586299@webmail.messagingengine.com> <1196825586.534.1224867515@webmail.messagingengine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197941029 22259 80.91.229.12 (18 Dec 2007 01:23:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2007 01:23:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Martin Blais" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 18 02:23:58 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J4RBU-0005Xz-Ly for ged-emacs-devel@m.gmane.org; Tue, 18 Dec 2007 02:23:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4RBB-0002wG-H5 for ged-emacs-devel@m.gmane.org; Mon, 17 Dec 2007 20:23:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4RB7-0002uz-Bm for emacs-devel@gnu.org; Mon, 17 Dec 2007 20:23:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4RB5-0002un-Tm for emacs-devel@gnu.org; Mon, 17 Dec 2007 20:23:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4RB5-0002uk-O9 for emacs-devel@gnu.org; Mon, 17 Dec 2007 20:23:23 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4RB5-0005Fb-Oa for emacs-devel@gnu.org; Mon, 17 Dec 2007 20:23:23 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J4RB5-000484-8o; Mon, 17 Dec 2007 20:23:23 -0500 X-Spook: unclassified 9705 Samford Road sweep Etacs anarchy X-Ran: |?YS=LJeIRnY(2%#}L5pW1)4m16CwcZ}(1Ln@%vx~BsR;h{N4@`b/H!kL4s.{&^|2QLr{b X-Hue: cyan X-Attribution: GM In-Reply-To: <1196825586.534.1224867515@webmail.messagingengine.com> (Martin Blais's message of "Tue, 04 Dec 2007 19:33:06 -0800") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:85236 Archived-At: "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.