0

Command comment-line is not recognized by my version of emacs. How can I install this function?

UPDATE: It may be relevant that my system shows at least two emacs, at /usr/local/bin/emacs; and at /usr/bin/emacs24. The second one is what I use; the first one cannot be launched. I have periodically removed and reinstalled emacs for reasons I cannot now recall.

MathManM
  • 171
  • 3

1 Answers1

1

What makes you think that your version of Emacs does not have command comment-line? What does C-h f comment-line tell you?

What version of Emacs do you have? M-x emacs-version

comment-line is defined in library newcomment.el, which is available with Emacs 23 and later.

If you try to invoke comment-line (e.g. M-x comment-line), library newcomment.el should be loaded automatically, defining the command completely. But this assumes you have Emacs 23 or later.

Drew
  • 75,699
  • 9
  • 109
  • 225
  • I'm using version 24.5.1. `C-h-f comment-line` does not find it. `M-x comment-line` does not download the file. – MathManM Feb 17 '17 at 21:15
  • 1
    @MathManM How did you install Emacs? The problem you describe here and in your [other question](http://emacs.stackexchange.com/questions/30768/disabling-automatic-line-highlighting) suggest you're not running a standard version of Emacs. – Tyler Feb 17 '17 at 21:26
  • @Tyler I don't recall how I installed it. It was a while ago. However, I evidently have multiple builds of emacs. See edit above. – MathManM Feb 19 '17 at 22:47
  • The function first appeared in `25.0.90`, so bad luck. – politza Feb 20 '17 at 06:23