C-M-j runs the command indent-new-comment-line (found in global-map),which is an alias for ‘comment-indent-new-line’ in ‘newcomment.el’.It is bound to C-M-j, M-j.(indent-new-comment-line &optional SOFT)Break line at point and indent, continuing comment if within one.This indents the body of the continued commentunder the previous comment line.This command is intended for styles where you write a comment per line,starting a new comment (and terminating it if necessary) on each line.If you want to continue one comment across several lines, use M-x newline-and-indent.If a fill column is specified, it overrides the use of the comment columnor comment indentation.The inserted newline is marked hard if variable ‘use-hard-newlines’ is true,unless optional argument SOFT is non-nil.
Hi Mark,Mark is right; paredit-mode binds paredit-reindent-defun to M-q, which calls either lisp-fill-paragraph (from lisp-mode.el) or indents the form, depending on whether you're in a comment or string. The string part is nice if you like docstrings with a fixed maximum width.-SkyOn Thu, Jun 21, 2018, 5:53 PM Mark Cox <markcox80@gmail.com> wrote:G'day Mark,I don't know the command you are after but paredit provides the command paredit-reindent-defun which is bound to M-q when in paredit mode.You can invoke this command once your comment becomes too long to fit on one line. For example:(defun example ();; This is a really long comment designed to show how the function paredit-reindent-defun works.*(print "hello world"))(defun example ();; This is a really long comment designed to show how the function;; paredit-reindent-defun works.*(print "hello world"))MarkOn Fri, Jun 22, 2018 at 8:50 AM, Mark H. David <mhd@yv.org> wrote:OK, well I'm wondering if anyone remembers the keybinding M-RET (meta return), within a semi-colon (;) comment, which used to wonderfully both start a new line, but also continue the comment at the same indent level, same number of leading semi-colons, with a space after. Example:You're here, and your cursor is where the * is:(defun foo ();; blah blah blah*and you type M-RET. Next thing that happens is the cursor is on the next line where the * is, and the lines then look like this:(defun foo ();; blah blah blah;; *What happened to that functionality? I thought it was there for years, I'm pretty sure on the Lisp Machine and I think for years in regular Emacs in Lisp mode. It got ingrained in my fingers, and I often still try it, but of course now all I get is: M-RET is undefinedThank you.----- Original message -----From: Pascal Bourguignon <pjb@informatimago.com>To: Discussion list for Common Lisp professionals <pro@common-lisp.net>Subject: Re: emacs lisp mode, mailing list?Date: Thu, 21 Jun 2018 18:35:04 +0200On 21 Jun 2018, at 17:49, Mark H. David <mhd@yv.org> wrote:Is there a mailing list to ask questions and make suggestions and talk about emacs lisp mode for pro Lispers? Would that be here perhaps?Yes, there’s no other place.--__Pascal J. Bourguignon__