unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14434: 24.3; lisp mode's comment start seems bad
@ 2013-05-22  4:26 Leo Liu
  2013-05-22  6:15 ` Andreas Röhler
  2013-05-22 21:32 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Liu @ 2013-05-22  4:26 UTC (permalink / raw)
  To: 14434

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-07 16:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22  4:26 bug#14434: 24.3; lisp mode's comment start seems bad Leo Liu
2013-05-22  6:15 ` Andreas Röhler
2013-05-22 21:32 ` Stefan Monnier
2013-06-07 12:04   ` Leo Liu
2013-06-07 16:05     ` Stefan Monnier

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).