Comments for Function in Emacs

I'm looking for a way to generate and insert header comment blocks above my functions in Emacs (in any mode), with the default contents of the comment automatically based on the function's signature (i.e. the correct number of @param place-holders).

Doxymacs is a nice candidate. But I prefer another way works without the necessary libs. Can anyone recommend some others ways for adding smart comments for functions in Emacs? Thanks.

<strong>Edit:</strong> Now I found this: http://nschum.de/src/emacs/doc-mode/, but it seems that it does not work well after I require it into my .emacs and add hook for js-mode. Doesn't it support js functions ?


I don't know of any general-purpose approach.

Csharp-mode has a defun that is bound to / , which tries to generate comments appropriate for C#. The way it works: Every time you type a slash, it looks to see if it is the third slash in a row. (In C#, three slashes are used to denote comments that produce documentation). If it is the third slash, then it looks at the surrounding text and inserts a comment skeleton or fragment that is appropriate.

<img src="https://imgur.com/vFvf3.gif" alt="image">

It is not generalized in any way to support javascript or other language syntaxes. But you might be able to build what you want, if you start with that.

here's the excerpt:



I've used doxymacs in the past and I've found it useful http://doxymacs.sourceforge.net/


  • Solving multiple interface implementation
  • ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn&
  • SCons libraries and sub-libraries
  • How do I obtain a list of files that changed from svn over a date range?
  • How to best manage SMTP clients
  • Swift iOS don't recognize GCM library imports?
  • integrate POCO library in android ndk
  • Python function to read variable length blocks of data from file while open
  • Zend Framework bassed projects
  • Is it better to use the “hidden” CSS attribute or fetch each set of new images?
  • MAVEN : Run Multiple Maven Project using Maven Test
  • in batch how do i use taskkill properly
  • Local Development, Apache vs Developer - file permissions
  • ZipList with Scalaz
  • Get a trait object reference from a vector
  • google maps autocomplete bounces back already cleared text …odd…odd…odd
  • Is there a way to dynamically embed PDF Files in a JSP pulled from the file system?
  • Outputting SharePoint Hyperlink Column as URL
  • Doctrine/Symfony entity generator and generating entity from one table
  • Uncaught TypeError: $(…).select2 is not a function
  • How do I include a SWC in an AS2 Flash project?
  • How to add a focus style to an editable ComboBox in WPF
  • How to view images from protected folder with php?
  • Adjust width of select element according to selected option's width
  • Tamper-proof configuration files in .NET?
  • How do I superscript characters in a UIButton?
  • Declaring variable dynamically in VB.net
  • Display images in Django
  • Meteor helpers not available in Angular template
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • Is my CUDA kernel really runs on device or is being mistekenly executed by host in emulation?
  • What is Eclipse's Declaration View used for?
  • Resize panoramic image to fixed size
  • How to recover from a Spring Social ExpiredAuthorizationException
  • ILMerge & Keep Assembly Name
  • Javascript + PHP Encryption with pidCrypt
  • Importing jscolor library in angular 2
  • Large data - storage and query
  • WOWZA + RTMP + HTML5 Playback?
  • How does Linux kernel interrupt the application?