From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: verilog-mode.el Date: Sat, 13 Oct 2007 22:41:15 -0400 Message-ID: References: <47111236.5020402@verilog.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192329703 32527 80.91.229.12 (14 Oct 2007 02:41:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 02:41:43 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org, Wilson Snyder To: mac@brushroad.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 04:41:32 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 1IgtQ2-0008HM-A6 for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2007 04:41:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgtPv-0005q3-By for ged-emacs-devel@m.gmane.org; Sat, 13 Oct 2007 22:41:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgtPs-0005pe-IQ for emacs-devel@gnu.org; Sat, 13 Oct 2007 22:41:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgtPp-0005oR-Sn for emacs-devel@gnu.org; Sat, 13 Oct 2007 22:41:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgtPp-0005oH-Iy for emacs-devel@gnu.org; Sat, 13 Oct 2007 22:41:17 -0400 Original-Received: from tomts13.bellnexxia.net ([209.226.175.34] helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IgtPo-0004Ae-T8 for emacs-devel@gnu.org; Sat, 13 Oct 2007 22:41:17 -0400 Original-Received: from ceviche.home ([70.55.141.81]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071014024115.LGVA13659.tomts13-srv.bellnexxia.net@ceviche.home> for ; Sat, 13 Oct 2007 22:41:15 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 80C7EB41BB; Sat, 13 Oct 2007 22:41:15 -0400 (EDT) In-Reply-To: <47111236.5020402@verilog.com> (Michael McNamara's message of "Sat\, 13 Oct 2007 11\:45\:10 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:80835 Archived-At: >>>>> "Michael" == Michael McNamara writes: > Colleagues: Attached is version 366 of verilog-mode.el, a lisp file that > I and Wilson Snyder have been developing and publishing for the last ten > years or so, releasing it under the GPL at http://www.verilog.com and at > http://www.veripool.com. > We have completed paper work to assign copyright to the FSF so that editing > mode could be included in a future emacs distribution. > We are actively maintaining the mode, as the hardware description language, > Verilog, which this mode supports is under active development itself. (see > http://www.systemverilog.org/) > Dan suggested that I post the mode here to get your feedback, constructive > criticism, and hopefully support for including this in the > emacs distribution. > And so, here it is. > Please send any comments to mac@verilog.com and to wsnyder@wsnyder.org > Thank you! - Remove verilog-running-on-xemacs and use (featurep 'xemacs) instead (without storing its value in a variable): the byte-compiler will then be able to optimize away the unapplicable code (and correspondingly skip some silly warnings). - Rather than create a new syntax-table in each buffer, just do (defvar verilog-mode-syntax-table (let ((st (make-syntax-table))) (modify-syntax-table ...) ... st)) once and forall (inlining the only calls to verilog-setup-dual-comments and verilog-populate-syntax-table). Regarding verilog-setup-dual-comments, even if you consider the XEmacs solution cleaner, the Emacs solution is not only equivalent but it also works under XEmacs, so you can use it everywhere and remove an emacs-version check. - in verilog-modi-cache-results, you check (memq 'v19 verilog-emacs-features) additionally to (boundp 'font-lock-mode) which is redundant (same thing in verilog-auto). - You can then remove the verilog-emacs-features abomination. - The part (require 'verilog-mode) is pretty hideous and deserves either to be fixed (i.e. removed), or large comments justifying each part. Also some of the subsequent requires are unneeded (e.g. the `imenu' one). - Use easy-menu-add rather than add-submenu so it works on both Emacs and XEmacs. - the code in the major mode function which sets up the menu has a comment claiming this is about font-lock ;-) - Emacs-21's comment-region and uncomment-region should work correctly (including mangling nested comments, although in a different way from the one you chose). Stefan