unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: 8933@debbugs.gnu.org
Subject: bug#8933: 'js-mode' break single char comment highlighting from 'define-generic-mode'.
Date: Fri, 24 Jun 2011 22:23:14 +0100	[thread overview]
Message-ID: <4E050042.9070609@gmail.com> (raw)

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!





             reply	other threads:[~2011-06-24 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 21:23 Oleksandr Gavenko [this message]
2011-06-27  9:08 ` bug#8933: 'js-mode' break single char comment highlighting from 'define-generic-mode' Lawrence Mitchell
2011-06-30 16:23   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E050042.9070609@gmail.com \
    --to=gavenkoa@gmail.com \
    --cc=8933@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).