181 |
(unless (stringp docstring) (setq docstring "Not documented")) |
(unless (stringp docstring) (setq docstring "Not documented")) |
182 |
(if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t)) |
(if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t)) |
183 |
docstring |
docstring |
184 |
(format "%s%s%S" docstring |
(concat docstring |
185 |
(if (string-match "\n?\n\\'" docstring) |
(if (string-match "\n?\n\\'" docstring) |
186 |
(if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") |
(if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") |
187 |
"\n\n") |
"\n\n") |
188 |
(if (and (stringp arglist) |
(if (and (stringp arglist) |
189 |
(string-match "\\`([^ ]+\\(.*\\))\\'" arglist)) |
(string-match "\\`([^ ]+\\(.*\\))\\'" arglist)) |
190 |
(concat "(fn" (match-string 1 arglist) ")") |
(concat "(fn" (match-string 1 arglist) ")") |
191 |
(help-make-usage 'fn arglist))))) |
(format "%S" (help-make-usage 'fn arglist)))))) |
192 |
|
|
193 |
(defun help-function-arglist (def) |
(defun help-function-arglist (def) |
194 |
;; Handle symbols aliased to other symbols. |
;; Handle symbols aliased to other symbols. |
277 |
(next (not (or args (looking-at "\\[")))) |
(next (not (or args (looking-at "\\[")))) |
278 |
(opt nil)) |
(opt nil)) |
279 |
;; Make a list of all arguments |
;; Make a list of all arguments |
280 |
|
(skip-chars-forward "^ ") |
281 |
(while next |
(while next |
282 |
(or opt (not (looking-at " &")) (setq opt t)) |
(or opt (not (looking-at " &")) (setq opt t)) |
283 |
(if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) |
(if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) |