diff options
| author | Eli Zaretskii | 2001-02-22 13:30:58 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-02-22 13:30:58 +0000 |
| commit | 9238a8df8abebef090aeb0ed9a76e0c7de5704bc (patch) | |
| tree | 3bc83492a23896bf001892c7d52543cb4c7742d5 | |
| parent | a61b70582c0e93336f87479ac7a83b9cc48a8140 (diff) | |
| download | emacs-9238a8df8abebef090aeb0ed9a76e0c7de5704bc.tar.gz emacs-9238a8df8abebef090aeb0ed9a76e0c7de5704bc.zip | |
(texinfo-format-scan): Signal an error if
@ follows an accent command such as @'. Support optional braces
in commands that insert accents, like makeinfo does.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 18 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb469756610..dd927559b4d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2001-02-22 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * textmodes/texinfmt.el (texinfo-format-scan): Signal an error if | ||
| 4 | @ follows an accent command such as @'. Support optional braces | ||
| 5 | in commands that insert accents, like makeinfo does. | ||
| 6 | |||
| 1 | 2001-02-22 Gerd Moellmann <gerd@gnu.org> | 7 | 2001-02-22 Gerd Moellmann <gerd@gnu.org> |
| 2 | 8 | ||
| 3 | * startup.el (fancy-splash-text): Add a line for ordering | 9 | * startup.el (fancy-splash-text): Add a line for ordering |
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 822631e039b..0441602b3a7 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -868,7 +868,23 @@ lower types.") | |||
| 868 | ;; Otherwise: the other characters are simply quoted. Delete the @. | 868 | ;; Otherwise: the other characters are simply quoted. Delete the @. |
| 869 | (t | 869 | (t |
| 870 | (delete-char -1) | 870 | (delete-char -1) |
| 871 | (forward-char 1))) | 871 | ;; Be compatible with makeinfo: if @' and its ild are |
| 872 | ;; followed by a @ without a brace, barf. | ||
| 873 | (if (looking-at "[\"'^`~=]") | ||
| 874 | (progn | ||
| 875 | (if (= (char-after (1+ (point))) ?@) | ||
| 876 | (error "Use braces to give a command as an argument to @%c" | ||
| 877 | (following-char))) | ||
| 878 | (forward-char 1) | ||
| 879 | ;; @' etc. can optionally accept their argument in | ||
| 880 | ;; braces (makeinfo supports that). | ||
| 881 | (when (looking-at "{") | ||
| 882 | (let ((start (point))) | ||
| 883 | (forward-list 1) | ||
| 884 | (delete-char -1) | ||
| 885 | (goto-char start) | ||
| 886 | (delete-char 1)))) | ||
| 887 | (forward-char 1)))) | ||
| 872 | ;; @ is followed by a command-word; find the end of the word. | 888 | ;; @ is followed by a command-word; find the end of the word. |
| 873 | (setq texinfo-command-start (1- (point))) | 889 | (setq texinfo-command-start (1- (point))) |
| 874 | (if (= (char-syntax (following-char)) ?w) | 890 | (if (= (char-syntax (following-char)) ?w) |