emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move-past-close-and-indent


From: martin rudalics
Subject: Re: move-past-close-and-indent
Date: Thu, 19 Oct 2006 23:19:16 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Consider the following Emacs Lisp code
>
>     (foo) ; bar
>
> Point is between the parens. After `move-past-close-and-reindent' it
> ends up after the semicolon, i.e inside the comment.

Would the patch below handle this?

*** lisp.el.~1.74.~     Tue Apr 11 16:23:56 2006
--- lisp.el     Thu Oct 19 23:10:58 2006
***************
*** 481,486 ****
--- 481,490 ----
                      (and (not (elt state 3)) (not (elt state 4))))))))
      (delete-indentation))
    (forward-char 1)
+   (when (save-excursion
+         (skip-chars-forward " \t")
+         (looking-at (regexp-quote comment-start)))
+     (end-of-line))
    (newline-and-indent))

  (defun check-parens ()                        ; lame name?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]