Mercurial > hg > xemacs-beta
changeset 4381:3906442b491b
Improve style and add tests for 'built-in-symbol-file'.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Thu, 03 Jan 2008 01:33:59 -0800 |
parents | 461fdb92f3b6 |
children | 12ff8dc2b57e |
files | src/ChangeLog src/doc.c tests/ChangeLog tests/automated/symbol-tests.el |
diffstat | 4 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Jan 02 22:11:03 2008 +0100 +++ b/src/ChangeLog Thu Jan 03 01:33:59 2008 -0800 @@ -1,3 +1,7 @@ +2008-01-03 Stephen J. Turnbull <stephen@xemacs.org> + + * doc.c (Fbuilt_in_symbol_file): Improve style. + 2008-01-02 Aidan Kehoe <kehoea@parhasard.net> * emacs.c (main_1):
--- a/src/doc.c Wed Jan 02 22:11:03 2008 +0100 +++ b/src/doc.c Thu Jan 03 01:33:59 2008 -0800 @@ -519,8 +519,7 @@ fun = Findirect_function (symbol); if (SUBRP (fun) || (CONSP(fun) && (EQ (Qmacro, Fcar_safe (fun))) - && !NILP(fun = Fcdr_safe (fun)) - && (SUBRP (fun)))) + && (fun = Fcdr_safe (fun), SUBRP (fun)))) { if (XSUBR (fun)->doc == 0) return Qnil;
--- a/tests/ChangeLog Wed Jan 02 22:11:03 2008 +0100 +++ b/tests/ChangeLog Thu Jan 03 01:33:59 2008 -0800 @@ -1,3 +1,8 @@ +2008-01-03 Stephen J. Turnbull <stephen@xemacs.org> + + * automated/symbol-tests.el (Symbol documentation): Add tests to + check documentation extraction. + 2007-12-29 Stephen J. Turnbull <stephen@xemacs.org> * automated/test-harness.el (test-harness-test-compiled):
--- a/tests/automated/symbol-tests.el Wed Jan 02 22:11:03 2008 +0100 +++ b/tests/automated/symbol-tests.el Thu Jan 03 01:33:59 2008 -0800 @@ -332,3 +332,23 @@ ; (Assert (equal (catch 'test-tag ; (set mysym 'foo)) ; `(,mysym (foo) make-local nil nil)))) + +;; ---------------------------------------------------------------- +;; Symbol documentation +;; ---------------------------------------------------------------- + +;; built-in variable documentation +(Assert (string= (built-in-symbol-file 'internal-doc-file-name) + "doc.c")) + +;; built-in function documentation +(Assert (string= (built-in-symbol-file 'built-in-symbol-file) + "doc.c")) + +;; built-in macro documentation +(Assert (string= (built-in-symbol-file 'when) + "eval.c")) + +;; #### we should handle symbols defined in Lisp, dumped, autoloaded, +;; and required, too. +