diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-05-11 09:12:09 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-05-11 09:12:09 +0000 |
commit | d9858e4f1889a61b216ae1f99053846362067ccc (patch) | |
tree | d0f18015bf1ebe06f489de11b74b4e4b5e98fdc3 /lisp/help-fns.el | |
parent | ab4b17bed77ba635b5654accdfde3fbdf125f3e6 (diff) | |
parent | a57e8159253e6ddd74b0453de7c526a9895b9576 (diff) | |
download | emacs-d9858e4f1889a61b216ae1f99053846362067ccc.tar.gz emacs-d9858e4f1889a61b216ae1f99053846362067ccc.tar.bz2 emacs-d9858e4f1889a61b216ae1f99053846362067ccc.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-291
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-292
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-293
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-294
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-295
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296
Allow restarting an existing debugger session that's exited
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-297
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-298
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-162
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f19bdbf1c35..df8f9359853 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -45,10 +45,10 @@ If there's no tutorial in that language, `TUTORIAL' is selected. With ARG, you are asked to choose which language." (interactive "P") (let ((lang (if arg - (let ((minibuffer-setup-hook minibuffer-setup-hook)) - (add-hook 'minibuffer-setup-hook - 'minibuffer-completion-help) - (read-language-name 'tutorial "Language: " "English")) + (let ((minibuffer-setup-hook minibuffer-setup-hook)) + (add-hook 'minibuffer-setup-hook + 'minibuffer-completion-help) + (read-language-name 'tutorial "Language: " "English")) (if (get-language-info current-language-environment 'tutorial) current-language-environment "English"))) @@ -237,7 +237,7 @@ KIND should be `var' for a variable or `subr' for a subroutine." (concat "src/" file) file))))) -(defface help-argument-name '((t (:weight bold))) +(defface help-argument-name '((t (:slant italic))) "Face to highlight function arguments in docstrings.") (defun help-do-arg-highlight (doc args) @@ -253,17 +253,16 @@ KIND should be `var' for a variable or `subr' for a subroutine." (defun help-highlight-arguments (usage doc &rest args) (when usage - (let ((case-fold-search nil) - (next (not args)) - (opt nil)) - ;; Make a list of all arguments - (with-temp-buffer - (insert usage) - (goto-char (point-min)) + (with-temp-buffer + (insert usage) + (goto-char (point-min)) + (let ((case-fold-search nil) + (next (not (or args (looking-at "\\[")))) + (opt nil)) ;; Make a list of all arguments (while next (or opt (not (looking-at " &")) (setq opt t)) - (if (not (re-search-forward " \\([\\[(]?\\)\\([^] &)\.]+\\)" nil t)) + (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) (setq next nil) (setq args (cons (match-string 2) args)) (when (and opt (string= (match-string 1) "(")) @@ -272,11 +271,11 @@ KIND should be `var' for a variable or `subr' for a subroutine." (search-backward "(") (goto-char (scan-sexps (point) 1))))) ;; Highlight aguments in the USAGE string - (setq usage (help-do-arg-highlight (buffer-string) args))) - ;; Highlight arguments in the DOC string - (setq doc (and doc (help-do-arg-highlight doc args))) - ;; Return value is like the one from help-split-fundoc, but highlighted - (cons usage doc)))) + (setq usage (help-do-arg-highlight (buffer-string) args)) + ;; Highlight arguments in the DOC string + (setq doc (and doc (help-do-arg-highlight doc args)))))) + ;; Return value is like the one from help-split-fundoc, but highlighted + (cons usage doc)) ;;;###autoload (defun describe-function-1 (function) |