# HG changeset patch # User Stefan Monnier # Date 1006725825 0 # Node ID 6fbc91a79b0ba6bea082229fc57a34beafdc8b0c # Parent 92d06d8cd81db80ed21e2c9071d57d3716300820 (describe-syntax): New fun. diff -r 92d06d8cd81d -r 6fbc91a79b0b lisp/help-funs.el --- a/lisp/help-funs.el Sun Nov 25 22:01:15 2001 +0000 +++ b/lisp/help-funs.el Sun Nov 25 22:03:45 2001 +0000 @@ -436,6 +436,22 @@ (buffer-string))))))) +;;;###autoload +(defun describe-syntax (&optional buffer) + (interactive) + "Describe the syntax specifications in the syntax table of BUFFER. +The descriptions are inserted in a help buffer, which is then displayed. +BUFFER defaults to the current buffer." + (setq buffer (or buffer (current-buffer))) + (help-setup-xref (list #'describe-syntax buffer) (interactive-p)) + (with-output-to-temp-buffer (help-buffer) + (let ((table (with-current-buffer buffer (syntax-table)))) + (with-current-buffer standard-output + (describe-vector table 'internal-describe-syntax-value) + (while (setq table (char-table-parent table)) + (insert "\nThe parent syntax table is:") + (describe-vector table 'internal-describe-syntax-value)))))) + (provide 'help-funs) ;;; help-funs.el ends here