diff options
| author | Stefan Monnier | 2001-11-25 22:03:45 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-11-25 22:03:45 +0000 |
| commit | c477f6880fca3bf593c6e02eb7fcdc6057dfac78 (patch) | |
| tree | 8a0958cdd06ecd5a2abb6bf3aab05d34eb85c9e5 | |
| parent | 47fc2db3ebb036b0689f77757451f36c1a29cb15 (diff) | |
| download | emacs-c477f6880fca3bf593c6e02eb7fcdc6057dfac78.tar.gz emacs-c477f6880fca3bf593c6e02eb7fcdc6057dfac78.zip | |
(describe-syntax): New fun.
| -rw-r--r-- | lisp/help-funs.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/help-funs.el b/lisp/help-funs.el index 3aaf58c9052..62049971d3f 100644 --- a/lisp/help-funs.el +++ b/lisp/help-funs.el | |||
| @@ -436,6 +436,22 @@ it is displayed along with the global value." | |||
| 436 | (buffer-string))))))) | 436 | (buffer-string))))))) |
| 437 | 437 | ||
| 438 | 438 | ||
| 439 | ;;;###autoload | ||
| 440 | (defun describe-syntax (&optional buffer) | ||
| 441 | (interactive) | ||
| 442 | "Describe the syntax specifications in the syntax table of BUFFER. | ||
| 443 | The descriptions are inserted in a help buffer, which is then displayed. | ||
| 444 | BUFFER defaults to the current buffer." | ||
| 445 | (setq buffer (or buffer (current-buffer))) | ||
| 446 | (help-setup-xref (list #'describe-syntax buffer) (interactive-p)) | ||
| 447 | (with-output-to-temp-buffer (help-buffer) | ||
| 448 | (let ((table (with-current-buffer buffer (syntax-table)))) | ||
| 449 | (with-current-buffer standard-output | ||
| 450 | (describe-vector table 'internal-describe-syntax-value) | ||
| 451 | (while (setq table (char-table-parent table)) | ||
| 452 | (insert "\nThe parent syntax table is:") | ||
| 453 | (describe-vector table 'internal-describe-syntax-value)))))) | ||
| 454 | |||
| 439 | (provide 'help-funs) | 455 | (provide 'help-funs) |
| 440 | 456 | ||
| 441 | ;;; help-funs.el ends here | 457 | ;;; help-funs.el ends here |