summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorNoah Friedman <friedman@splode.com>1996-10-04 04:43:42 +0000
committerNoah Friedman <friedman@splode.com>1996-10-04 04:43:42 +0000
commit477c388f4ba4ccafb6dff77ea4db97bf7fcc9df5 (patch)
treeae9d93dd8b592f55532a3c53b64fc5255b8fefec /lisp/emacs-lisp
parent0995fa350a861885b709fc2bfc210d65a5597385 (diff)
downloademacs-477c388f4ba4ccafb6dff77ea4db97bf7fcc9df5.tar.gz
emacs-477c388f4ba4ccafb6dff77ea4db97bf7fcc9df5.tar.bz2
emacs-477c388f4ba4ccafb6dff77ea4db97bf7fcc9df5.zip
(eldoc-function-argstring-from-docstring): Add search that finds arglist
for `start-process'; possibly others.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/eldoc.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 5c4683d4138..ff84819c748 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -11,9 +11,9 @@
;; LCD Archive Entry:
;; eldoc|Noah Friedman|friedman@prep.ai.mit.edu|
;; show function arglist or variable docstring in echo area|
-;; $Date: 1995/11/25 03:45:25 $|$Revision: 1.5 $|~/misc/eldoc.el.gz|
+;; $Date: 1996/07/14 16:46:25 $|$Revision: 1.6 $|~/misc/eldoc.el.gz|
-;; $Id: eldoc.el,v 1.5 1995/11/25 03:45:25 friedman Exp friedman $
+;; $Id: eldoc.el,v 1.6 1996/07/14 16:46:25 friedman Exp friedman $
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -319,6 +319,8 @@ documentation string if possible."
(doclist nil)
(end nil))
(save-match-data
+ ;; TODO: Move these into a separate table that is iterated over until
+ ;; a match is found.
(cond
;; Try first searching for args starting with symbol name.
;; This is to avoid matching parenthetical remarks in e.g. sit-for.
@@ -373,7 +375,13 @@ documentation string if possible."
(setq end (- (match-end 1) 1))
(if (string-match " +" docstring (match-beginning 1))
(setq doc (substring docstring (match-end 0) end))
- (setq doc ""))))
+ (setq doc "")))
+
+ ;; This finds the argstring for `start-process'.
+ ;; I don't know if there are any others with the same pattern.
+ ((string-match "^Args are +\\([^\n]+\\)$" docstring)
+ (setq doc (substring docstring (match-beginning 1) (match-end 1))))
+ )
(cond ((not (stringp doc))
nil)