From 2c1eaa45e79b2fad84d8fbbffaf4072238e9e8e1 Mon Sep 17 00:00:00 2001 From: kaoru Date: Wed, 11 Feb 2004 12:54:27 +0000 Subject: [PATCH] * ptexinfmt.el: Support @docbook, @ifdocbook, @ifnotdocbook, and @registeredsymbol. --- utils/ChangeLog | 5 +++++ utils/ptexinfmt.el | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/utils/ChangeLog b/utils/ChangeLog index ca0d83c..01f051c 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,8 @@ +2004-02-11 TAKAHASHI Kaoru + + * ptexinfmt.el: Support @docbook, @ifdocbook, @ifnotdocbook, and + @registeredsymbol. + 2004-01-18 Yoichi NAKAYAMA * ssl.el (toplevel): Don't include cl at run time. diff --git a/utils/ptexinfmt.el b/utils/ptexinfmt.el index c54fa38..a5f6336 100644 --- a/utils/ptexinfmt.el +++ b/utils/ptexinfmt.el @@ -263,6 +263,10 @@ DOCSTRING will be printed if ASSERTION is nil and (put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line) (put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command) +;; @ifnotdocbook ... @end ifnotdocbook (makeinfo 4.7 or later) +(put 'ifnotdocbook 'texinfo-format 'texinfo-discard-line) +(put 'ifnotdocbook 'texinfo-end 'texinfo-discard-command) + ;; @ifnotinfo ... @end ifnotinfo (makeinfo 3.11 or later) (put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo) @@ -278,6 +282,13 @@ DOCSTRING will be printed if ASSERTION is nil and (progn (re-search-forward "@end html[ \t]*\n") (point)))) +;; @docbook ... @end docbook (makeinfo 4.7 or later) +(put 'docbook 'texinfo-format 'texinfo-format-docbook) +(ptexinfmt-defun-if-void texinfo-format-docbook () + (delete-region texinfo-command-start + (progn (re-search-forward "@end docbook[ \t]*\n") + (point)))) + ;; @ifhtml ... @end ifhtml (makeinfo 3.8 or later) (put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml) (defun texinfo-format-ifhtml () @@ -292,6 +303,13 @@ DOCSTRING will be printed if ASSERTION is nil and (progn (re-search-forward "@end ifplaintext[ \t]*\n") (point)))) +;; @ifdocbook ... @end ifdocbook (makeinfo 4.7 or later) +(put 'ifdocbook 'texinfo-format 'texinfo-format-ifdocbook) +(ptexinfmt-defun-if-void texinfo-format-ifdocbook () + (delete-region texinfo-command-start + (progn (re-search-forward "@end ifdocbook[ \t]*\n") + (point)))) + ;;; Marking @@ -362,6 +380,12 @@ For example, @verb\{|@|\} results in @ and ;;; Accents and Special characters +;; @registeredsymbol{} ==> (R) +(put 'pounds 'texinfo-format 'texinfo-format-registeredsymbol) +(ptexinfmt-defun-if-void texinfo-format-registeredsymbol () + (texinfo-parse-arg-discard) + (insert "(R)")) + ;; @pounds{} ==> # Pounds Sterling (put 'pounds 'texinfo-format 'texinfo-format-pounds) (ptexinfmt-defun-if-void texinfo-format-pounds () -- 1.7.10.4