From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.bugs Subject: bug#8933: 'js-mode' break single char comment highlighting from 'define-generic-mode'. Date: Fri, 24 Jun 2011 22:23:14 +0100 Message-ID: <4E050042.9070609@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308950709 26254 80.91.229.12 (24 Jun 2011 21:25:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2011 21:25:09 +0000 (UTC) To: 8933@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 23:25:06 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDs9-0006VJ-LD for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 23:25:05 +0200 Original-Received: from localhost ([::1]:38072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDs8-00046i-E3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 17:25:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDrA-0003yH-Q8 for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:24:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaDr9-0004ob-95 for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:24:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDr8-0004oV-TT for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QaDr8-0005wJ-BB; Fri, 24 Jun 2011 17:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2011 21:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8933 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130895061622797 (code B ref -1); Fri, 24 Jun 2011 21:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Jun 2011 21:23:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDqi-0005vd-35 for submit@debbugs.gnu.org; Fri, 24 Jun 2011 17:23:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDqh-0005vR-0W for submit@debbugs.gnu.org; Fri, 24 Jun 2011 17:23:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaDqa-0004mM-Gr for submit@debbugs.gnu.org; Fri, 24 Jun 2011 17:23:29 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:51119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDqa-0004mH-1u for submit@debbugs.gnu.org; Fri, 24 Jun 2011 17:23:28 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDqY-0003pz-Qr for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:23:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaDqW-0004m1-QL for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:23:26 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:38937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDqW-0004ll-FT for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:23:24 -0400 Original-Received: by fxg9 with SMTP id 9so75994fxg.0 for ; Fri, 24 Jun 2011 14:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=1i6y6HcSXbcuDB1vsoWvzlIgJGw4ZePVEmUvnnw+6bw=; b=eNqB8JfBfZwKrOkSVU9t0LANA4imjusCgmYZBE59+k8B1XVuQ+7/wU6h/m+pyex43W UOCghc7ML4AV5/0+smh95Y46oqjyNq84kKv4nQiqflMsqHUbx4mvyi/S9cl2DhDgiNb7 GFrheYNVHcIWeAyKqpJd2OAihDxU9j82sujAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=K6f1URt/F7a6IkOxEfmUhNeyTePpZoIK9OI/546rWfVcv//hvX33sS0z1Dvs99AE6D yM/ZYLdRXYrtgDgPeQrpg3HWEkPZvuJKx4HH6s7HVYCHfuZ7QNdbDbPHBb8KI8jEEoAJ jBYRq0Xb8FYmRCNhI9lU7n0MErxooqzWy7SCg= Original-Received: by 10.223.21.7 with SMTP id h7mr5064157fab.72.1308950603229; Fri, 24 Jun 2011 14:23:23 -0700 (PDT) Original-Received: from [46.202.96.33] (33-96-202-46.pool.ukrtel.net [46.202.96.33]) by mx.google.com with ESMTPS id b3sm400018fao.44.2011.06.24.14.23.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 14:23:22 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 24 Jun 2011 17:24:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47448 Archived-At: I use Emacs 23.3. $ emacs -Q Next eval: (define-generic-mode my-mode '(?\; ?#) nil nil nil nil) And open file with two or more lines: ; commented line (1) wrongly highlighted line (2) another wrongly highlighted line (3) After 'M-x my-mode RET' line (1) highlighted as comment line. Another line not. Then open any .js file so js-mode loaded and back to 'my-mode' file and revert it. Now all line highlighted as comment lines! Because of this I switch .js files to c++-mode (from my .emacs): (setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) (add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) and move '(desktop-save-mode 1)' below this lines. For C-like comments this bug not reproduced. -- Best regards!