Search code examples
emacslispcomments

lisp on emacs: how to comment a multi-line expression?


For example, if I want to comment this:

(defun noop ()
  nil)

Every time I try to put a semicolon before the "(defun", the defun runs away to the next line. So how is that supposed to be done?

GNU Emacs 23.1.1

Edit: by "running away" I mean when I insert a semicolon before "(defun", a newline is automatically inserted after the semicolon and "(defun" starts on a new line again.


Solution

  • Ron, do a CTRL-H m and look at the minor modes. You have some "helpful" minor mode active. (Maybe paredit but I dont think that's it.) I remember there was something like that when I tried the EMACS Starter Kit. It lasted maybe thirty seconds before I screamed and found how to kill it.

    In any case, that's not default EMACS behavior, it's some init-file or site-emacs addition.