[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
address@hidden: texinfmt.el: @verb support request]
From: |
Richard Stallman |
Subject: |
address@hidden: texinfmt.el: @verb support request] |
Date: |
Wed, 04 Dec 2002 06:07:16 -0500 |
------- Start of forwarded message -------
From: TAKAHASHI Kaoru <address@hidden>
To: address@hidden
Cc: address@hidden
Subject: texinfmt.el: @verb support request
Sender: address@hidden
Date: Tue, 03 Dec 2002 21:46:03 +0900
- --Multipart_Tue_Dec__3_21:46:03_2002-1
Content-Type: text/plain; charset=US-ASCII
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
@address@hidden @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,
- --Multipart_Tue_Dec__3_21:46:03_2002-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="ChangeLog"
Content-Transfer-Encoding: 7bit
2002-12-03 TAKAHASHI Kaoru <address@hidden>
* textmodes/texinfmt.el (texinfo-format-verb): New function.
- --Multipart_Tue_Dec__3_21:46:03_2002-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="verb.diff"
Content-Transfer-Encoding: 7bit
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.
- --Multipart_Tue_Dec__3_21:46:03_2002-1--
_______________________________________________
Bug-gnu-emacs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------
- address@hidden: texinfmt.el: @verb support request],
Richard Stallman <=