* texinfmt.el: @verb support request
@ 2002-12-03 12:46 TAKAHASHI Kaoru
0 siblings, 0 replies; only message in thread
From: TAKAHASHI Kaoru @ 2002-12-03 12:46 UTC (permalink / raw)
Cc: kaoru
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
Will you support @verb in texinfo formatter?
ChangeLog & patch attached. I think this patch's docstring and
error message is no-good. Please fix.
For example:
How many @verb{|@|}-escapes does one need to print this
@verb{.@a @b @c.} string or @verb{+@'e?`!`{}\+} this?
produces
How many @-escapes does one need to print this
@a @b @c string or these @'e?`{}!`\ this?
Regards,
[-- Attachment #2: ChangeLog --]
[-- Type: application/octet-stream, Size: 112 bytes --]
2002-12-03 TAKAHASHI Kaoru <kaoru@kaisei.org>
* textmodes/texinfmt.el (texinfo-format-verb): New function.
[-- Attachment #3: verb.diff --]
[-- Type: application/octet-stream, Size: 1163 bytes --]
Index: texinfmt.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/texinfmt.el,v
retrieving revision 1.62
diff -u -c -r1.62 texinfmt.el
*** texinfmt.el 28 Nov 2002 14:12:31 -0000 1.62
--- texinfmt.el 3 Dec 2002 12:42:44 -0000
***************
*** 2412,2417 ****
--- 2412,2432 ----
(insert (texinfo-parse-arg-discard))
(goto-char texinfo-command-start))
+ ;; @verb{<char>TEXT<char>} (makeinfo 4.1 or later)
+ (put 'verb 'texinfo-format 'texinfo-format-verb)
+ (defun texinfo-format-verb ()
+ "Format @verb{<char>TEXT<char>}. Output TEXT verbatim."
+ (let ((delimiter (buffer-substring-no-properties
+ (1+ texinfo-command-end) (+ 2 texinfo-command-end))))
+ (unless (looking-at "{")
+ (error "Not found @varb start brace"))
+ (delete-region texinfo-command-start (+ 2 texinfo-command-end))
+ (search-forward delimiter))
+ (delete-backward-char 1)
+ (unless (looking-at "}")
+ (error "Not found @varb end brace"))
+ (delete-char 1))
+
(put 'bullet 'texinfo-format 'texinfo-format-bullet)
(defun texinfo-format-bullet ()
"Insert an asterisk.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-03 12:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-03 12:46 texinfmt.el: @verb support request TAKAHASHI Kaoru
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).