aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2001-02-22 13:30:58 +0000
committerEli Zaretskii <[email protected]>2001-02-22 13:30:58 +0000
commit9238a8df8abebef090aeb0ed9a76e0c7de5704bc (patch)
tree3bc83492a23896bf001892c7d52543cb4c7742d5 /lisp
parenta61b70582c0e93336f87479ac7a83b9cc48a8140 (diff)
(texinfo-format-scan): Signal an error if
@ follows an accent command such as @'. Support optional braces in commands that insert accents, like makeinfo does.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/texinfmt.el18
2 files changed, 23 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cb46975661..dd927559b4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-22 Eli Zaretskii <[email protected]>
+
+ * textmodes/texinfmt.el (texinfo-format-scan): Signal an error if
+ @ follows an accent command such as @'. Support optional braces
+ in commands that insert accents, like makeinfo does.
+
2001-02-22 Gerd Moellmann <[email protected]>
* startup.el (fancy-splash-text): Add a line for ordering
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 822631e039..0441602b3a 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -868,7 +868,23 @@ lower types.")
;; Otherwise: the other characters are simply quoted. Delete the @.
(t
(delete-char -1)
- (forward-char 1)))
+ ;; Be compatible with makeinfo: if @' and its ild are
+ ;; followed by a @ without a brace, barf.
+ (if (looking-at "[\"'^`~=]")
+ (progn
+ (if (= (char-after (1+ (point))) ?@)
+ (error "Use braces to give a command as an argument to @%c"
+ (following-char)))
+ (forward-char 1)
+ ;; @' etc. can optionally accept their argument in
+ ;; braces (makeinfo supports that).
+ (when (looking-at "{")
+ (let ((start (point)))
+ (forward-list 1)
+ (delete-char -1)
+ (goto-char start)
+ (delete-char 1))))
+ (forward-char 1))))
;; @ is followed by a command-word; find the end of the word.
(setq texinfo-command-start (1- (point)))
(if (= (char-syntax (following-char)) ?w)