diff options
| author | Stefan Monnier | 2001-11-27 00:26:41 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-11-27 00:26:41 +0000 |
| commit | 861d9ef6366a5f80cb0bc108792c751c22774eb8 (patch) | |
| tree | e5b5fbbe39b7c66ae125a53212d69dc9e56c8f8b | |
| parent | 1d475b5ea1c726b78aa6db3cffd5827f76cb0ede (diff) | |
| download | emacs-861d9ef6366a5f80cb0bc108792c751c22774eb8.tar.gz emacs-861d9ef6366a5f80cb0bc108792c751c22774eb8.zip | |
(describe-categories, help-describe-category-set): New.
| -rw-r--r-- | lisp/help-fns.el | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 366c798b137..21e3fa993dd 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -452,6 +452,37 @@ BUFFER defaults to the current buffer." | |||
| 452 | (insert "\nThe parent syntax table is:") | 452 | (insert "\nThe parent syntax table is:") |
| 453 | (describe-vector table 'internal-describe-syntax-value)))))) | 453 | (describe-vector table 'internal-describe-syntax-value)))))) |
| 454 | 454 | ||
| 455 | (defun help-describe-category-set (value) | ||
| 456 | (insert (cond | ||
| 457 | ((null value) "default") | ||
| 458 | ((char-table-p value) "deeper char-table ...") | ||
| 459 | (t (condition-case err | ||
| 460 | (category-set-mnemonics value) | ||
| 461 | (error "invalid")))))) | ||
| 462 | |||
| 463 | ;;;###autoload | ||
| 464 | (defun describe-categories (&optional buffer) | ||
| 465 | "Describe the category specifications in the current category table. | ||
| 466 | The descriptions are inserted in a buffer, which is then displayed." | ||
| 467 | (interactive) | ||
| 468 | (setq buffer (or buffer (current-buffer))) | ||
| 469 | (help-setup-xref (list #'describe-categories buffer) (interactive-p)) | ||
| 470 | (with-output-to-temp-buffer (help-buffer) | ||
| 471 | (let ((table (with-current-buffer buffer (category-table)))) | ||
| 472 | (with-current-buffer standard-output | ||
| 473 | (describe-vector table 'help-describe-category-set) | ||
| 474 | (let ((docs (char-table-extra-slot table 0))) | ||
| 475 | (if (or (not (vectorp docs)) (/= (length docs) 95)) | ||
| 476 | (insert "Invalid first extra slot in this char table\n") | ||
| 477 | (insert "Meanings of mnemonic characters are:\n") | ||
| 478 | (dotimes (i 95) | ||
| 479 | (let ((elt (aref docs i))) | ||
| 480 | (when elt | ||
| 481 | (insert (+ i ?\ ) ": " elt "\n")))) | ||
| 482 | (while (setq table (char-table-parent table)) | ||
| 483 | (insert "\nThe parent category table is:") | ||
| 484 | (describe-vector table 'help-describe-category-set)))))))) | ||
| 485 | |||
| 455 | (provide 'help-fns) | 486 | (provide 'help-fns) |
| 456 | 487 | ||
| 457 | ;;; help-fns.el ends here | 488 | ;;; help-fns.el ends here |