[Top][All Lists]

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

Re: Improved help from minibuffer prompts

From: Juanma Barranquero
Subject: Re: Improved help from minibuffer prompts
Date: Fri, 30 Apr 2004 11:07:01 +0200

On Fri, 30 Apr 2004 07:32:48 +0200
Stefan Reichör <address@hidden> wrote:

> I looks very good!


BTW, my implementation does not grok yet CL-style "&optional (variable
default)" arglists.  I'm working on it.  I've also added a slight
modification so

(defun test (&rest buffer)
  "Do something to one or more BUFFERs."

will highlight BUFFER in the docstring (ignoring the plural ending, and
the same for "es").

Related to CL arglists, `help-add-fundoc-usage' uses (roughly)

  (format "%s%s%s"
          ;; doc
          ;; whitespace
          ;; arglist doc

As "%s" is equivalent to `princ', it does not quote, so an arglist like

  &optional (kind "")

shows in the docstring as

  &optional (KIND  )

(See `ebrowse-draw-file-member-info' for an example of the issue.)

Does anyone anticipate problems with the following minimal patch?


--- help-fns.el.orig    2004-04-30 10:36:06.000000000 +0200
+++ help-fns.el 2004-04-30 10:36:26.000000000 +0200
@@ -205,5 +205,5 @@
   (if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" doc) (eq arglist t))
-    (format "%s%s%s" doc
+    (format "%s%s%S" doc
            (if (string-match "\n?\n\\'" doc)
                (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")

reply via email to

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