diff options
| author | Jim Blandy | 1992-05-18 08:13:37 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-05-18 08:13:37 +0000 |
| commit | 502ddf238f0ed280a301426804b2ed16ec1c49cc (patch) | |
| tree | b73b5866ff8c59b1be99067bcb342aea95294e8c /src/doc.c | |
| parent | f9f15513851223c20a9cbc49ac0cd4cde114a963 (diff) | |
| download | emacs-502ddf238f0ed280a301426804b2ed16ec1c49cc.tar.gz emacs-502ddf238f0ed280a301426804b2ed16ec1c49cc.zip | |
entered into RCS
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 23 |
1 files changed, 10 insertions, 13 deletions
| @@ -105,19 +105,14 @@ DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0, | |||
| 105 | "Return the documentation string of FUNCTION.\n\ | 105 | "Return the documentation string of FUNCTION.\n\ |
| 106 | Unless a non-nil second argument is given, the\n\ | 106 | Unless a non-nil second argument is given, the\n\ |
| 107 | string is passed through `substitute-command-keys'.") | 107 | string is passed through `substitute-command-keys'.") |
| 108 | (fun1, raw) | 108 | (function, raw) |
| 109 | Lisp_Object fun1, raw; | 109 | Lisp_Object function, raw; |
| 110 | { | 110 | { |
| 111 | Lisp_Object fun; | 111 | Lisp_Object fun; |
| 112 | Lisp_Object funcar; | 112 | Lisp_Object funcar; |
| 113 | Lisp_Object tem, doc; | 113 | Lisp_Object tem, doc; |
| 114 | 114 | ||
| 115 | fun = fun1; | 115 | fun = Findirect_function (function); |
| 116 | while (XTYPE (fun) == Lisp_Symbol) | ||
| 117 | { | ||
| 118 | QUIT; | ||
| 119 | fun = Fsymbol_function (fun); | ||
| 120 | } | ||
| 121 | 116 | ||
| 122 | switch (XTYPE (fun)) | 117 | switch (XTYPE (fun)) |
| 123 | { | 118 | { |
| @@ -149,11 +144,11 @@ string is passed through `substitute-command-keys'.") | |||
| 149 | funcar = Fcar (fun); | 144 | funcar = Fcar (fun); |
| 150 | if (XTYPE (funcar) != Lisp_Symbol) | 145 | if (XTYPE (funcar) != Lisp_Symbol) |
| 151 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); | 146 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); |
| 152 | if (XSYMBOL (funcar) == XSYMBOL (Qkeymap)) | 147 | else if (EQ (funcar, Qkeymap)) |
| 153 | return build_string ("Prefix command (definition is a keymap associating keystrokes with\n\ | 148 | return build_string ("Prefix command (definition is a keymap associating keystrokes with\n\ |
| 154 | subcommands.)"); | 149 | subcommands.)"); |
| 155 | if (XSYMBOL (funcar) == XSYMBOL (Qlambda) | 150 | else if (EQ (funcar, Qlambda) |
| 156 | || XSYMBOL (funcar) == XSYMBOL (Qautoload)) | 151 | || EQ (funcar, Qautoload)) |
| 157 | { | 152 | { |
| 158 | tem = Fcar (Fcdr (Fcdr (fun))); | 153 | tem = Fcar (Fcdr (Fcdr (fun))); |
| 159 | if (XTYPE (tem) == Lisp_String) | 154 | if (XTYPE (tem) == Lisp_String) |
| @@ -162,10 +157,12 @@ subcommands.)"); | |||
| 162 | doc = get_doc_string (XFASTINT (tem)); | 157 | doc = get_doc_string (XFASTINT (tem)); |
| 163 | else | 158 | else |
| 164 | return Qnil; | 159 | return Qnil; |
| 160 | |||
| 161 | break; | ||
| 165 | } | 162 | } |
| 166 | if (XSYMBOL (funcar) == XSYMBOL (Qmocklisp)) | 163 | else if (EQ (funcar, Qmocklisp)) |
| 167 | return Qnil; | 164 | return Qnil; |
| 168 | if (XSYMBOL (funcar) == XSYMBOL (Qmacro)) | 165 | else if (EQ (funcar, Qmacro)) |
| 169 | return Fdocumentation (Fcdr (fun), raw); | 166 | return Fdocumentation (Fcdr (fun), raw); |
| 170 | 167 | ||
| 171 | /* Fall through to the default to report an error. */ | 168 | /* Fall through to the default to report an error. */ |