unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: 14434@debbugs.gnu.org
Subject: bug#14434: 24.3; lisp mode's comment start seems bad
Date: Wed, 22 May 2013 12:26:24 +0800	[thread overview]
Message-ID: <m1d2sj4p3j.fsf@gmail.com> (raw)

After fixing bug#14303, we can observe the following bug:

1. Emacs -q
2. insert in a emacs lisp mode buffer:
   (
     ;;
   )
3. Move point to be end of ;;
4. M-j

You should see:

   (
     ;;
     ;
   )

This seems to be due to bad comment-start-skip. Is the following fix correct?

--- lisp/emacs-lisp/lisp-mode.el.gz
+++ #<buffer lisp-mode.el.gz>
@@ -219,7 +219,7 @@
   (make-local-variable 'comment-start-skip)
   ;; Look within the line for a ; following an even number of backslashes
   ;; after either a non-backslash or the line beginning.
-  (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+  (setq comment-start-skip "\\(\\(^\\|[^\\\\\n;]\\)\\(\\\\\\\\\\)*\\);+ *")
   (make-local-variable 'font-lock-comment-start-skip)
   ;; Font lock mode uses this only when it KNOWS a comment is starting.
   (setq font-lock-comment-start-skip ";+ *")

Diff finished.  Wed May 22 12:24:18 2013





             reply	other threads:[~2013-05-22  4:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22  4:26 Leo Liu [this message]
2013-05-22  6:15 ` bug#14434: 24.3; lisp mode's comment start seems bad Andreas Röhler
2013-05-22 21:32 ` Stefan Monnier
2013-06-07 12:04   ` Leo Liu
2013-06-07 16:05     ` 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=m1d2sj4p3j.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=14434@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).