;;; Emacs lisp functions to convert Texinfo files to Info files.
+(or (fboundp 'defgroup)
+ (defmacro defgroup (&rest ignore) nil))
+
+(or (fboundp 'defcustom)
+ (defmacro defcustom (var value doc &rest ignore)
+ `(defvar ,var ,value ,doc)))
+
(defvar texinfmt-version "2.37 of 24 May 1997")
(defun texinfmt-version (&optional here)
(concat
"^@"
"\\("
+ "direntry\\|"
"example\\|"
"smallexample\\|"
"lisp\\|"
(insert "\n ")))
\f
+;; @direntry and @dircategory
+
+(put 'direntry 'texinfo-format 'texinfo-format-direntry)
+(defun texinfo-format-direntry ()
+ (texinfo-push-stack 'direntry nil)
+ (texinfo-discard-line)
+ (insert "START-INFO-DIR-ENTRY\n\n"))
+
+(put 'direntry 'texinfo-end 'texinfo-end-direntry)
+(defun texinfo-end-direntry ()
+ (texinfo-discard-command)
+ (insert "END-INFO-DIR-ENTRY\n\n")
+ (texinfo-pop-stack 'direntry))
+
+(put 'dircategory 'texinfo-format 'texinfo-format-dircategory)
+(defun texinfo-format-dircategory ()
+ (let ((str (texinfo-parse-arg-discard)))
+ (delete-region (point)
+ (progn
+ (skip-chars-forward " ")
+ (point)))
+ (insert "INFO-DIR-SECTION " str "\n")))
+\f
;;; @cartouche
;; The @cartouche command is a noop in Info; in a printed manual,
(put 'shorttitlepage 'texinfo-format 'texinfo-discard-line-with-args)
(put 'summarycontents 'texinfo-format 'texinfo-discard-line-with-args)
(put 'input 'texinfo-format 'texinfo-discard-line-with-args)
-(put 'dircategory 'texinfo-format 'texinfo-discard-line-with-args)
\f
;;; Some commands cannot be handled