help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: describe-mode "some-mode"?


From: Emanuel Berg
Subject: Re: describe-mode "some-mode"?
Date: Sun, 24 Aug 2014 04:22:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

lee <address@hidden> writes:

> Emacs is self-documenting :)

Emacs has a very clever help system that automatically
incorporates the interfaces as you add functions
(etc.). And, the help system has clever ways of
hyperlinking and accounting for the configurationism of
Emacs users, e.g., you don't "hard-document" actual
keys in docstrings, but the correct keys (for the
particular user, that may have his own keys) turn up
just the same. And more. And the documentation comes
with Emacs. Yes.

But Emacs is still not exactly self-documenting, I
wouldn't say.

Here is an example of a creative docstring: hyperlinked
(to wrap-search); keys (universal-argument will turn up
C-u for most); and, the PREFIX will turn up in the face
help-argument-name.

(defun wrap-search-again (prefix)
  "Search again for the most recent search string of `wrap-search'.
   Use \\[universal-argument] \(to set the PREFIX\) to toggle case 
sensitiveness."
  ; ...
  )

You can use the below defun to check your docstrings.
It is intended to check the code of packages, but you
can use it to check docstrings and just ignore what it
says that is package-related (if you are not coding a
package, of course).

(defun check-pack-style ()
  (interactive)
  (checkdoc-current-buffer t) ) ; TAKE-NOTES (report all errors)

-- 
underground experts united


reply via email to

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