From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: help about comment for major mode Date: Fri, 1 Feb 2013 13:11:19 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1359720690 29258 80.91.229.3 (1 Feb 2013 12:11:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Feb 2013 12:11:30 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 01 13:11:46 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U1FT8-0006rO-JW for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Feb 2013 13:11:46 +0100 Original-Received: from localhost ([::1]:46603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FSq-0007kJ-9l for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Feb 2013 07:11:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FSj-0007jd-Ll for help-gnu-emacs@gnu.org; Fri, 01 Feb 2013 07:11:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1FSi-0002hI-LM for help-gnu-emacs@gnu.org; Fri, 01 Feb 2013 07:11:21 -0500 Original-Received: from mail-wi0-f175.google.com ([209.85.212.175]:45648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1FSi-0002h9-FI for help-gnu-emacs@gnu.org; Fri, 01 Feb 2013 07:11:20 -0500 Original-Received: by mail-wi0-f175.google.com with SMTP id hq12so486036wib.8 for ; Fri, 01 Feb 2013 04:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=MFNBFW3AZlYVQQAonB6kLpY0NBkvX0VhFXSuMGZcx1A=; b=MdxOU8DcwlAPOnf4MG7yybt2WP1Mjkf8cRGJekqXwZ3i388ql2FUYVNRe12Gx9bWQQ eFjRCmImMX34O2CWRheajfh4nY9y9LbuL5P8C41ijyqbi72rhHthE1C5xHBBc1Xyffhm FlAC0rRKo1i2Xq86g7mjxlsNex6PJRYWXsHjYaJkKlrMmR7Dfc5cgteqmk9EK/971AV1 LxUyFz8nC2Yiks5bYr1j0YJg5rjswVodiIOSNFdIItVyNhPI6/gnWa6S5I7gFcrXQau1 Qx3f8BSvatNd+W0iGJNkM00sN6Mmbxr17UojBBFCheT0AOlpbp/8JEmz7IkdnmL1UL4G irIA== X-Received: by 10.180.107.67 with SMTP id ha3mr2413429wib.2.1359720679642; Fri, 01 Feb 2013 04:11:19 -0800 (PST) Original-Received: by 10.194.39.1 with HTTP; Fri, 1 Feb 2013 04:11:19 -0800 (PST) X-Google-Sender-Auth: 86v4F_3ZvkrVVi5fMFFmWsSPJ-o X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.175 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88903 Archived-At: Hi, I'm still having some problems with defining the comments for a new major mode. In my code I've the following function (that works if called directly with M-x): (defun dataflex-comment-dwim (arg) "Comment (in/out) a Dataflex piece of source code. It is based on comment-dwin of newcomment.el" (interactive "*P") (require 'newcomment) (let ( (comment-start "// * ") (comment-end " * ") (comment-style 'box) ) (comment-dwim arg))) and in the symbol table I've got: (modify-syntax-entry ?/ ". 12b" df-syn-table) ; c++-like comment with // ;; (modify-syntax-entry ?\n "> b" df-syn-table) ; end of c++-like comment by newline ;; and then I've got the following in the map: (define-key df-map [remap comment-dwim] 'dataflex-comment-dwim ) However, if I do a describe key for M-; in my mode I got comment-dwim and in fact, if I do M-; I got an error saying that "No comment syntax defined. Use:". What am I missing here? Thanks, Luca