Mercurial > emacs
comparison lisp/textmodes/texinfmt.el @ 9754:7e9b8823755b
(texinfo-format-scan): Make @- vanish; don't insert -.
(texinfo-format-soft-hyphen): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 30 Oct 1994 20:05:58 +0000 |
parents | 1de7e5bc1ff1 |
children | ebe611f49450 |
comparison
equal
deleted
inserted
replaced
9753:00144934b449 | 9754:7e9b8823755b |
---|---|
639 (defun texinfo-format-scan () | 639 (defun texinfo-format-scan () |
640 (texinfo-format-convert (point-min) (point-max)) | 640 (texinfo-format-convert (point-min) (point-max)) |
641 ;; Scan for @-commands. | 641 ;; Scan for @-commands. |
642 (goto-char (point-min)) | 642 (goto-char (point-min)) |
643 (while (search-forward "@" nil t) | 643 (while (search-forward "@" nil t) |
644 (if (looking-at "[@{}^'` *\"?!-]") | 644 (if (looking-at "[@{}^'` *\"?!]") |
645 ;; Handle a few special @-followed-by-one-char commands. | 645 ;; Handle a few special @-followed-by-one-char commands. |
646 (if (= (following-char) ?*) | 646 (if (= (following-char) ?*) |
647 (progn | 647 (progn |
648 ;; remove command | 648 ;; remove command |
649 (delete-region (1- (point)) (1+ (point))) | 649 (delete-region (1- (point)) (1+ (point))) |
1052 (insert str) | 1052 (insert str) |
1053 (setq column (1- column)))) | 1053 (setq column (1- column)))) |
1054 (insert ?\n))) | 1054 (insert ?\n))) |
1055 | 1055 |
1056 | 1056 |
1057 ;;; Space controlling commands: @. and @: | 1057 ;;; Space controlling commands: @. and @:, and the soft hyphen. |
1058 | |
1058 (put '\. 'texinfo-format 'texinfo-format-\.) | 1059 (put '\. 'texinfo-format 'texinfo-format-\.) |
1059 (defun texinfo-format-\. () | 1060 (defun texinfo-format-\. () |
1060 (texinfo-discard-command) | 1061 (texinfo-discard-command) |
1061 (insert ".")) | 1062 (insert ".")) |
1062 | 1063 |
1063 (put '\: 'texinfo-format 'texinfo-format-\:) | 1064 (put '\: 'texinfo-format 'texinfo-format-\:) |
1064 (defun texinfo-format-\: () | 1065 (defun texinfo-format-\: () |
1066 (texinfo-discard-command)) | |
1067 | |
1068 (put '\- 'texinfo-format 'texinfo-format-soft-hyphen) | |
1069 (defun texinfo-format-soft-hyphen () | |
1065 (texinfo-discard-command)) | 1070 (texinfo-discard-command)) |
1066 | 1071 |
1067 | 1072 |
1068 ;;; @center, @sp, and @br | 1073 ;;; @center, @sp, and @br |
1069 | 1074 |