From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: define-generic-mode: unexpected handling of comment-end Date: Wed, 24 Nov 2004 10:46:21 +0100 Message-ID: <86u0rfk2aa.fsf@ketchup.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101289710 15106 80.91.229.6 (24 Nov 2004 09:48:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2004 09:48:30 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 24 10:48:19 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CWtl3-0003DS-00 for ; Wed, 24 Nov 2004 10:48:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWtuC-0003i2-Gd for ged-emacs-devel@m.gmane.org; Wed, 24 Nov 2004 04:57:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWtsj-0003gb-RW for emacs-devel@gnu.org; Wed, 24 Nov 2004 04:56:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWtsi-0003fW-2s for emacs-devel@gnu.org; Wed, 24 Nov 2004 04:56:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWtsh-0003fH-Mz for emacs-devel@gnu.org; Wed, 24 Nov 2004 04:56:11 -0500 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWtjR-0004QT-Kv for emacs-devel@gnu.org; Wed, 24 Nov 2004 04:46:37 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CWtjP-0006Ry-00 for ; Wed, 24 Nov 2004 10:46:35 +0100 Original-Received: from ketchup.de.uu.net ([139.4.38.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Nov 2004 10:46:35 +0100 Original-Received: from kai by ketchup.de.uu.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Nov 2004 10:46:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ketchup.de.uu.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:pjdtrZNLXICkt1sntH9aNT/eMMs= 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: main.gmane.org gmane.emacs.devel:30308 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30308 It seems that it doesn't work to specify ("# " . "") for comments: Debugger entered--Lisp error: (args-out-of-range "" 0) generic-mode-set-comments((("# " . ""))) generic-mode-internal(baselib-config-mode (("# " . "")) ("include") nil nil) baselib-config-mode() set-auto-mode-0(baselib-config-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil nil t t nil) revert-buffer(t) call-interactively(revert-buffer) Specifying ("# " . nil) instead works as I intended ("# " . "") to work. Shouldn't the documentation say that comment-end is handled specially? Here's the code: (define-generic-mode 'baselib-config-mode ;name '(("# " . nil)) ;comment-list '("include") ;keyword-list nil ;font-lock-list '("\\.cfg\\'") ;auto-mode-list nil ;function-list "Mode for editing baselib config files.") Kai