emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/help-funs.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/help-funs.el
Date: Sun, 25 Nov 2001 17:03:45 -0500

Index: emacs/lisp/help-funs.el
diff -u emacs/lisp/help-funs.el:1.6 emacs/lisp/help-funs.el:1.7
--- emacs/lisp/help-funs.el:1.6 Sun Oct 21 11:28:44 2001
+++ emacs/lisp/help-funs.el     Sun Nov 25 17:03:45 2001
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]