summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2004-05-22 01:58:25 +0000
committerJuanma Barranquero <lekktu@gmail.com>2004-05-22 01:58:25 +0000
commit7d57db2916957d1ea8b8d1582d96de6fb9ecea05 (patch)
tree093cecb2fa20e6e0db249b81e8b955931bc40a9d /lisp
parentf63fd14ef3045ed0390707e919ea16e5c356b7e8 (diff)
downloademacs-7d57db2916957d1ea8b8d1582d96de6fb9ecea05.tar.gz
(help-add-fundoc-usage): Use %S only for output of `help-make-usage'.
(help-highlight-arguments): Skip function name before searching for arguments.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/help-fns.el5
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d958cc0457f..43e7b47eb61 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-22 Juanma Barranquero <lektu@terra.es>
+
+ * help-fns.el (help-add-fundoc-usage): Use %S only for output of
+ `help-make-usage'.
+ (help-highlight-arguments): Skip function name before searching
+ for arguments.
+
2004-05-21 Juanma Barranquero <lektu@terra.es>
* allout.el (allout-chart-subtree, allout-rebullet-topic-grunt):
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e0692119a21..e7e09a431bd 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -181,14 +181,14 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
(unless (stringp docstring) (setq docstring "Not documented"))
(if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t))
docstring
- (format "%s%s%S" docstring
+ (concat docstring
(if (string-match "\n?\n\\'" docstring)
(if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")
"\n\n")
(if (and (stringp arglist)
(string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
(concat "(fn" (match-string 1 arglist) ")")
- (help-make-usage 'fn arglist)))))
+ (format "%S" (help-make-usage 'fn arglist))))))
(defun help-function-arglist (def)
;; Handle symbols aliased to other symbols.
@@ -275,6 +275,7 @@ else ARG is returned in uppercase normal."
(next (not (or args (looking-at "\\["))))
(opt nil))
;; Make a list of all arguments
+ (skip-chars-forward "^ ")
(while next
(or opt (not (looking-at " &")) (setq opt t))
(if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t))